fix: update PrimitiveGroupValueBuilder to match NaN correctly in scalar equal_to#17979
Conversation
9076457 to
7dc8b9f
Compare
|
🤖 |
| #[test] | ||
| fn test_nullable_primitive_equal_to() { | ||
| let append = |builder: &mut PrimitiveGroupValueBuilder<Int64Type, true>, | ||
| let append = |builder: &mut PrimitiveGroupValueBuilder<Float32Type, true>, |
There was a problem hiding this comment.
I changed the helper method type to use float32 instead of int64 so all tests in the future that uses the helper will test that as well
| #[test] | ||
| fn test_nullable_primitive_vectorized_equal_to() { | ||
| let append = |builder: &mut PrimitiveGroupValueBuilder<Int64Type, true>, | ||
| let append = |builder: &mut PrimitiveGroupValueBuilder<Float32Type, true>, |
There was a problem hiding this comment.
likewise it seems unecessary to change this test
There was a problem hiding this comment.
I changed the helper method type to use float32 instead of int64 so all tests in the future that uses the helper will test that as well
| fn test_nullable_primitive_equal_to_internal<A, E>(mut append: A, mut equal_to: E) | ||
| where | ||
| A: FnMut(&mut PrimitiveGroupValueBuilder<Int64Type, true>, &ArrayRef, &[usize]), | ||
| A: FnMut(&mut PrimitiveGroupValueBuilder<Float32Type, true>, &ArrayRef, &[usize]), |
There was a problem hiding this comment.
I verified this test fails without the code change in this PR
assertion failed: equal_to_results[5]
thread 'aggregates::group_values::multi_group_by::primitive::tests::test_nullable_primitive_equal_to' panicked at datafusion/physical-plan/src/aggregates/group_values/multi_group_by/primitive.rs:346:9:
assertion failed: equal_to_results[5]
stack backtrace:
0: __rustc::rust_begin_unwind
at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5
1: core::panicking::panic_fmt
at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14
2: core::panicking::panic
at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:145:5
3: datafusion_physical_plan::aggregates::group_values::multi_group_by::primitive::tests::test_nullable_primitive_equal_to_internal
at ./src/aggregates/group_values/multi_group_by/primitive.rs:346:9
4: datafusion_physical_plan::aggregates::group_values::multi_group_by::primitive::tests::test_nullable_primitive_equal_to
at ./src/aggregates/group_values/multi_group_by/primitive.rs:246:9
5: datafusion_physical_plan::aggregates::group_values::multi_group_by::primitive::tests::test_nullable_primitive_equal_to::{{closure}}
at ./src/aggregates/group_values/multi_group_by/primitive.rs:226:42
6: core::ops::function::FnOnce::call_once
at /Users/andrewlamb/.rustup/toolchains/1.90.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:253:5
7: core::ops::function::FnOnce::call_once
at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/ops/function.rs:253:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.|
🤖: Benchmark completed Details
|
|
@alamb |
|
Merged as no degradation was found other than this: |
yeah, I agree this is likely noise |
will rerun to find out |
|
🤖 |
|
🤖: Benchmark completed Details
|
|
There are too much noise, making the benchmark results unreliable, can your script also print the machine you are working on (like also, is your machine a dedicated bare metal? |
It is not, it is a shared google VM
That would be sweet. I filed a ticket to track the idea: I am sorry it took me so long to respond, I wanted to give this a proper writeup |

Which issue does this PR close?
N/A
Rationale for this change
NaNare not considered equal in the scalarequal_toWhat changes are included in this PR?
Update instead of using
==tois_eqand update the tests to tests f32 instead of int64 with NaNAre these changes tested?
Yes
Are there any user-facing changes?
Just bug fix