jonathanc-n commented on code in PR #13564:
URL: https://github.com/apache/datafusion/pull/13564#discussion_r1859915742
##########
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/primitive.rs:
##########
@@ -190,9 +191,13 @@ impl<T: ArrowPrimitiveType, const NULLABLE: bool>
GroupColumn
assert!(nulls.is_none(), "unexpected nulls in non nullable input");
}
- let arr = PrimitiveArray::<T>::new(ScalarBuffer::from(group_values),
nulls);
+ let arr = PrimitiveArray::<T>::new(ScalarBuffer::from(group_values),
nulls)
+ .with_data_type(data_type.clone());
+ let array_ref = Arc::new(arr) as ArrayRef;
+
// Set timezone information for timestamp
- Arc::new(arr.with_data_type(data_type))
+ adjust_output_array(&data_type, array_ref)
Review Comment:
Yeah that is what I thought as well but in
https://github.com/apache/datafusion/pull/13564/commits/ea6f77aff4ae52faef6adf961697bb589820f844
it fails due to precision/scale errors due to the original array not having
`.with_data_type` on it
--
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]