alamb commented on code in PR #3197:
URL: https://github.com/apache/arrow-datafusion/pull/3197#discussion_r949628370


##########
datafusion/common/src/scalar.rs:
##########
@@ -1506,10 +1511,7 @@ impl ScalarValue {
                         Some(scalar_vec)
                     }
                 };
-                ScalarValue::List(
-                    value,
-                    Box::new(Field::new("item", 
nested_type.data_type().clone(), true)),
-                )
+                ScalarValue::new_list(value, nested_type.data_type().clone())

Review Comment:
   The whole PR is just doing this transformation over and over again



##########
datafusion/common/src/scalar.rs:
##########
@@ -648,6 +648,11 @@ impl ScalarValue {
         ScalarValue::IntervalMonthDayNano(Some(val))
     }
 
+    /// Create a new nullable ScalarValue::List with the specified child_type
+    pub fn new_list(scalars: Option<Vec<Self>>, child_type: DataType) -> Self {

Review Comment:
   Here is the new function



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

Reply via email to