[CALCITE-5554] Add DAYOFWEEK and DAYOFYEAR as valid synonyms of DOW, DOY#3094
Closed
tanclary wants to merge 2 commits intoapache:mainfrom
Closed
[CALCITE-5554] Add DAYOFWEEK and DAYOFYEAR as valid synonyms of DOW, DOY#3094tanclary wants to merge 2 commits intoapache:mainfrom
tanclary wants to merge 2 commits intoapache:mainfrom
Conversation
265162c to
4c7ac6e
Compare
4c7ac6e to
c9a7181
Compare
Contributor
|
LGTM |
04d6597 to
2188b20
Compare
|
Kudos, SonarCloud Quality Gate passed! |
julianhyde
pushed a commit
to julianhyde/calcite
that referenced
this pull request
Mar 9, 2023
…nonyms for DOW, DOY Add operator tests, and re-enable some of the tests disabled in [CALCITE-2539]. Close apache#3094
julianhyde
pushed a commit
to julianhyde/calcite
that referenced
this pull request
Mar 18, 2023
…nonyms for DOW, DOY Add operator tests, and re-enable some of the tests disabled in [CALCITE-2539]. Close apache#3094
This file contains hidden or 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
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.









JIRA Case: https://issues.apache.org/jira/browse/CALCITE-5554
Minor change to parser to accept "DAYOFWEEK" and "DAYOFYEAR" that correlate to the DOW and DOY time units, respectively.
Note that DAYOFWEEK and DAYOFYEAR are also valid 1-operand functions that return the corresponding DOW or DOY for a provided date. (They are equivalent to EXTRACT(DOW/DOY from DATE)). This is also the case for other time units like HOUR and MINUTE so I tried to mirror how they handled a token that could be both a valid qualifier and function name.
Please let me know if you have any comments, questions, or suggestions. Thanks!