Skip to content
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

[BugFix] (Part 6) Fix partition_retention_condition for iceberg with partition transforms #53869

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LiShuMing
Copy link
Contributor

@LiShuMing LiShuMing commented Dec 12, 2024

Why I'm doing:

Fix bugs for mv with iceberg transforms and query_rewrite_consistency=force_mv;

What I'm doing:

  1. Fix bugs for mv with iceberg transforms and query_rewrite_consistency=force_mv:
  1. Support creating mv for list partition tables with common partition expression
  • Like mv with iceberg transforms, mv for list partition tables with common partition expression will create generated columns for each partition expression.
  • TODO: by default mv for list partition tables with common partition expression can not be used for rewrite as expected because user's query will be rewritten by generated columns. but you can SET disable_generated_column_rewrite=TRUE; to walk around to skip generated column rewrite and enable mv rewrite.

Fixes #53117
Fixes #52576

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.4
    • 3.3
    • 3.2
    • 3.1
    • 3.0

@LiShuMing LiShuMing requested review from a team as code owners December 12, 2024 09:53
@LiShuMing LiShuMing changed the title [BugFix] Fix partition_retention_condition for iceberg with partition transforms [WIP] [BugFix] Fix partition_retention_condition for iceberg with partition transforms Dec 12, 2024
@LiShuMing LiShuMing marked this pull request as draft December 12, 2024 09:57
@LiShuMing LiShuMing force-pushed the fix/main/fix_retention_condition_validation_iceberg_bug branch 2 times, most recently from 9ac94dc to b496bbf Compare December 13, 2024 08:46
@LiShuMing LiShuMing changed the title [WIP] [BugFix] Fix partition_retention_condition for iceberg with partition transforms [BugFix] Fix partition_retention_condition for iceberg with partition transforms Dec 13, 2024
@LiShuMing LiShuMing marked this pull request as ready for review December 13, 2024 08:46
@LiShuMing LiShuMing force-pushed the fix/main/fix_retention_condition_validation_iceberg_bug branch from 65c9f31 to 8b62808 Compare December 16, 2024 02:28
@LiShuMing LiShuMing changed the title [BugFix] Fix partition_retention_condition for iceberg with partition transforms [UT] [BugFix] Fix partition_retention_condition for iceberg with partition transforms Dec 16, 2024
@LiShuMing LiShuMing force-pushed the fix/main/fix_retention_condition_validation_iceberg_bug branch 2 times, most recently from 5e5ac93 to 77510dc Compare December 16, 2024 07:06
@LiShuMing LiShuMing changed the title [UT] [BugFix] Fix partition_retention_condition for iceberg with partition transforms [BugFix] Fix partition_retention_condition for iceberg with partition transforms Dec 16, 2024
@LiShuMing LiShuMing changed the title [BugFix] Fix partition_retention_condition for iceberg with partition transforms [BugFix] (Part 6) Fix partition_retention_condition for iceberg with partition transforms Dec 16, 2024
@LiShuMing LiShuMing force-pushed the fix/main/fix_retention_condition_validation_iceberg_bug branch from ea1bfa1 to 2c61eaf Compare December 17, 2024 02:48
@LiShuMing
Copy link
Contributor Author

@mergify rebase

@LiShuMing LiShuMing force-pushed the fix/main/fix_retention_condition_validation_iceberg_bug branch from 2c61eaf to de93c16 Compare December 17, 2024 09:40
Copy link
Contributor

mergify bot commented Dec 17, 2024

rebase

✅ Branch has been successfully rebased

Copy link

sonarcloud bot commented Dec 17, 2024

Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 205 / 226 (90.71%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/sql/analyzer/MaterializedViewAnalyzer.java 161 182 88.46% [811, 812, 817, 818, 852, 858, 859, 864, 865, 929, 930, 1586, 1587, 1593, 1594, 1624, 1650, 1651, 1673, 1674, 1706]
🔵 com/starrocks/scheduler/PartitionBasedMvRefreshProcessor.java 1 1 100.00% []
🔵 com/starrocks/sql/optimizer/MvRewritePreprocessor.java 3 3 100.00% []
🔵 com/starrocks/server/OlapTableFactory.java 1 1 100.00% []
🔵 com/starrocks/sql/optimizer/rule/transformation/materialization/compensation/OptCompensator.java 2 2 100.00% []
🔵 com/starrocks/sql/ast/CreateMaterializedViewStatement.java 4 4 100.00% []
🔵 com/starrocks/catalog/mv/MVTimelinessArbiter.java 16 16 100.00% []
🔵 com/starrocks/server/LocalMetastore.java 6 6 100.00% []
🔵 com/starrocks/alter/AlterMVJobExecutor.java 3 3 100.00% []
🔵 com/starrocks/sql/optimizer/rule/transformation/MaterializedViewTransparentRewriteRule.java 2 2 100.00% []
🔵 com/starrocks/sql/optimizer/rule/transformation/partition/PartitionSelector.java 5 5 100.00% []
🔵 com/starrocks/common/util/PropertyAnalyzer.java 1 1 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Support TTL for List Partition Tables and Materialized Views Support multi partition exprs for mv
1 participant