kumarUjjawal commented on code in PR #25076:
URL: https://github.com/apache/datafusion/pull/25076#discussion_r3959146040
##########
datafusion/physical-plan/src/joins/hash_join/exec.rs:
##########
@@ -7360,6 +7407,153 @@ mod tests {
Ok(())
}
+ /// Builds a two-partition probe side for the cross-partition null-aware
+ /// tests: partition 0 holds the only NULL key, partition 1 holds none.
+ fn build_two_partition_probe_with_null_in_partition_0() -> Arc<dyn
ExecutionPlan> {
+ let schema = Arc::new(Schema::new(vec![
+ Field::new("c2", DataType::Int32, true),
+ Field::new("dummy", DataType::Int32, true),
+ ]));
+ let partition_0 = RecordBatch::try_new(
+ Arc::clone(&schema),
+ vec![
+ Arc::new(Int32Array::from(vec![Some(1), None])),
+ Arc::new(Int32Array::from(vec![Some(100), Some(400)])),
+ ],
+ )
+ .unwrap();
+ let partition_1 = RecordBatch::try_new(
+ Arc::clone(&schema),
+ vec![
+ Arc::new(Int32Array::from(vec![Some(2)])),
+ Arc::new(Int32Array::from(vec![Some(200)])),
+ ],
+ )
+ .unwrap();
+ TestMemoryExec::try_new_exec(
+ &[vec![partition_0], vec![partition_1]],
+ schema,
+ None,
+ )
+ .unwrap()
+ }
+
+ /// Drains the probe partitions of `join` one after another in the given
Review Comment:
These partitions are drained sequentially, so the old implementation also
passes both orders: the NULL flag is always written before the final partition
examines it. The tests would also remain green if the counter ordering changed
back to `Relaxed`.
Could we force the failing overlap with a synchronization hook where the
non-NULL partition reads `false`, the sibling records NULL, and the non-NULL
partition then becomes last or add a model-checked atomic test? This
wrong-results race otherwise has no regression coverage.
--
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]