-
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
executor: support semi join #57658
base: master
Are you sure you want to change the base?
executor: support semi join #57658
Conversation
/cc @windtalker |
pkg/executor/join/base_join_probe.go
Outdated
@@ -747,7 +763,15 @@ func NewJoinProbe(ctx *HashJoinCtxV2, workID uint, joinType logicalop.JoinType, | |||
return newOuterJoinProbe(base, !rightAsBuildSide, rightAsBuildSide) | |||
case logicalop.RightOuterJoin: | |||
return newOuterJoinProbe(base, rightAsBuildSide, rightAsBuildSide) | |||
case logicalop.SemiJoin: | |||
if len(base.rUsed) != 0 { | |||
panic("len(base.rUsed) != 0") |
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.
panic("len(base.rUsed) != 0") | |
panic("len(base.rUsed) != 0 for semi join") |
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.
done
pkg/executor/join/base_join_probe.go
Outdated
case logicalop.LeftOuterSemiJoin: | ||
if len(base.rUsed) != 0 { | ||
panic("len(base.rUsed) != 0") |
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.
panic("len(base.rUsed) != 0") | |
panic("len(base.rUsed) != 0 for lefter outer semi join") |
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.
done
return | ||
} | ||
|
||
func (s *semiJoinProbe) generateResultChkForRightBuildNoOtherCondition(resultChk *chunk.Chunk) { |
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.
return if len(s.offsets) == 0
?
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.
return if
len(s.offsets) == 0
?
done
candidateRow := tagHelper.toUnsafePointer(s.matchedRowsHeaders[s.currentProbeRow]) | ||
if isKeyMatched(meta.keyMode, s.serializedKeys[s.currentProbeRow], candidateRow, meta) { | ||
s.matchedRowsHeaders[s.currentProbeRow] = 0 | ||
s.offsets = append(s.offsets, s.usedRows[s.currentProbeRow]) |
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.
update s.currentProbeRow
here?
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.
update
s.currentProbeRow
here?
done
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
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: windtalker The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
@xzhangxian1008: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: ref #56793
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.