-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[fix](fe) Fix silent semi/anti join drop caused by constrained side check skip in leading hint #65467
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
base: master
Are you sure you want to change the base?
[fix](fe) Fix silent semi/anti join drop caused by constrained side check skip in leading hint #65467
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,6 @@ | |
|
|
||
| package org.apache.doris.nereids.rules.analysis; | ||
|
|
||
| import org.apache.doris.common.Pair; | ||
| import org.apache.doris.nereids.hint.Hint; | ||
| import org.apache.doris.nereids.hint.JoinConstraint; | ||
| import org.apache.doris.nereids.hint.LeadingHint; | ||
|
|
@@ -72,8 +71,7 @@ public List<Rule> buildRules() { | |
| if (join.getJoinType().isLeftJoin()) { | ||
| filterBitMap = LongBitmap.or(filterBitMap, rightHand); | ||
| } | ||
| leading.getFilters().add(Pair.of(filterBitMap, expression)); | ||
| leading.putConditionJoinType(expression, join.getJoinType()); | ||
| leading.addFilter(filterBitMap, expression, join.getJoinType()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still lets an upper inner predicate be consumed before a lower right outer join has introduced its preserved side. In a reduced plan like:
|
||
| } | ||
| expressions = join.getOtherJoinConjuncts(); | ||
| for (Expression expression : expressions) { | ||
|
|
@@ -84,8 +82,7 @@ public List<Rule> buildRules() { | |
| if (join.getJoinType().isLeftJoin()) { | ||
| filterBitMap = LongBitmap.or(filterBitMap, rightHand); | ||
| } | ||
| leading.getFilters().add(Pair.of(filterBitMap, expression)); | ||
| leading.putConditionJoinType(expression, join.getJoinType()); | ||
| leading.addFilter(filterBitMap, expression, join.getJoinType()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
One case is a lower preserved-side ON predicate: A second case is an upper predicate over the nullable side of a lower outer join: for Please encode these outer-join dependencies in the collected bitmap/constraint state, or otherwise block |
||
| } | ||
| collectJoinConstraintList(leading, leftHand, rightHand, join, totalFilterBitMap, nonNullableSlotBitMap); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.