-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CALCITE-6800] Enable a few existing functions to HIVE library #4165
base: main
Are you sure you want to change the base?
Conversation
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.
It seems that the bounds test of the function is not considered for the time being.
LGTM
0054198
to
1f24557
Compare
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java
Outdated
Show resolved
Hide resolved
79cfb54
to
440101a
Compare
@xuzifu666 The CI failed ,please make sure your change can pass on your machine, then push it so we can go forward. |
f54e426
to
dc885b1
Compare
@ILuffZhe CI is success, PTAL when you are free time, thanks~ |
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.
It's really close now, could you please take a look? @xuzifu666
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java
Outdated
Show resolved
Hide resolved
dc885b1
to
b78fba4
Compare
@ILuffZhe addressed,thanks for your review,PTAL |
site/_docs/reference.md
Outdated
@@ -2852,7 +2852,7 @@ In the following: | |||
| b | DATE(string) | Equivalent to `CAST(string AS DATE)` | |||
| b | DATE(year, month, day) | Returns a DATE value for *year*, *month*, and *day* (all of type INTEGER) | |||
| q r f | DATEADD(timeUnit, integer, datetime) | Equivalent to `TIMESTAMPADD(timeUnit, integer, datetime)` | |||
| q r f | DATEDIFF(timeUnit, datetime, datetime2) | Equivalent to `TIMESTAMPDIFF(timeUnit, datetime, datetime2)` | |||
| q r f h | DATEDIFF(timeUnit, datetime, datetime2) | Equivalent to `TIMESTAMPDIFF(timeUnit, datetime, datetime2)` |
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.
Is this a unintentional mistake?
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.
Had removed it.
Hi @xuzifu666 , you don't need to force-push every time, which makes it not easier to review. By the way, I think it might be better to add a new JIRA ticket, CALCITE-6241 is for Spark library. |
Very thanks for your remind, I had add all changes in doc and add all cases in Test, I also make a new jira https://issues.apache.org/jira/browse/CALCITE-6800 about the pr, due to had a keyword 'hive' in title which not pass for ut, so I had rebase for the error, PTAL when you free time. @ILuffZhe |
5c1de46
to
b5a02f8
Compare
Quality Gate passedIssues Measures |
It seems your changes in PR is not consistent with what described in JIRA. |
This pr is aim to enable some existing functions to Hive library, I had changed update jira for all functions. Would you please give a review again please. Thanks~ @ILuffZhe |
This case should only enable existing functions which have the same behavior in Hive. |
This case is only enable existing functions which have the same behavior in Hive,not implement for new functions,so keep it can be fine without file a new jira ticket or can merge this pr firstly? @ILuffZhe |
Enable some methods to hive which had already been implemented for other libraries.
issue: https://issues.apache.org/jira/browse/CALCITE-6800
support functions as follow:
DATE_ADD
DATE_SUB
DECODE
LPAD
RPAD
LTRIM
RTRIM
INSTR
GREATEST
LEAST
REGEXP_REPLACE_3
REPEAT
SOUNDEX
TO_DATE
MD5
SHA1
LOG_MYSQL