You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Rafferty97 (via GitHub)" <gi...@apache.org> on 2024/07/28 05:23:45 UTC

[I] Remove unnecessary allocations in `struct` and `named_struct` [datafusion]

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

   ## Summary
   
   Improve the performance of the `struct` and `named_struct` functions by eliminating unnecessary heap allocations.
   
   ## Detail
   
   In the implementations of the `struct` and `named_struct` functions, the final `StructArray` is created using `StructArray::from` which internally unzips the provided `Vec<(FieldRef, ArrayRef)>>` into two separate vectors. It would therefore be more efficient to simply construct these two separate `Vec`s directly and pass these to `StructArray::new`, avoiding the allocation of the intermediate `Vec<(FieldRef, ArrayRef)>`.


-- 
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] Remove unnecessary allocations in `struct` and `named_struct` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #11685: Remove unnecessary allocations in `struct` and `named_struct`
URL: https://github.com/apache/datafusion/issues/11685


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