Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Go] Estimate physical size of data accumulated in array.Builder #42

Open
vitalyisaev2 opened this issue Oct 11, 2023 · 0 comments
Open

Comments

@vitalyisaev2
Copy link

Describe the usage question you have. Please include as many useful details as possible.

I'm working on a streaming service that accumulates blocks of Arrow data, dumps them into Arrow Streaming IPC format and then writes them into network socket. The data is accumulated in []array.Builder, which converts into []arrow.Array, then into a single arrow.Record and finally into bytes.Buffer.

The key part of this algorithm is the separation of a new block: we need to know when the previous block is large enough (but not too large - because it could exceed message size limits in this case) to let us stop data accumulation in []array.Builder, serialize existing data into bytes.Buffer and send over the network.

So is it possible to estimate the number of bytes accumulated physically in array.Builder? Or may be it even possible to forecast the size of a future bytes.Buffer containing serialized data from []array.Builder?

Component(s)

Go

@vitalyisaev2 vitalyisaev2 changed the title Go: estimate physical size of data accumulated in array.Builder [Go] estimate physical size of data accumulated in array.Builder Oct 12, 2023
@vitalyisaev2 vitalyisaev2 changed the title [Go] estimate physical size of data accumulated in array.Builder [Go] Estimate physical size of data accumulated in array.Builder Oct 12, 2023
@assignUser assignUser transferred this issue from apache/arrow Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant