File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
pkg/planner/core/operator/logicalop Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -274,22 +274,13 @@ func (p *LogicalJoin) normalizeJoinConditionsForOuterJoin() {
274274 }
275275 // Outer join ON conditions are not simplified through predicate pushdown.
276276 // Normalize only double NOT here to avoid cartesian joins caused by other conditions.
277- if ! containsUnaryNot (p .OtherConditions ) {
278- return
279- }
280277 exprCtx := p .SCtx ().GetExprCtx ()
281278 for i := range p .OtherConditions {
282- p .OtherConditions [i ] = expression .PushDownNot (exprCtx , p .OtherConditions [i ])
283- }
284- }
285-
286- func containsUnaryNot (conds []expression.Expression ) bool {
287- for _ , cond := range conds {
288- if expression .ContainOuterNot (cond ) {
289- return true
279+ if ! expression .ContainOuterNot (p .OtherConditions [i ]) {
280+ continue
290281 }
282+ p .OtherConditions [i ] = expression .PushDownNot (exprCtx , p .OtherConditions [i ])
291283 }
292- return false
293284}
294285
295286// simplifyOuterJoin transforms "LeftOuterJoin/RightOuterJoin" to "InnerJoin" if possible.
You can’t perform that action at this time.
0 commit comments