Skip to content
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

Support Extract DateTimeFromString #6300

Merged
merged 15 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dbms/src/Common/MyDuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ class MyDuration
static constexpr Int64 NANOS_PER_MINUTE = 60 * NANOS_PER_SECOND;
static constexpr Int64 NANOS_PER_HOUR = 60 * NANOS_PER_MINUTE;

static const int8_t DefaultFsp = 6;

Int64 nanos;
UInt8 fsp;

public:
static constexpr Int64 MAX_HOUR_PART = 838;
static constexpr Int64 MAX_MINUTE_PART = 59;
static constexpr Int64 MAX_SECOND_PART = 59;
static constexpr Int64 MAX_MICRO_PART = 999999;
static constexpr Int64 MAX_NANOS = MAX_HOUR_PART * NANOS_PER_HOUR + MAX_MINUTE_PART * NANOS_PER_MINUTE + MAX_SECOND_PART * NANOS_PER_SECOND + MAX_MICRO_PART * NANOS_PER_MICRO;
static_assert(MAX_NANOS > 0);

static const int8_t DefaultFsp = 6;

Int64 nanos;
UInt8 fsp;

public:
MyDuration() = default;
explicit MyDuration(Int64 nanos_)
: nanos(nanos_)
Expand Down
Loading