jayzhan211 commented on code in PR #9234:
URL: https://github.com/apache/arrow-datafusion/pull/9234#discussion_r1490598409
##########
datafusion/common/src/scalar.rs:
##########
@@ -2084,27 +2110,13 @@ impl ScalarValue {
let mut scalars = Vec::with_capacity(array.len());
for index in 0..array.len() {
- let scalar_values = match array.data_type() {
- DataType::List(_) => {
- let list_array = as_list_array(array);
- match list_array.is_null(index) {
- true => Vec::new(),
- false => {
- let nested_array = list_array.value(index);
-
ScalarValue::convert_array_to_scalar_vec(&nested_array)?
- .into_iter()
- .flatten()
- .collect()
- }
- }
- }
- _ => {
- let scalar = ScalarValue::try_from_array(array, index)?;
- vec![scalar]
- }
- };
+ let nested_array = array.as_list::<i32>().value(index);
Review Comment:
Main fix
--
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]