jonathanc-n commented on code in PR #13564:
URL: https://github.com/apache/datafusion/pull/13564#discussion_r1858024110


##########
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:
   The precision and scale aren't kept in the generic when constructing the 
buffer, so i think i need t keep with_data_type



-- 
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]

Reply via email to