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: a quick fix to solve the column alias in ORDER BY's subquery #45003

Merged
merged 5 commits into from
Jun 29, 2023

Conversation

winoros
Copy link
Member

@winoros winoros commented Jun 27, 2023

What problem does this PR solve?

Issue Number: close #42732

Problem Summary:

What is changed and how it works?

The column alias is not seeable in ORDER BY's subquery clause.

This pr provides a quick way to fix the issue.

It's not the final solution to the AST resolution problems.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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 release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. 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. and removed do-not-merge/needs-triage-completed labels Jun 27, 2023
@winoros
Copy link
Member Author

winoros commented Jun 27, 2023

/test check-dev2

@winoros
Copy link
Member Author

winoros commented Jun 27, 2023

/test tiprow_fast_test

@pingcap pingcap deleted a comment from tiprow bot Jun 27, 2023
@pingcap pingcap deleted a comment from ti-chi-bot bot Jun 27, 2023
@@ -9,7 +9,7 @@ go_test(
],
flaky = True,
race = "on",
shard_count = 4,
shard_count = 5,
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems that the shard will increase as the test increase. The maximum number of the shard is 50.

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 29, 2023
Copy link
Contributor

@fixdb fixdb left a comment

Choose a reason for hiding this comment

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

+1

@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 29, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 29, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fixdb, time-and-fate

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 29, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 29, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-06-29 11:56:55.079251091 +0000 UTC m=+298.453828935: ☑️ agreed by time-and-fate.
  • 2023-06-29 19:26:30.463118874 +0000 UTC m=+27273.837696724: ☑️ agreed by fixdb.

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 29, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 29, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 29, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Column alias is not propagated to subquery
4 participants