-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
[FLINK-8518][Table API & SQL] Support DOW for EXTRACT #6007
[FLINK-8518][Table API & SQL] Support DOW for EXTRACT #6007
Conversation
dow extraction support implemented + tests
Wasn't sure this is the full PR or just partial implementation, but I don't see |
@walterddr thank you for your comment |
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 @snuyanzin for the explanation and contribution!
Hmm ok. in this case can you change the PR title to only address DOW?
yes, done |
sorry, closed by mistake, restored |
Thanks for the PR @snuyanzin. I created the issue because it seems that this is more than a one line change. I tested your queries in Postgres SQL and it returns 0 instead of 1. We should have the same semantics as popular database vendors. How is Oracle defining this feature? |
@twalthr thank you for your comment.
So they would like to align the behavior with Postrgresql About different db's day of week |
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.
Thank you for the effort @snuyanzin. I was not aware about the amount of work you put into this issue before opening the PR. I'm fine with sticking to Calcite's behavior. Can you add some documentation to sqlApi.md such that users know about the semantics?
"1") | ||
|
||
testSqlApi( | ||
"EXTRACT(DOW FROM f16)", |
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.
Can you add a test (maybe in ScalarFunctionsValidationTest
?) for checking the behavior on a TIME
type?
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.
Yes sure, just have done it for DOW and DOY as well
…port_DOW,_EPOCH,_DECADE_for_EXTRACT add validation tests for DOY, DOW in ScalarFunctionsValidationTest
@twalthr thank you for your comment but could you please clarify this
and etc. And if you agree then one question: would it be better to create another issue for that or use the same?
|
Hi @snuyanzin, |
2) added tests fot synonym functions
Definitely agree however my point was that the same situation is for DOY, CENTURY and others... @twalthr could you please have a look? btw: a separate ticket Flink-9432 for the functionality depending on Calcite-2303 |
Sorry, for the delay @snuyanzin. I was on vacation. I will have a look at your update. |
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.
Thank you @snuyanzin. LGTM will merge...
…extraction units This closes apache#6007.
dow extraction support implemented + tests
Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.
Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.
Contribution Checklist
Make sure that the pull request corresponds to a JIRA issue. Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where FLINK-XXXX should be replaced by the actual issue number. Skip component if you are unsure about which is the best component.
Typo fixes that have no associated JIRA issue should be named following this pattern:
[hotfix] [docs] Fix typo in event time introduction
or[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator
.Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
Make sure that the change passes the automated tests, i.e.,
mvn clean verify
passes. You can set up Travis CI to do that following this guide.Each pull request should address only one issue, not mix up code from multiple issues.
Each commit in the pull request has a meaningful commit message (including the JIRA id)
Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
(The sections below can be removed for hotfixes of typos)
What is the purpose of the change
(For example: This pull request makes task deployment go through the blob server, rather than through RPC. That way we avoid re-transferring them on each deployment (during recovery).)
Brief change log
(for example:)
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation