-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Issue #2827: Julian Day Parts #8523
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement Julian Day function and extraction for DATE. TIMESTAMP and TIMESTAMP_TZ return DOUBLE and need further work.
Rebind constant Julian Day of TIMESTAMP to return DOUBLE.
Add support for non-BIGINT date parts. Julian Days are always DOUBLE now, even for DATEs. Still needs more tests and ICU versions.
Add remaining coverage tests for non-ICU types. Fix missing cases in DATE_TRUNC.
Add remaining coverage tests for non-ICU types. Fix missing cases in DATE_TRUNC.
Add missing date_diff tests.
Add DATE_PART Julian Day implementations for TSTZ.
Add remaining Julian Day implementations for TSTZ.
Remove unreachable rewrite.
Tishj
reviewed
Aug 11, 2023
Tishj
reviewed
Aug 11, 2023
Tishj
reviewed
Aug 11, 2023
Tishj
reviewed
Aug 11, 2023
Tishj
reviewed
Aug 11, 2023
Tishj
reviewed
Aug 11, 2023
Tishj
reviewed
Aug 11, 2023
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.
I made a note of a few things that looked odd to me, other than that I think it looks good
Use vectors. Clean up BIGINT/DOUBLE APIs.
Tishj
approved these changes
Aug 21, 2023
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.
Thanks for the changes, looks great!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for the PG Julian Day date part.
This turned out to be annoying and time-consuming because JDs are
DOUBLE
and every other date part is
BIGINT
. The approach is to separate the two types of return valuesand disallow mixing (i.e., reading the date part from another column). Structs can still have
julian
fields with type
DOUBLE
.It was also not possible to use the rewrite rules to map
DATE_PART('Julian', <expr>)
toJULIAN(<expr>)
because the return type changes and downstream code did not like that.fixes #2827