-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add millisecond field for time map initialize. #2781
Add millisecond field for time map initialize. #2781
Conversation
Please add some integration tests in TCK |
Done |
@@ -55,11 +55,16 @@ constexpr int64_t kMaxTimestamp = std::numeric_limits<int64_t>::max() / 10000000 | |||
return Status::Error("Invalid second number `%ld'.", kv.second.getInt()); | |||
} | |||
dt.sec = kv.second.getInt(); | |||
} else if (kv.first == "millisecond") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use switch here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch can't process string type.
tag_date.f_datetime = DateTime("2018-03-04T22:30:40") | ||
tag_date.f_date = Date({year: 2018, month: 3, day: 4}), | ||
tag_date.f_time = Time({hour: 22, minute: 1, second: 0, millisecond: 0, microsecond: 0}), | ||
tag_date.f_datetime = DateTime({year: 2018, month: 3, day: 4, hour: 22, minute: 30, second: 40, millisecond: 0, microsecond: 0}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add a new test case instead of modifying?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The origin case is tested in other case too.
…ock-Hg/nebula into correct/time-millisecond-initialize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Close #2612