Skip to content

[CALCITE-2908] Implement SQL LAST_DAY function#1099

Merged
asereda-gs merged 1 commit intoapache:masterfrom
chunweilei:support_last_day
Mar 25, 2019
Merged

[CALCITE-2908] Implement SQL LAST_DAY function#1099
asereda-gs merged 1 commit intoapache:masterfrom
chunweilei:support_last_day

Conversation

@chunweilei
Copy link
Contributor

No description provided.

@chunweilei chunweilei changed the title [CALCITE-2908] Implement SQL LAST_DAT function [CALCITE-2908] Implement SQL LAST_DAY function Mar 11, 2019
| 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls provide an example:

  1. 2020-02-10 -> 2020-02-29 (DATE type)
  2. 2020-02-10 10:10:10 -> 2020-02-29 (TIMESTAMP type)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

@chunweilei
Copy link
Contributor Author

@chunweilei
Copy link
Contributor Author

@julianhyde, @asereda-gs, @xndai Much appreciated. The PR is updated addressing all your comments.

@asereda-gs asereda-gs added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Mar 12, 2019
@asereda-gs
Copy link
Member

@chunweilei I will merge it after 1.19 release. There is currently a freeze during release.

@chunweilei
Copy link
Contributor Author

@asereda-gs Got it. Thanks a lot.

@asereda-gs asereda-gs merged commit 25ffeb4 into apache:master Mar 25, 2019
@asereda-gs
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants