saadtajwar commented on code in PR #23957:
URL: https://github.com/apache/datafusion/pull/23957#discussion_r3670307488
##########
datafusion/physical-plan/src/joins/hash_join/exec.rs:
##########
@@ -422,9 +425,14 @@ impl HashJoinExecBuilder {
// Validate null_aware flag
if exec.null_aware {
let join_type = exec.join_type();
- if !matches!(join_type, JoinType::LeftAnti) {
+ let partition_mode = exec.partition_mode();
+ if !matches!(
+ (join_type, partition_mode),
+ (JoinType::LeftAnti, _)
+ | (JoinType::RightAnti, PartitionMode::CollectLeft) //
`PartitionMode::CollectLeft` is safe because `RightAnti` is probe-driven
Review Comment:
Do we need the `partition_mode` check for `CollectLeft` here? Or should we
just count on it being enforced/never chosen as anything but `CollectLeft`
beforehand? I suppose it's possible to explicitly create a plan with a
different partition mode if you bypass the SQL -> plan frontend and create
directly?
--
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]