comphead commented on code in PR #21669:
URL: https://github.com/apache/datafusion/pull/21669#discussion_r3094317306
##########
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:
wondering if list arms can be combined into a single arm?
--
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]