jayzhan211 commented on code in PR #7629:
URL: https://github.com/apache/arrow-datafusion/pull/7629#discussion_r1353803958
##########
datafusion/physical-expr/src/aggregate/bit_and_or_xor.rs:
##########
@@ -637,13 +638,14 @@ where
// 1. Stores aggregate state in `ScalarValue::List`
// 2. Constructs `ScalarValue::List` state from distinct numeric
stored in hash set
let state_out = {
- let values = self
+ let values: Vec<ScalarValue> = self
.values
.iter()
.map(|x| ScalarValue::new_primitive::<T>(Some(*x),
&T::DATA_TYPE))
.collect();
- vec![ScalarValue::new_list(Some(values), T::DATA_TYPE)]
+ let arr = ScalarValue::scalars_to_list_array(&values,
&T::DATA_TYPE);
Review Comment:
Good idea, I will rename it to `new_list`
--
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]