-
Notifications
You must be signed in to change notification settings - Fork 510
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 5273 Postrgesql extract from temporal types #5274
Merged
JakeWharton
merged 11 commits into
cashapp:master
from
griffio:add-postrgesql-extract-from
Jul 17, 2024
Merged
Add 5273 Postrgesql extract from temporal types #5274
JakeWharton
merged 11 commits into
cashapp:master
from
griffio:add-postrgesql-extract-from
Jul 17, 2024
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
5ae4adb
to
9f39396
Compare
9f39396
to
06c9cf2
Compare
extract temporal fields
todo - bind arg test "?" needs cast e.g `?::TIMESTAMP`
Add Support for: SELECT EXTRACT(MONTH FROM DATE '2023-05-15'); SELECT EXTRACT(HOUR FROM TIME '10:30:45');
SELECT EXTRACT(MONTH FROM DATE '2023-05-15'); SELECT EXTRACT(HOUR FROM TIME '10:30:45');
To support Extract
Literal Date and Time tests
Integration Test for Extract
Add error to validate temporal types
Integration test for INTERVAL returns double(3)
Add latest temporal fields (22)
06c9cf2
to
aa97acb
Compare
JakeWharton
approved these changes
Jul 17, 2024
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.
fixes #5273
fixes #5340
🚧 🕐 Extract Function https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
Adds grammar for
extract_temporal_expression
Adds
DATE
andTIME
literals as missing from grammar to include in EXTRACTAdds mixin to find the expression for the resolver to use
Adds validate temporal types in resolver
Adds fixture test
Adds integration test for real use case in constraint