Skip to content

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented May 26, 2025

What problem does this PR solve?

Issue Number: close #45785

Problem Summary:

after #58962 and #58261, we have an ability to optimize the OR expression. But when to meet LogicalJoin, we should optimize the condition.

What changed and how does it work?

predicate simplification when to push down the predicate with join.

PPDSolver is earlier than the PredicateSimplification. So it is possible to better optimize the join conditions. If we implement the PredicateSimplification for join. It will have many problems. it is an example #61320

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

planner: predicate simplification when to push down predicate with join 

在 Join 里处理谓语下堆的时候,简化谓语

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-tests-checked sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 26, 2025
@hawkingrei
Copy link
Member Author

/retest

Signed-off-by: Weizhen Wang <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 26, 2025
Signed-off-by: Weizhen Wang <[email protected]>
Copy link

codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.0592%. Comparing base (6d7cb93) to head (10c0624).
Report is 11 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61316        +/-   ##
================================================
+ Coverage   73.1703%   74.0592%   +0.8889%     
================================================
  Files          1726       1726                
  Lines        478552     482881      +4329     
================================================
+ Hits         350158     357618      +7460     
+ Misses       106918     103873      -3045     
+ Partials      21476      21390        -86     
Flag Coverage Δ
integration 42.9699% <100.0000%> (?)
unit 72.9736% <100.0000%> (+0.5392%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 48.3843% <ø> (+0.8113%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hawkingrei hawkingrei changed the title planner: predicate simplification when to push down predicate with join planner: predicate simplification when to push down predicate with join | tidb-test=pr/2520 May 26, 2025
@hawkingrei
Copy link
Member Author

/retest

@hawkingrei hawkingrei requested review from winoros and AilinKid May 26, 2025 08:25
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 26, 2025
Copy link

ti-chi-bot bot commented May 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, winoros

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 27, 2025
Copy link

ti-chi-bot bot commented May 27, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-05-26 11:55:41.734802975 +0000 UTC m=+270072.106590433: ☑️ agreed by winoros.
  • 2025-05-27 06:38:55.325885234 +0000 UTC m=+337465.697672691: ☑️ agreed by AilinKid.

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels May 27, 2025
@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 842c88b into pingcap:master May 27, 2025
24 checks passed
winoros pushed a commit to winoros/tidb that referenced this pull request Jun 11, 2025
@winoros winoros mentioned this pull request Jun 11, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eliminate or 1=0 condition in logic plan optimization stage
3 participants