[Fix](nereids) fix leading with left join without leftside condition (#31387)
When left join with no edge in outer side, we should add outer side to minimal require of left tables Co-authored-by: libinfeng <libinfeng@selectdb.com>
This commit is contained in:
@ -162,6 +162,12 @@ public class CollectJoinConstraint implements RewriteRuleFactory {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (minLeftHand == 0L) {
|
||||
minLeftHand = leftHand;
|
||||
}
|
||||
if (minRightHand == 0L) {
|
||||
minRightHand = rightHand;
|
||||
}
|
||||
|
||||
JoinConstraint newJoinConstraint = new JoinConstraint(minLeftHand, minRightHand, leftHand, rightHand,
|
||||
join.getJoinType(), isStrict);
|
||||
|
||||
Reference in New Issue
Block a user