adriangb commented on code in PR #25560:
URL: https://github.com/apache/datafusion/pull/25560#discussion_r4097836860


##########
datafusion/optimizer/src/decorrelate_predicate_subquery.rs:
##########
@@ -234,7 +297,7 @@ fn in_subquery_value_mark_join(
         .map_or(plan_err!("single expression required."), Ok)?;
     let in_predicate = Expr::eq(expr.clone(), output_expr.clone());
     let Some((matched_plan, matched)) =
-        mark_join(left, subquery, Some(&in_predicate), false, alias)?
+        mark_join(left, subquery, Some(&in_predicate), false, alias, true)?

Review Comment:
   Good catch, thanks. `matched` only goes into `WHEN matched THEN true`, so a 
NULL mark and a FALSE mark give the same result there. The value join therefore 
does not need null-aware semantics under the rule this PR uses. I changed it to 
`false` in this PR instead of a follow-up, and added a comment at the call site.
   
   I also added an EXPLAIN pin and a result check for your query in 
`null_aware_mark_join.slt`. The value join is now a `HashJoinExec` with 
`join_type=RightMark` and no `null_aware`. If I put back `true`, only the plan 
assertion fails and the results do not change. That matches what you saw.



-- 
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]

Reply via email to