alamb commented on code in PR #17979:
URL: https://github.com/apache/datafusion/pull/17979#discussion_r2417584731
##########
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/primitive.rs:
##########
@@ -217,22 +217,22 @@ mod tests {
use std::sync::Arc;
use
crate::aggregates::group_values::multi_group_by::primitive::PrimitiveGroupValueBuilder;
- use arrow::array::{ArrayRef, Int64Array, NullBufferBuilder};
- use arrow::datatypes::{DataType, Int64Type};
+ use arrow::array::{ArrayRef, Float32Array, Int64Array, NullBufferBuilder};
+ use arrow::datatypes::{DataType, Float32Type, Int64Type};
use super::GroupColumn;
#[test]
fn test_nullable_primitive_equal_to() {
- let append = |builder: &mut PrimitiveGroupValueBuilder<Int64Type,
true>,
+ let append = |builder: &mut PrimitiveGroupValueBuilder<Float32Type,
true>,
Review Comment:
why is this test changed?
##########
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/primitive.rs:
##########
@@ -248,15 +248,15 @@ mod tests {
#[test]
fn test_nullable_primitive_vectorized_equal_to() {
- let append = |builder: &mut PrimitiveGroupValueBuilder<Int64Type,
true>,
+ let append = |builder: &mut PrimitiveGroupValueBuilder<Float32Type,
true>,
Review Comment:
likewise it seems unecessary to change this test
##########
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/primitive.rs:
##########
@@ -274,9 +274,9 @@ mod tests {
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]),
Review Comment:
I verified this test fails without the code change in this PR
```shell
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.
```
--
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]