github-actions[bot] commented on code in PR #62527:
URL: https://github.com/apache/doris/pull/62527#discussion_r3088104951
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/JoinUtils.java:
##########
@@ -405,7 +405,7 @@ public static boolean canEliminateByFk(LogicalJoin<?, ?>
join, Plan primaryPlan,
public static boolean canEliminateByLeft(LogicalJoin<?, ?> join, DataTrait
rightFuncDeps) {
if (join.getJoinType().isLeftOuterJoin() ||
join.getJoinType().isAsofLeftOuterJoin()) {
Pair<Set<Slot>, Set<Slot>> njHashKeys =
join.extractNullRejectHashKeys();
- if (!join.getOtherJoinConjuncts().isEmpty() || njHashKeys == null)
{
+ if (njHashKeys == null) {
Review Comment:
Blocking: `JoinUtils.canEliminateByLeft()` is shared with the normal
`EliminateJoinByUnique` rewrite, not only with `HyperGraphComparator`. After
removing the `otherJoinConjuncts` guard here, a plain query like `select t1.id1
from t1 left join t2 on t1.id1 = t2.id2 and assert_true(false, ...)` becomes
eligible for `ELIMINATE_JOIN_BY_UK`. That rule rewrites `project(join)` to
`project(left)` and never preserves or evaluates the extra `ON` predicate, so
the query can return rows instead of raising the `assert_true` error. The
relaxation should stay in the MV path, or the standalone rewrite needs its own
semantic checks and tests for observable extra `ON` predicates.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]