ByteBaker opened a new issue, #9245:
URL: https://github.com/apache/arrow-rs/issues/9245

   ### Is your feature request related to a problem or challenge?
   
   The `record_batch!` macro (added in #6588) currently only supports literal 
values for array data. This limitation makes it less useful in scenarios where 
array data is computed or passed as variables.
   
   For example, this doesn't work:
   ```rust
   let data = vec![1, 2, 3];
   let batch = record_batch![
       ("col", Int32, data)  // Error: expected literal
   ]?;
   ```
   
   ### Describe the solution you'd like
   
   Extend the `record_batch!` macro to accept both literals and 
expressions/variables for array data. Something like:
   
   ```rust
   let data = vec![1, 2, 3];
   let batch = record_batch![
       ("col", Int32, data)  // Should work
   ]?;
   ```
   
   ### Describe alternatives you've considered
   
   Currently using both the upstream macro (for literals) and datafusion's 
original implementation (for variables) side by side
   
   ### Additional context
   
   Related:
   - https://github.com/apache/datafusion/pull/18252#discussion_r2488735713


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

Reply via email to