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] fix invalid partition predicate bug #19373

Conversation

ABingHuang
Copy link
Contributor

What type of PR is this:

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

Which issues of this PR fixes :

Fixes #19352

Problem Summary(Required) :

fix invalid partition predicate bug by removing useless predicates.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr will affect users' behaviors
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto backported to target branch
    • 3.0
    • 2.5
    • 2.4
    • 2.3

@ABingHuang ABingHuang force-pushed the issue/19352_fix_invalid_partition_predicate branch from d77d906 to 6187e02 Compare March 14, 2023 08:50
@github-actions github-actions bot removed the be-build label Mar 14, 2023
@ABingHuang ABingHuang enabled auto-merge (squash) March 14, 2023 08:51
murphyatwork
murphyatwork previously approved these changes Mar 15, 2023
Signed-off-by: ABingHuang <[email protected]>
LiShuMing
LiShuMing previously approved these changes Mar 16, 2023
@@ -1155,7 +1155,13 @@ private PredicateSplit getCompensationPredicates(RewriteContext rewriteContext,
if (srcPu == null && targetPu != null) {
// query: empid < 5
// mv: empid < 5 or salary > 100
srcPu = Utils.compoundAnd(compensationEqualPredicate, compensationPr);
if (!isQueryAgainstView) {
// compensationEqualPredicate and compensationPr is based on query, need to change it to view based
Copy link
Contributor

Choose a reason for hiding this comment

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

Why ViewAgainsQuery need to rewrite to view based?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because compensationPr is now based on query, but we need predicates based on views as input

Signed-off-by: ABingHuang <[email protected]>
Signed-off-by: ABingHuang <[email protected]>
@github-actions github-actions bot removed the be-build label Mar 16, 2023
Youngwb
Youngwb previously approved these changes Mar 16, 2023
@ABingHuang
Copy link
Contributor Author

run starrocks_admit_test

Signed-off-by: ABingHuang <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Mar 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@ABingHuang
Copy link
Contributor Author

run starrocks_admit_test

@ABingHuang
Copy link
Contributor Author

run starrocks_be_unittest

@ABingHuang
Copy link
Contributor Author

run starrocks_clang-format

@ABingHuang
Copy link
Contributor Author

run starrocks_fe_unittest

@murphyatwork
Copy link
Contributor

run all

@ABingHuang
Copy link
Contributor Author

run starrocks_fe_unittest

@ABingHuang
Copy link
Contributor Author

run starrocks_admit_test

@wanpengfei-git
Copy link
Collaborator

[FE PR Coverage Check]

😍 pass : 34 / 35 (97.14%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/sql/optimizer/rule/transformation/materialization/ColumnRewriter.java 1 2 50.00% [189]
🔵 com/starrocks/sql/optimizer/rule/transformation/materialization/MaterializedViewRewriter.java 8 8 100.00% []
🔵 com/starrocks/sql/optimizer/rule/transformation/materialization/RangeSimplifier.java 25 25 100.00% []

@ABingHuang ABingHuang merged commit 20c28b2 into StarRocks:main Mar 20, 2023
ABingHuang added a commit to ABingHuang/starrocks that referenced this pull request Mar 20, 2023
ABingHuang added a commit to ABingHuang/starrocks that referenced this pull request Mar 20, 2023
ABingHuang added a commit that referenced this pull request Mar 20, 2023
ABingHuang added a commit to ABingHuang/starrocks that referenced this pull request Mar 22, 2023
wanpengfei-git pushed a commit to ABingHuang/starrocks that referenced this pull request Mar 22, 2023
wanpengfei-git pushed a commit to ABingHuang/starrocks that referenced this pull request Mar 22, 2023
ABingHuang added a commit that referenced this pull request Mar 23, 2023
numbernumberone pushed a commit to numbernumberone/starrocks that referenced this pull request May 31, 2023
abc982627271 pushed a commit to abc982627271/starrocks that referenced this pull request Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

partition predicate is invalid
6 participants