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

RecordBatchEncoder::compute_size would be really nice #55

Open
thedodd opened this issue Mar 5, 2024 · 2 comments
Open

RecordBatchEncoder::compute_size would be really nice #55

thedodd opened this issue Mar 5, 2024 · 2 comments

Comments

@thedodd
Copy link
Contributor

thedodd commented Mar 5, 2024

Thoughts on adding such a method? Similar interface to ::encode, but would calculate the encoding size based on the given params.

@tychedelia
Copy link
Owner

Totally! These kinds of additional utilities are great. In general, it seems like you're using things a bit differently then others, and so some integration tests / examples of your patterns might be helpful here for others if you end up adding this method.

@thedodd
Copy link
Contributor Author

thedodd commented Mar 7, 2024

One of the primary use cases would be for ensuring buffers have enough space to be able to encode a full record batch.

However, this might be tricky as compression will obviously influence this. Perhaps the best we could do is provide the size of the batch without compression, and make it very clear in the docs that if compression is used, the size will almost always be smaller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants