-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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 new functions to format datetime in joda datetime style #43818
Conversation
|
The new adding function SELECT count(1)
FROM
(
SELECT fromUnixTimestampWithJodaPattern(1483200000 + number , 'yyyy-MM-dd HH:mm:ss')
FROM numbers(10000000)
)
Costs 1.6s
SELECT count(1)
FROM
(
SELECT FROM_UNIXTIME(1483200000 + id, 'yyyy-MM-dd HH:mm:ss')
FROM range(10000000)
)
Costs 4.482 s |
@rschu1ze Thanks very much for your review. Let's wait for the CI/CD pipelines. |
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.
@taiyang-li Thanks for your fixes. The PR looks overall good and is (almost) ready to merge. When I did the first round of review over the weekend, I skipped the tests (sorry). I now had a look at them, so please find some further comments included. It is mostly minor stuff, so we should be able to merge this PR afterwards.
tests/queries/0_stateless/02496_format_datetime_in_joda_syntax.reference
Outdated
Show resolved
Hide resolved
tests/queries/0_stateless/02496_format_datetime_in_joda_syntax.sql
Outdated
Show resolved
Hide resolved
LGTM. Style check (rightfully) complains that "formatDateTime.cpp" prints to stdout. Once you removed that (I don't have permissions to fix it by myself) and test are green, I will merge. Thanks! |
@taiyang-li About the failure of fasttest, please see my earlier comment #43818 (comment). I also wonder why commit eb9d496 is needed? Submodules updated in other PRs are automatically obtained by merges from master. To get rid of this commit, you could squash your (and only your) commits, rebase them on top of the current master branch state and force-push to branch "improve_from_unixtime". |
eb9d496
to
58cbd81
Compare
@rschu1ze We'd better add label 'pr-performance'. Because this pr may affect function |
Functional tests look good. Let me merge once all builds/tests are done (please don't merge from master in the meantime). |
The failed tests seem not related to this PR, see similar failed tests in #43239 |
Clang-tidy complains ... because of that the merge button is greyed out for me, sorry.
|
The failed tests seem not related to this PR. |
Yes, the test failures are unrelated. However, #44060 was a little bit quicker to merge and created merge conflicts, sorry. Would you like to resolve these first? Thanks! |
Sorry, I had a fever in recent days. I will continue this work when I'm fine. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
format datetime in joda datetime style. Refer to https://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html