Skip to content

Conversation

@terry1purcell
Copy link
Contributor

@terry1purcell terry1purcell commented Aug 26, 2025

What problem does this PR solve?

Issue Number: close #51116

Problem Summary:

What changed and how does it work?

Customer requirement to allow decorrelation of subqueries in the select list. Added a variable to control this behavior.

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.

None

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

tiprow bot commented Aug 26, 2025

Hi @terry1purcell. 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.

@terry1purcell
Copy link
Contributor Author

/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 26, 2025
@codecov
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 84.78261% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.2007%. Comparing base (d75dc0b) to head (d21f9c8).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #63204        +/-   ##
================================================
+ Coverage   72.7831%   73.2007%   +0.4176%     
================================================
  Files          1832       1832                
  Lines        495876     495984       +108     
================================================
+ Hits         360914     363064      +2150     
+ Misses       113039     111030      -2009     
+ Partials      21923      21890        -33     
Flag Coverage Δ
integration 42.0138% <78.2608%> (?)
unit 72.2609% <84.7826%> (+0.0075%) ⬆️

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

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 46.4989% <ø> (-0.0102%) ⬇️
🚀 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.

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 27, 2025
@terry1purcell terry1purcell changed the title planner: Add variable for no_decorrelate (WIP) planner: Add variable for no_decorrelate Aug 27, 2025
@terry1purcell
Copy link
Contributor Author

/retest-required

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 28, 2025
@terry1purcell terry1purcell changed the title planner: Add variable for no_decorrelate planner: Add variable for no_decorrelate in select list Aug 28, 2025
@qw4990 qw4990 self-requested a review August 29, 2025 03:17
@terry1purcell terry1purcell requested a review from qw4990 August 29, 2025 19:49
Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM, but it's better add some test cases for this.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 2, 2025
@terry1purcell
Copy link
Contributor Author

/retest-required

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

ti-chi-bot bot commented Sep 3, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-09-02 02:00:28.793809659 +0000 UTC m=+837520.671640613: ☑️ agreed by qw4990.
  • 2025-09-03 04:30:02.942591814 +0000 UTC m=+932894.820422768: ☑️ agreed by hawkingrei.

@mjonss
Copy link
Contributor

mjonss commented Sep 3, 2025

/retest

@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benmeadowcroft, hawkingrei, qw4990

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 the approved label Sep 3, 2025
@terry1purcell
Copy link
Contributor Author

/retest-required

@ti-chi-bot ti-chi-bot bot merged commit 013cacf into pingcap:master Sep 3, 2025
28 checks passed
@terry1purcell
Copy link
Contributor Author

/cherry-pick release-8.5

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 16, 2025
@ti-chi-bot
Copy link
Member

@terry1purcell: new pull request created to branch release-8.5: #63541.
But this PR has conflicts, please resolve them!

In response to this:

/cherry-pick release-8.5

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 ti-community-infra/tichi repository.

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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

planner: the optimizer can't produce an optimal plan for queries with sub-queries in select list since it always decorrelate sub-queries

6 participants