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

   ### Is your feature request related to a problem or challenge?
   
   We have a `into_array` function of `ColumnarValue` which converts it into an 
arrow array like this:
   ```rust
   pub fn into_array(self, num_rows: usize) -> Result<ArrayRef> {
         Ok(match self {
             ColumnarValue::Array(array) => array,
             ColumnarValue::Scalar(scalar) => 
scalar.to_array_of_size(num_rows)?,
         })
     }
   ```
   If this column is of an Int32 type, it returns an Int32Array.
   Given that the `ColumnarValue::Scalar`'s cardinality is 1, in some special 
cases, we can turn it into a dictionary array in order to obtain some 
performance gains.
   
   ### Describe the solution you'd like
   
   For example, if we want to turn a scalar value of f64 type into an array of 
size 256, we can return a dictionary f64 array of uint8 key type.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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