You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "findepi (via GitHub)" <gi...@apache.org> on 2024/12/13 11:15:49 UTC

[I] Optimize ColumnarValue::into_array / ScalarValue::to_array / ScalarValue::to_array_of_size [datafusion]

findepi opened a new issue, #13754:
URL: https://github.com/apache/datafusion/issues/13754

   When implementing functions, `ColumnarValue::into_array` / `ScalarValue::to_array` / `ScalarValue::to_array_of_size` are useful to reduce code complexity and denominate input arguments in terms of an array (either full-sized or 1-sized).
   
   The code to handle scalars of structural types is 
   https://github.com/apache/datafusion/blob/049ca15ae205bdb512cacf537b8fc31787e0cffc/datafusion/common/src/scalar/mod.rs#L2341-L2354
   
   it's not optimized for the common case of input array (the scalar) being of length 1 and requested length also being 1.
   In such case it could probably be reduced to `Arc::clone`


-- 
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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Optimize `ColumnarValue::into_array` / `ScalarValue::to_array` / `ScalarValue::to_array_of_size` [datafusion]

Posted by "xudong963 (via GitHub)" <gi...@apache.org>.
xudong963 closed issue #13754: Optimize `ColumnarValue::into_array` / `ScalarValue::to_array` / `ScalarValue::to_array_of_size`
URL: https://github.com/apache/datafusion/issues/13754


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org