-
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-6241] 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
@@ -134,7 +134,7 @@ private SqlLibraryOperators() { | |||
|
|||
/** The "DATE_ADD(date, numDays)" function | |||
* (Spark) Returns the date that is num_days after start_date. */ | |||
@LibraryOperator(libraries = {SPARK}) | |||
@LibraryOperator(libraries = {SPARK, ORACLE, HIVE}) |
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.
Does hive support both DATE_ADD(date, interval)
and DATE_ADD(date, numDays)
?
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 reminder, hive not support both, only support DATE_ADD(date, numDays), I would change it. @ILuffZhe
@@ -134,7 +134,7 @@ private SqlLibraryOperators() { | |||
|
|||
/** The "DATE_ADD(date, numDays)" function | |||
* (Spark) Returns the date that is num_days after start_date. */ | |||
@LibraryOperator(libraries = {SPARK}) | |||
@LibraryOperator(libraries = {SPARK, ORACLE, HIVE}) |
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.
You enable this in Oracle, do we have a test?
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.
remove oracle~ it is my mistake.
site/_docs/reference.md
Outdated
@@ -2780,7 +2780,7 @@ In the following: | |||
| m | expr1 <=> expr2 | Whether two values are equal, treating null values as the same, and it's similar to `IS NOT DISTINCT FROM` | |||
| p | ACOSD(numeric) | Returns the inverse cosine of *numeric* in degrees as a double. Returns NaN if *numeric* is NaN. Fails if *numeric* is less than -1.0 or greater than 1.0. | |||
| * | ACOSH(numeric) | Returns the inverse hyperbolic cosine of *numeric* | |||
| o s | ADD_MONTHS(date, numMonths) | Returns the date that is *numMonths* after *date* | |||
| o s h | ADD_MONTHS(date, numMonths) | Returns the date that is *numMonths* after *date* |
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.
This function seems not being added above, please take a look and also make sure the reference's changing consistent with what in SqlLibraryOpetators.
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 remove this function.
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. |
01360c1
to
f54e426
Compare
f54e426
to
dc885b1
Compare
Quality Gate passedIssues Measures |
@ILuffZhe CI is success, PTAL when you are free time, thanks~ |
Add hive as a supported library for functions that have already been implemented for other libraries.
issue: https://issues.apache.org/jira/browse/CALCITE-6241 and commucate with author make a new pr to finish it.