From 76ec4f937002d0d06531cafe2a8cb69b9a7e7cfb Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Mon, 2 Dec 2024 14:05:47 -0500 Subject: [PATCH] Add missing data type --- .../tests/fuzz_cases/aggregation_fuzzer/data_generator.rs | 7 +------ .../aggregates/group_values/multi_group_by/primitive.rs | 8 ++++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/datafusion/core/tests/fuzz_cases/aggregation_fuzzer/data_generator.rs b/datafusion/core/tests/fuzz_cases/aggregation_fuzzer/data_generator.rs index a3a8271ba8d3..e4c0cb6fe77f 100644 --- a/datafusion/core/tests/fuzz_cases/aggregation_fuzzer/data_generator.rs +++ b/datafusion/core/tests/fuzz_cases/aggregation_fuzzer/data_generator.rs @@ -87,12 +87,7 @@ impl DatasetGeneratorConfig { .iter() .filter_map(|d| { if d.column_type.is_numeric() - && !matches!( - d.column_type, - DataType::Float32 - | DataType::Float64 - | DataType::Decimal128(_, _) - ) + && !matches!(d.column_type, DataType::Float32 | DataType::Float64) { Some(d.name.as_str()) } else { diff --git a/datafusion/physical-plan/src/aggregates/group_values/multi_group_by/primitive.rs b/datafusion/physical-plan/src/aggregates/group_values/multi_group_by/primitive.rs index 4686a78f24b0..4ceeb634bad2 100644 --- a/datafusion/physical-plan/src/aggregates/group_values/multi_group_by/primitive.rs +++ b/datafusion/physical-plan/src/aggregates/group_values/multi_group_by/primitive.rs @@ -200,10 +200,10 @@ impl GroupColumn let first_n_nulls = if NULLABLE { self.nulls.take_n(n) } else { None }; - Arc::new(PrimitiveArray::::new( - ScalarBuffer::from(first_n), - first_n_nulls, - )) + Arc::new( + PrimitiveArray::::new(ScalarBuffer::from(first_n), first_n_nulls) + .with_data_type(self.data_type.clone()), + ) } }