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

planner: fix ExtractCorrelatedCols method in PhysicalTableScan (cherry-pick #51205) #51208

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

Lloyd-Pottiger
Copy link
Contributor

@Lloyd-Pottiger Lloyd-Pottiger commented Feb 20, 2024

What problem does this PR solve?

Issue Number: close #51204

Problem Summary:

What changed and how does it work?

Before, we do not try to extract correlated column in LateMaterializationFilterCondition. So when the correlated columns only in LateMaterializationFilterCondition, exprs failed to fill in correlated column with constant value during Plan2Pb, and it leads to wrong query result.

Now, in ExtractCorrelatedCols method, we will also try to extract correlated column in LateMaterializationFilterCondition.

Also fix other methods.

Check List

Currently, integration test do not support TiFlash, so I will add tests in https://github.com/pingcap/tiflash later

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.

Fix wrong query result of Apply operator when there are correlated column in push down conditions

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/cherry-pick-not-approved size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 20, 2024
Copy link

tiprow bot commented Feb 20, 2024

Hi @Lloyd-Pottiger. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@JaySon-Huang
Copy link
Contributor

please update the "Problem Summary" and "Release note"

@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 Feb 20, 2024
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

❗ No coverage uploaded for pull request base (release-7.5@b31b3e5). Click here to learn what that means.
The diff coverage is 25.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-7.5     #51208   +/-   ##
================================================
  Coverage               ?   71.9763%           
================================================
  Files                  ?       1404           
  Lines                  ?     408105           
  Branches               ?          0           
================================================
  Hits                   ?     293739           
  Misses                 ?      94615           
  Partials               ?      19751           
Flag Coverage Δ
unit 71.9763% <25.0000%> (?)

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

Components Coverage Δ
dumpling 53.9913% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 53.2107% <0.0000%> (?)

@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Feb 21, 2024
Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 21, 2024
Copy link

ti-chi-bot bot commented Feb 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SeaRise, windtalker

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 Feb 21, 2024
Copy link

ti-chi-bot bot commented Feb 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-21 01:18:15.374378587 +0000 UTC m=+406384.122001698: ☑️ agreed by windtalker.
  • 2024-02-21 02:28:34.34076959 +0000 UTC m=+410603.088392701: ☑️ agreed by SeaRise.

@hawkingrei
Copy link
Member

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 21, 2024
@hawkingrei
Copy link
Member

You should merge #51205 first and add some tests for it.

@hawkingrei
Copy link
Member

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 21, 2024
@ti-chi-bot ti-chi-bot bot merged commit 074d6d1 into pingcap:release-7.5 Feb 21, 2024
16 of 18 checks passed
@Lloyd-Pottiger Lloyd-Pottiger deleted the fix-lm-cor-7.5 branch February 21, 2024 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants