viirya commented on code in PR #7969:
URL: https://github.com/apache/arrow-datafusion/pull/7969#discussion_r1375524276


##########
datafusion/common/src/scalar.rs:
##########
@@ -2234,28 +2239,20 @@ impl ScalarValue {
             }
             DataType::Utf8 => typed_cast!(array, index, StringArray, Utf8),
             DataType::LargeUtf8 => typed_cast!(array, index, LargeStringArray, 
LargeUtf8),
-            DataType::List(nested_type) => {
+            DataType::List(_) => {
                 let list_array = as_list_array(array);
-                let arr = match list_array.is_null(index) {
-                    true => new_null_array(nested_type.data_type(), 0),

Review Comment:
   This condition is redundant and not reached. `try_from_array` handles NULL 
value at the beginning.



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