[CALCITE-2908] Implement SQL LAST_DAY function#1099
Merged
asereda-gs merged 1 commit intoapache:masterfrom Mar 25, 2019
Merged
Conversation
dc4a9d5 to
493f53b
Compare
xndai
reviewed
Mar 11, 2019
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java
Show resolved
Hide resolved
asereda-gs
requested changes
Mar 11, 2019
site/_docs/reference.md
Outdated
| | SECOND(date) | Equivalent to `EXTRACT(SECOND FROM date)`. Returns an integer between 0 and 59. | ||
| | TIMESTAMPADD(timeUnit, integer, datetime) | Returns *datetime* with an interval of (signed) *integer* *timeUnit*s added. Equivalent to `datetime + INTERVAL 'integer' timeUnit` | ||
| | TIMESTAMPDIFF(timeUnit, datetime, datetime2) | Returns the (signed) number of *timeUnit* intervals between *datetime* and *datetime2*. Equivalent to `(datetime2 - datetime) timeUnit` | ||
| | LAST_DAY(date) | Returns the date of the last day of the month in a value of datatype DATE |
Member
There was a problem hiding this comment.
Pls provide an example:
2020-02-10 -> 2020-02-29(DATE type)2020-02-10 10:10:10 -> 2020-02-29(TIMESTAMP type)
493f53b to
52eb06d
Compare
Contributor
Author
Contributor
Author
|
@julianhyde, @asereda-gs, @xndai Much appreciated. The PR is updated addressing all your comments. |
52eb06d to
00bf407
Compare
Member
|
@chunweilei I will merge it after 1.19 release. There is currently a freeze during release. |
Contributor
Author
|
@asereda-gs Got it. Thanks a lot. |
Member
|
Thank you! |
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.
No description provided.