viirya commented on code in PR #9114:
URL: https://github.com/apache/arrow-datafusion/pull/9114#discussion_r1476850340
##########
datafusion/expr/src/columnar_value.rs:
##########
@@ -75,4 +75,166 @@ impl ColumnarValue {
pub fn create_null_array(num_rows: usize) -> Self {
ColumnarValue::Array(Arc::new(NullArray::new(num_rows)))
}
+
+ /// Converts [`ColumnarValue`]s to [`ArrayRef`]s with the same length.
+ ///
+ /// # Performance Note
+ ///
+ /// This function expands any [`ScalarValue`] to an array. This expansion
+ /// permits using a single function in terms of arrays, but it can be
+ /// inefficient compared to handling the scalar value directly.
+ ///
+ /// Thus, It is recommended to provide specialized implementations for
+ /// scalar values if performance is a concern.
Review Comment:
```suggestion
/// Thus, it is recommended to provide specialized implementations for
/// scalar values if performance is a concern.
```
--
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]