-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[enhance](mtmv)Mtmv datetrunc support week and quarter #39286
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
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
TPC-H: Total hot run time: 39866 ms |
TPC-DS: Total hot run time: 189468 ms |
ClickBench: Total hot run time: 30.77 s |
|
run cloud_p1 |
| result = value.plusYears(1L); | ||
| break; | ||
| case "quarter": | ||
| result = value.plusMonths(3L); |
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.
why add 3 month, can add some comment to explain this
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 quarter = 3month
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.
value not have plusQuarter method,so use plusMonths(3L);
|
PR approved by anyone and no changes requested. |
|
PR approved by at least one committer and no changes requested. |
if base table have 3 partitions:
PARTITION p_20200101 VALUES [("2020-01-01"),("2020-01-02")),
PARTITION p_20200102 VALUES [("2020-01-02"),("2020-01-03")),
PARTITION p_20200108 VALUES [("2020-01-08"),("2020-01-09"))
mtmv partition date_trunc(week)
mtmv will have 2 partitions
[("2019-12-30"),("2020-01-06"))
[("2020-01-06"),("2020-01-13"))
if base table have 3 partitions:
PARTITION p_20200101 VALUES [("2020-01-01"),("2020-01-02")),
PARTITION p_20200102 VALUES [("2020-01-02"),("2020-01-03")),
PARTITION p_20200108 VALUES [("2020-01-08"),("2020-01-09"))
mtmv partition date_trunc(week)
mtmv will have 2 partitions
[("2019-12-30"),("2020-01-06"))
[("2020-01-06"),("2020-01-13"))
if base table have 3 partitions:
PARTITION p_20200101 VALUES [("2020-01-01"),("2020-01-02")),
PARTITION p_20200102 VALUES [("2020-01-02"),("2020-01-03")),
PARTITION p_20200108 VALUES [("2020-01-08"),("2020-01-09"))
mtmv partition date_trunc(week)
mtmv will have 2 partitions
[("2019-12-30"),("2020-01-06"))
[("2020-01-06"),("2020-01-13"))
if base table have 3 partitions:
mtmv partition date_trunc(week)
mtmv will have 2 partitions