[improvement](fe) Support hour-offset date_add/date_sub in MTMV partition rollup#62410
Open
hakanuzum wants to merge 1 commit intoapache:masterfrom
Open
[improvement](fe) Support hour-offset date_add/date_sub in MTMV partition rollup#62410hakanuzum wants to merge 1 commit intoapache:masterfrom
hakanuzum wants to merge 1 commit intoapache:masterfrom
Conversation
…tion rollup ### What problem does this PR solve? Issue Number: close apache#62395 Related PR: None Problem Summary: MTMV partition rollup only handled `date_trunc(partition_col, unit)`. It could not track partition lineage when the MV partition expression uses hour offset conversion such as `date_trunc(date_add(k2, INTERVAL 3 HOUR), 'day')` or `date_trunc(date_sub(k2, INTERVAL 3 HOUR), 'day')`, which is needed for UTC-to-local-day partitioning and incremental maintenance. ### Release note Support MTMV partition rollup and partition increment check for `date_trunc(date_add/date_sub(partition_col, INTERVAL N HOUR), unit)`. ### Check List (For Author) - Test: Regression test / Unit Test - Unit Test: `./run-fe-ut.sh --run org.apache.doris.mtmv.MTMVRelatedPartitionDescRollUpGeneratorTest` - Build: `MVN_OPT='-Dmaven.build.cache.enabled=false' ./build.sh --fe --clean -j$(nproc)` - Regression test: `./run-regression-test.sh --run -d mtmv_p0 -s test_rollup_partition_mtmv_date_add` (failed locally because FE/BE test cluster was not started; connection refused) - Behavior changed: Yes (MTMV partition expression now supports hour-offset `date_add/date_sub` lineage under `date_trunc`) - Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Author
|
run buildall |
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.
What problem does this PR solve?
Issue Number: close #62395
Related PR: None
Problem Summary:
MTMV partition rollup only handled
date_trunc(partition_col, unit). It could not track partition lineage when the MV partition expression uses hour offset conversion such as:date_trunc(date_add(k2, INTERVAL 3 HOUR), 'day')date_trunc(date_sub(k2, INTERVAL 3 HOUR), 'day')This is needed for UTC-storage and local-day partitioning workflows.
Release note
Support MTMV partition rollup and partition increment check for
date_trunc(date_add/date_sub(partition_col, INTERVAL N HOUR), unit).Check List (For Author)
Manual test steps:
FE build:
MVN_OPT='-Dmaven.build.cache.enabled=false' ./build.sh --fe --clean -j$(nproc)FE UT:
./run-fe-ut.sh --run org.apache.doris.mtmv.MTMVRelatedPartitionDescRollUpGeneratorTestRegression case command:
./run-regression-test.sh --run -d mtmv_p0 -s test_rollup_partition_mtmv_date_addNote: regression case requires running FE/BE regression cluster. Local run failed with connection refused when cluster was not started.
Behavior changed:
date_trunc(date_add/date_sub(...), unit)lineage is now supported for MTMV partition rollup/increment check.Does this need documentation?
Check List (For Reviewer who merge this PR)