-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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 SMJ hint, support SMJ with descending order. #14505
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -199,7 +199,7 @@ func (p *LogicalJoin) getEnforcedMergeJoin(prop *property.PhysicalProperty) []Ph | |||
// Check whether SMJ can satisfy the required property | |||
offsets := make([]int, 0, len(p.LeftJoinKeys)) | |||
all, desc := prop.AllSameOrder() | |||
if !all { | |||
if !all || desc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ban the descent merge join plan? It seems to change it in the executor is not hard. Only keep similar with index merge join is ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we want a quick fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just release v3.0.9, and there is still time for fixing th executor before v3.0.10. Can we just fix the root cause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, I'll fix it soon.
/run-all-tests |
@lzmhhh123 @francis0407 PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Your auto merge job has been accepted, waiting for 14496 |
@ichn-hu merge failed. |
/merge |
/run-all-tests |
@ichn-hu merge failed. |
/run-all-tests |
It's wield, it fails UT every time with different test cases all seemingly not related to the modification I've made... This time it is https://internal.pingcap.net/idc-jenkins/blue/rest/organizations/jenkins/pipelines/tidb_ghpr_unit_test/runs/22727/nodes/67/log/?start=0 |
/merge |
/run-all-tests |
@ichn-hu merge failed. |
/merge |
/run-all-tests |
cherry pick to release-3.0 failed |
cherry pick to release-2.1 failed |
) cherry-pick "planner: Fix SMJ hint, support SMJ with descending order. pingcap#14505" to 2.1
Codecov Report
@@ Coverage Diff @@
## master #14505 +/- ##
===========================================
Coverage ? 80.2454%
===========================================
Files ? 495
Lines ? 127115
Branches ? 0
===========================================
Hits ? 102004
Misses ? 16968
Partials ? 8143 |
It seems that, not for sure, we failed to cherry-pick this commit to release-2.1 release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @ichn-hu PTAL. |
What problem does this PR solve?
This PR fixes #14483, fixes #14506
What is changed and how it works?
Do not create SMJ physical plan if PhysicalProperty has desc equals to true.
Check List
Tests
Side effects
Release note