silundong commented on code in PR #4770:
URL: https://github.com/apache/calcite/pull/4770#discussion_r2725531614
##########
core/src/test/resources/sql/new-decorr.iq:
##########
@@ -205,4 +205,15 @@ EnumerableCalc(expr#0..3=[{inputs}], DEPTNO=[$t0],
EXPR$0=[$t2])
!plan
!}
+# [CALCITE-7397] TopDownGeneralDecorrelator can cause nullable property
mismatches
Review Comment:
I noticed from the error message that after the subquery was removed the
condition of left mark join was FALSE, I think this is the root cause. When the
`IN` subquery is converted to a left mark join, its join condition originally
looks like `CAST(NULL AS int) = $x`. However, inside `builder.join` the join
condition is simplified using an “UNKNOWN AS FALSE” policy. But for a mark
join, the marker is a three-valued-logic boolean, so strictly speaking the
join condition should be simplified to `NULL::BOOLEAN`, so maybe we should use
“UNKNOWN AS UNKNOWN ” policy for lelf mark join.
--
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]