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 having clause item that ref-ed to grouping set expression shouldn't be pushed down through Expand OP #45651

Conversation

AilinKid
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #45647

Problem Summary:

What is changed and how it works?

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.

planner: fix having clause item that ref-ed to grouping set expression shouldn't pushed down through Expand OP

@ti-chi-bot ti-chi-bot bot added release-note size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 28, 2023
@tiprow
Copy link

tiprow bot commented Jul 28, 2023

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

// Extract agg funcs from order by clause.
if sel.OrderBy != nil {
extractor.curClause = orderByClause
for _, item := range sel.OrderBy.Items {
extractor.inExpr = false
Copy link
Contributor Author

@AilinKid AilinKid Jul 28, 2023

Choose a reason for hiding this comment

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

this is for two order by item says:
[year+2, profit]
it will identify profit column with flag 'IN EXPR', just fix it here too

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #45651 (52f9d6f) into master (0e068ed) will increase coverage by 0.4487%.
Report is 5 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #45651        +/-   ##
================================================
+ Coverage   73.2002%   73.6490%   +0.4487%     
================================================
  Files          1265       1269         +4     
  Lines        390134     394892      +4758     
================================================
+ Hits         285579     290834      +5255     
+ Misses        86238      85703       -535     
- Partials      18317      18355        +38     
Flag Coverage Δ
integration 78.1388% <ø> (?)
unit 73.6412% <100.0000%> (+0.4410%) ⬆️

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

Components Coverage Δ
dumpling 54.0444% <ø> (ø)
parser 85.0295% <ø> (-0.0064%) ⬇️
br 52.0263% <ø> (+0.0356%) ⬆️

…'t pushed down through Expand OP

Signed-off-by: AilinKid <314806019@qq.com>
Signed-off-by: AilinKid <314806019@qq.com>
@AilinKid AilinKid force-pushed the fix-having-grouping-expression-not-pushed-down branch from e90ef87 to 52f9d6f Compare August 1, 2023 03:30
@ti-chi-bot ti-chi-bot bot added the lgtm label Aug 1, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qw4990, 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
Copy link

ti-chi-bot bot commented Aug 1, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-01 04:41:30.544440492 +0000 UTC m=+160374.486789016: ☑️ agreed by winoros.
  • 2023-08-01 05:38:24.84901233 +0000 UTC m=+163788.791360860: ☑️ agreed by qw4990.

@AilinKid
Copy link
Contributor Author

AilinKid commented Aug 1, 2023

/merge

@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 1, 2023

@AilinKid: We have migrated to builtin LGTM and approve plugins for reviewing.

Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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.

@AilinKid AilinKid changed the title planner: fix having clause item that ref-ed to grouping set expression shouldn't pushed down through Expand OP planner: fix having clause item that ref-ed to grouping set expression shouldn't be pushed down through Expand OP Aug 1, 2023
@ti-chi-bot ti-chi-bot bot merged commit 7c9f29b into pingcap:master Aug 1, 2023
15 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note 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.

having item ref-ed to a grouping expression shouldn't be push down through expand
3 participants