Copilot commented on code in PR #25338:
URL: https://github.com/apache/datafusion/pull/25338#discussion_r4019713654
##########
datafusion/optimizer/src/decorrelate_predicate_subquery.rs:
##########
@@ -576,7 +653,10 @@ fn build_join(
new_plan.display_indent()
);
- return Ok(Some(new_plan));
+ return Ok(Some(BuiltJoin {
+ plan: new_plan,
+ mark_is_three_valued_exact: mark_filter_is_hashable_only,
Review Comment:
`mark_filter_is_hashable_only` does not by itself make the mark exact:
`null_aware` can still be false because `join_keys_may_be_null` examines
referenced column fields rather than the join-key expressions. For example,
with a non-nullable outer `id`, `NULLIF(id, 1) IN (SELECT non_nullable_id ...)`
has a hashable filter but the left key can evaluate to NULL; this path now
returns the regular mark (`false`) instead of SQL `UNKNOWN`. Please derive
null-awareness/exactness from the extracted key expressions' nullability
(including expressions such as `NULLIF`/`TRY_CAST`), and add a result test for
a nullable expression over non-nullable inputs.
--
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]