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

   ### Is your feature request related to a problem or challenge?
   
   
   Follow up for #22784.
   ## Description
   
   In `make_map_batch`, when inputs are mixed scalar/array, we expand scalars 
to arrays via `expand_if_scalar` -- but the result is still wrapped in 
`ColumnarValue::Array(...)`. The downstream code then pattern-matches on 
`ColumnarValue` variants again, even though the non-const path is guaranteed to 
be `Array` at that point.
   
   The function should instead extract raw `ArrayRef`s once the const/non-const 
decision is made, and pass those through validation and 
`make_map_batch_internal` eliminating the redundant `ColumnarValue` wrapping 
and the confusing redispatch on a variant that can no longer be `Scalar`.
   
   This would simplify the control flow and make the invariants clearer, but 
touches `make_map_batch_internal`, `get_first_array_ref`, and the key 
validation dispatch. 
   
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### 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