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

pkg/planner, tests: set the AvoidColumnEvaluator correctly in ProjectionElimination #55219

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

XuHuaiyu
Copy link
Contributor

@XuHuaiyu XuHuaiyu commented Aug 6, 2024

What problem does this PR solve?

Issue Number: close #52985

Problem Summary:
The AvoidColumnEvaluator attribute in the Projection operator is used to avoid the incorrect reuse of chunks with different metadata. During the projection elimination optimization process, the setting of the AvoidColumnEvaluator attribute must be preserved if any of the consecutive projections have it set to true.

What changed and how does it work?

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.

Fixed an issue where certain queries were producing incorrect results. This was caused by a bug in the query processing logic related to the handling of projection operators and column evaluations.

@XuHuaiyu XuHuaiyu added type/bugfix This PR fixes a bug. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. labels Aug 6, 2024
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 6, 2024
Copy link

tiprow bot commented Aug 6, 2024

Hi @XuHuaiyu. 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-sigs/prow repository.

@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 Aug 6, 2024
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 6, 2024
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.8858%. Comparing base (1985662) to head (c4844c4).
Report is 17 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55219        +/-   ##
================================================
+ Coverage   74.7018%   74.8858%   +0.1840%     
================================================
  Files          1570       1574         +4     
  Lines        364706     443925     +79219     
================================================
+ Hits         272442     332437     +59995     
- Misses        72471      91216     +18745     
- Partials      19793      20272       +479     
Flag Coverage Δ
integration 49.5190% <100.0000%> (?)
unit 71.9392% <100.0000%> (-1.6240%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) ⬇️
parser ∅ <ø> (∅)
br 52.5020% <ø> (+4.8478%) ⬆️

Copy link

ti-chi-bot bot commented Aug 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 7, 2024
Copy link

ti-chi-bot bot commented Aug 7, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-06 07:55:38.665504845 +0000 UTC m=+338668.532603928: ☑️ agreed by wshwsh12.
  • 2024-08-07 06:48:08.383493554 +0000 UTC m=+421018.250592652: ☑️ agreed by AilinKid.

@AilinKid
Copy link
Contributor

AilinKid commented Aug 7, 2024

/retest-required

Copy link

tiprow bot commented Aug 7, 2024

@AilinKid: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest-required

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-sigs/prow repository.

@hawkingrei
Copy link
Member

/retest
/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Aug 7, 2024
@ti-chi-bot ti-chi-bot bot merged commit 724b7ed into pingcap:master Aug 7, 2024
22 of 23 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #55267.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #55268.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #55269.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.1: #55270.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #55271.

hawkingrei pushed a commit to hawkingrei/tidb that referenced this pull request Aug 8, 2024
@XuHuaiyu XuHuaiyu removed needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. 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. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unioned query with var_pop over window may lead to incorrect result
5 participants