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: add projections to keep join keys as col=col #52989

Merged
merged 11 commits into from May 6, 2024

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Apr 29, 2024

What problem does this PR solve?

Issue Number: close #46556

Problem Summary: planner: add projections to keep join keys as col=col

What changed and how does it work?

In some cases, after creating new EQ function, the 2 args might not be column anymore, which breaks the assumption that join eq keys must be col=col, to handle this, inject 2 projections.

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-triage-completed release-note-none sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels Apr 29, 2024
Copy link

tiprow bot commented Apr 29, 2024

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

@qw4990 qw4990 added the type/bug-fix This PR fixes a bug. label Apr 29, 2024
Copy link

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.9319%. Comparing base (5333ac3) to head (8b3ce50).
Report is 12 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #52989         +/-   ##
=================================================
- Coverage   72.3746%   55.9319%   -16.4428%     
=================================================
  Files          1482       1614        +132     
  Lines        428762     605243     +176481     
=================================================
+ Hits         310315     338524      +28209     
- Misses        99149     243441     +144292     
- Partials      19298      23278       +3980     
Flag Coverage Δ
integration 37.1360% <21.7391%> (?)
unit 70.9568% <100.0000%> (-0.2535%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 50.7957% <ø> (+9.6176%) ⬆️

rightPlan, lCol = s.injectExpr(rightPlan, newSf.GetArgs()[1])
}
leftNode, rightNode = leftPlan, rightPlan
newSf = expression.NewFunctionInternal(s.ctx.GetExprCtx(), ast.EQ, edge.GetType(),
Copy link
Contributor

Choose a reason for hiding this comment

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

What is SF means ? Scalar Function ?

Copy link
Contributor

@elsa0520 elsa0520 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Apr 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

Copy link

ti-chi-bot bot commented Apr 30, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-30 06:53:41.505572301 +0000 UTC m=+340175.262707872: ☑️ agreed by elsa0520.
  • 2024-04-30 08:39:48.397003979 +0000 UTC m=+346542.154139553: ☑️ agreed by AilinKid.

@hawkingrei
Copy link
Member

/retest

1 similar comment
@qw4990
Copy link
Contributor Author

qw4990 commented May 6, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit 06ee59b into pingcap:master May 6, 2024
21 of 23 checks passed
3AceShowHand pushed a commit to 3AceShowHand/tidb that referenced this pull request May 7, 2024
@qw4990
Copy link
Contributor Author

qw4990 commented May 16, 2024

/cherry-pick release-8.1

@ti-chi-bot
Copy link
Member

@qw4990: new pull request created to branch release-8.1: #53326.

In response to this:

/cherry-pick release-8.1

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.

ti-chi-bot bot pushed a commit that referenced this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.1 approved lgtm release-note-none sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/bug-fix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR 1105 (HY000): interface conversion
5 participants