forked from opensearch-project/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update DATE_ADD
/ADDDATE
and DATE_SUB
/SUBDATE
functions.
#122
Merged
Yury-Fridlyand
merged 12 commits into
integ-datetime-calculations
from
dev-datetime-calculations
Dec 16, 2022
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8986a60
Rework on `DATE_ADD`/`ADDDATE` and `DATE_SUB`/`SUBDATE` functions.
Yury-Fridlyand f44782c
Update function implementations according to PR feedback.
Yury-Fridlyand 6e7c86b
Split UT cases into smaller ones.
Yury-Fridlyand b0557aa
Correct mistakes in docs.
Yury-Fridlyand 131b9ae
Fix switching timezone in datetime ITs.
Yury-Fridlyand 9845ad3
Fix conversion to timestamp.
Yury-Fridlyand 1b33a1c
Address PR feedback.
Yury-Fridlyand b19ea96
Update implementation and tests to use `FunctionProperties`.
Yury-Fridlyand 734a822
Minor improvements.
Yury-Fridlyand 02576bc
Minor improvements.
Yury-Fridlyand c206b9d
Address PR feedback.
Yury-Fridlyand 8a452c9
Address PR feedback.
Yury-Fridlyand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -290,10 +290,6 @@ public static FunctionExpression multiply(Expression... expressions) { | |
return compile(FunctionProperties.None, BuiltinFunctionName.MULTIPLY, expressions); | ||
} | ||
|
||
public static FunctionExpression adddate(Expression... expressions) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What was the reason for getting rid of all of these functions? Were they simply not used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
return compile(FunctionProperties.None, BuiltinFunctionName.ADDDATE, expressions); | ||
} | ||
|
||
public static FunctionExpression convert_tz(Expression... expressions) { | ||
return compile(FunctionProperties.None, BuiltinFunctionName.CONVERT_TZ, expressions); | ||
} | ||
|
@@ -306,14 +302,6 @@ public static FunctionExpression datetime(Expression... expressions) { | |
return compile(FunctionProperties.None, BuiltinFunctionName.DATETIME, expressions); | ||
} | ||
|
||
public static FunctionExpression date_add(Expression... expressions) { | ||
return compile(FunctionProperties.None, BuiltinFunctionName.DATE_ADD, expressions); | ||
} | ||
|
||
public static FunctionExpression date_sub(Expression... expressions) { | ||
return compile(FunctionProperties.None, BuiltinFunctionName.DATE_SUB, expressions); | ||
} | ||
|
||
public static FunctionExpression day(Expression... expressions) { | ||
return compile(FunctionProperties.None, BuiltinFunctionName.DAY, expressions); | ||
} | ||
|
@@ -374,10 +362,6 @@ public static FunctionExpression second(Expression... expressions) { | |
return compile(FunctionProperties.None, BuiltinFunctionName.SECOND, expressions); | ||
} | ||
|
||
public static FunctionExpression subdate(Expression... expressions) { | ||
return compile(FunctionProperties.None, BuiltinFunctionName.SUBDATE, expressions); | ||
} | ||
|
||
public static FunctionExpression time(Expression... expressions) { | ||
return compile(FunctionProperties.None, BuiltinFunctionName.TIME, expressions); | ||
} | ||
|
Oops, something went wrong.
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.
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.
Maybe specify that ZONE is
UTC_ZONE
?