Jefffrey commented on code in PR #21669:
URL: https://github.com/apache/datafusion/pull/21669#discussion_r3094392515


##########
datafusion/common/src/scalar/mod.rs:
##########
@@ -3401,6 +3457,18 @@ impl ScalarValue {
                 }
                 Self::list_to_array_of_size(arr.as_ref() as &dyn Array, size)?
             }
+            ScalarValue::ListView(arr) => {
+                if size == 1 {
+                    return Ok(Arc::clone(arr) as Arc<dyn Array>);
+                }
+                Self::list_to_array_of_size(arr.as_ref() as &dyn Array, size)?
+            }
+            ScalarValue::LargeListView(arr) => {
+                if size == 1 {
+                    return Ok(Arc::clone(arr) as Arc<dyn Array>);
+                }
+                Self::list_to_array_of_size(arr.as_ref() as &dyn Array, size)?
+            }

Review Comment:
   I can't think of a way to do so, since `arr` in each case is 
`&Arc<ListViewArray>` and `&Arc<LargeListViewArray>` so we can't bind to a 
common name as they are distinct types



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