Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Dec 26, 2025

Why I'm doing:

What I'm doing:

  • remove PRUNE_ASSERT_ROW_RULES, but add same logical in ScalarApply2JoinRule, to limited assert_row generate
  • EliminateJoinWithConstantRule support PROJECT-VALUE pattern
  • PruneEmptyJoinRule support PROJECT-VALUE pattern

Fixes #56000

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.5
    • 3.4
    • 3.3

This is an automatic backport of pull request #60814 done by [Mergify](https://mergify.com).

@mergify
Copy link
Contributor Author

mergify bot commented Dec 26, 2025

Cherry-pick of 5b96255 has failed:

On branch mergify/bp/branch-3.5/pr-60814
Your branch is up to date with 'origin/branch-3.5'.

You are currently cherry-picking commit 5b96255b85.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/QueryOptimizer.java
	modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/SPMOptimizer.java
	modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/RuleSet.java
	modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/RuleType.java
	deleted:    fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/transformation/PruneAssertOneRowRule.java
	modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/transformation/PruneEmptyJoinRule.java
	modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/transformation/ScalarApply2JoinRule.java
	modified:   fe/fe-core/src/test/java/com/starrocks/sql/plan/AggregateTest.java
	modified:   fe/fe-core/src/test/java/com/starrocks/sql/plan/HiveTPCHPlanTest.java
	modified:   fe/fe-core/src/test/java/com/starrocks/sql/plan/JoinTest.java
	modified:   fe/fe-core/src/test/java/com/starrocks/sql/plan/OrderByTest.java
	modified:   fe/fe-core/src/test/java/com/starrocks/sql/plan/ReplayFromDumpTest.java
	modified:   fe/fe-core/src/test/java/com/starrocks/sql/plan/SelectConstTest.java
	modified:   fe/fe-core/src/test/java/com/starrocks/sql/plan/SubqueryTest.java
	modified:   fe/fe-core/src/test/resources/sql/enumerate-plan/tpch-q11.sql
	modified:   fe/fe-core/src/test/resources/sql/enumerate-plan/tpch-q15.sql
	modified:   fe/fe-core/src/test/resources/sql/enumerate-plan/tpch-q22.sql
	modified:   fe/fe-core/src/test/resources/sql/external/hive/tpch/q11.sql
	modified:   fe/fe-core/src/test/resources/sql/external/hive/tpch/q15.sql
	modified:   fe/fe-core/src/test/resources/sql/external/hive/tpch/q22.sql
	modified:   fe/fe-core/src/test/resources/sql/materialized-view/tpch-hive/q11.sql
	modified:   fe/fe-core/src/test/resources/sql/materialized-view/tpch-hive/q15.sql
	modified:   fe/fe-core/src/test/resources/sql/materialized-view/tpch-hive/q22.sql
	modified:   fe/fe-core/src/test/resources/sql/subquery/scalar-subquery.sql
	modified:   fe/fe-core/src/test/resources/sql/tpch-histogram-cost/q15.sql
	modified:   fe/fe-core/src/test/resources/sql/tpch-histogram-cost/q22.sql
	modified:   fe/fe-core/src/test/resources/sql/tpch/q11.sql
	modified:   fe/fe-core/src/test/resources/sql/tpch/q15.sql
	modified:   fe/fe-core/src/test/resources/sql/tpch/q22.sql
	modified:   fe/fe-core/src/test/resources/sql/tpchcost/q11.sql
	modified:   fe/fe-core/src/test/resources/sql/tpchcost/q15.sql
	modified:   fe/fe-core/src/test/resources/sql/tpchcost/q22.sql

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/NonDeterministicVisitor.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/transformation/EliminateJoinWithConstantRule.java
	both modified:   fe/fe-core/src/test/resources/sql/scheduler/tpch/q22.sql

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the conflicts label Dec 26, 2025
@wanpengfei-git wanpengfei-git enabled auto-merge (squash) December 26, 2025 01:33
@mergify mergify bot closed this Dec 26, 2025
auto-merge was automatically disabled December 26, 2025 01:33

Pull request was closed

@mergify
Copy link
Contributor Author

mergify bot commented Dec 26, 2025

@mergify[bot]: Backport conflict, please reslove the conflict and resubmit the pr

@mergify
Copy link
Contributor Author

mergify bot commented Dec 26, 2025

🧪 CI Insights

Here's what we observed from your CI run for 363748c.

🟢 All jobs passed!

But CI Insights is watching 👀

@Seaven Seaven reopened this Dec 26, 2025
@wanpengfei-git wanpengfei-git enabled auto-merge (squash) December 26, 2025 03:55
@Seaven Seaven force-pushed the mergify/bp/branch-3.5/pr-60814 branch from 50ecd0e to da0be27 Compare December 26, 2025 06:23
yingtingdong
yingtingdong previously approved these changes Dec 26, 2025
@Seaven Seaven changed the title [Enhancement] optimize constant value cte&subquery (backport #60814) [BugFix] optimize constant value cte&subquery (backport #60814) Dec 26, 2025
@Seaven Seaven force-pushed the mergify/bp/branch-3.5/pr-60814 branch from 8f712d0 to 6853dbd Compare December 26, 2025 08:12
Signed-off-by: Seaven <[email protected]>
@Seaven Seaven force-pushed the mergify/bp/branch-3.5/pr-60814 branch from 6853dbd to 363748c Compare December 26, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants