-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature] Support function next_day #21024
Conversation
fe/fe-core/src/test/java/com/starrocks/sql/optimizer/rewrite/ScalarOperatorFunctionsTest.java
Show resolved
Hide resolved
you also need to sign off this PR by |
I have commit with sign but DCO check also failed. |
|
test/sql/test_time_fn/T/test_time_fn
Outdated
SELECT next_day('2023-04-05', 'Mo'); | ||
SELECT next_day('2023-04-05', 'Tue'); | ||
SELECT next_day('2023-04-05', 'Wednesday'); | ||
SELECT next_day('2023-04-05 20:13:14', 'Thursday'); | ||
SELECT d1, next_day(d1, 'Fr'), d2, next_day(d2, 'Fr') FROM next_day_test order by d1; | ||
SELECT d1, next_day(d1, 'Sat'), d2, next_day(d2,'Sat') FROM next_day_test order by d1; | ||
SELECT d1, next_day(d1, 'Sunday'), d2, next_day(d2, 'Sunday') FROM next_day_test order by d1; |
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.
please add more tests:
- abnormal tests, for example the data fromat or dow format is not right;
- some special tests, like 2/29 or 2/28 in LEAP year or not.
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.
- inputs with null
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.
And add some test cases, where the second parameter DOW
is from table not a constant value.
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.
1.abnormal tests
2.special tests (LEAP year, LEAP month)
3.null
4.DOW
is from table (date and dow from same/different table)
I have added the above cases to the 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.
pleas add doc
Signed-off-by: gengjun-git <gengjun@starrocks.com> Signed-off-by: mlimwxxnn <534370904@qq.com>
…ks#20921) Signed-off-by: mlimwxxnn <534370904@qq.com>
Signed-off-by: Youngwb <yangwenbo_mailbox@163.com> Signed-off-by: mlimwxxnn <534370904@qq.com>
…bution (StarRocks#20901) If FeConstants.AUTO_DISTRIBUTION_UNIT is not evenly divided by the data size, we should round up the result to an integer. Signed-off-by: mlimwxxnn <534370904@qq.com>
…les of the materialized view (StarRocks#20926) Signed-off-by: Astralidea <astralidea@163.com> Signed-off-by: mlimwxxnn <534370904@qq.com>
* [Doc] update ANALYZE TABLE manual collection Signed-off-by: evelynzhaojie <everlyn.zhaojie@gmail.com> * Update resource_group.md * [Doc] update ANALYZE TABLE manual collection Signed-off-by: evelynzhaojie <everlyn.zhaojie@gmail.com> * Update resource_group.md * [Doc] 3.0 privilege * [Doc] 3.0 privilege * Update TOC.md * minor fixes * [Doc] update 3.0 doc - privilege * add commands --------- Signed-off-by: evelynzhaojie <everlyn.zhaojie@gmail.com> Signed-off-by: mlimwxxnn <534370904@qq.com>
fix demo sql-tester cases Signed-off-by: AndyZiYe <yeziyu@starrocks.com> Signed-off-by: mlimwxxnn <534370904@qq.com>
Signed-off-by: amber-create <yangyanping@starrocks.com> Signed-off-by: mlimwxxnn <534370904@qq.com>
Signed-off-by: hellolilyliuyi <hellolilyliuyi123@163.com> Signed-off-by: mlimwxxnn <534370904@qq.com>
Signed-off-by: mlimwxxnn <534370904@qq.com>
Signed-off-by: mlimwxxnn <534370904@qq.com>
Signed-off-by: mlimwxxnn <534370904@qq.com>
Signed-off-by: mlimwxxnn <534370904@qq.com>
What type of PR is this:
Which issues of this PR fixes :
Fixes #19553
Problem Summary(Required) :
NEW FUNCTION:
next_day
Test sql:
Checklist:
Bugfix cherry-pick branch check: