Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

StructArray or Arc<StructArray> #492

Answered by jorgecarleitao
potter420 asked this question in Q&A
Discussion options

You must be logged in to vote

Cool scenario :)

I would go for Arc<StructArray>.

They are both Send+Sync. The Arc offers two things:

  • allows the StructArray to be a trait object Array.
  • cheap clone

Since you mentioned a streaming scenario where sometimes the size of the metadata matters, and there is a small overhead in cloning a StructArray due to the clone of the metadata Vec<Field>, I would go for Arc<StructArray>.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by potter420
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants