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

AVRO-4031: [Rust] builder header #3096

Merged
merged 3 commits into from
Aug 16, 2024

Conversation

MarcoLugo
Copy link
Contributor

@MarcoLugo MarcoLugo commented Aug 14, 2024

AVRO-4031

What is the purpose of the change

This PR allows for more flexibility when creating new avro writers with the goal of appending to an existing file. Current functions are convenient wrappers but do not allow fully configuring the parameters for the new writer when it's meant for appending to an existing file.

Some more context pertaining to my particular use case: parameters such as block size become quite important when using compression so being able to append with a new writer using the same, larger-than-default block size the first writer used can make a significant difference for compression.

Verifying this change

Added a new test.

Documentation

  • Does this pull request introduce a new feature?
    Yes, now it is possible to create Writer for appending with any other parameter available when creating the initial writer.
  • If yes, how is the feature documented?
    The newly exposed field (i.e. has_header) is documented automatically thanks to the TypedBuilder macro.

@github-actions github-actions bot added the Rust label Aug 14, 2024
@martin-g martin-g merged commit 14361c0 into apache:main Aug 16, 2024
15 checks passed
martin-g pushed a commit that referenced this pull request Aug 16, 2024
* AVRO-4031: [Rust] allow setting has_header in builder

* AVRO-4031: [Rust] add test for appending with multiple writers

* AVRO-4031: [Rust] Prefix the new IT test name with `avro_4031_`

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

---------

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Co-authored-by: Martin Tzvetanov Grigorov <[email protected]>
(cherry picked from commit 14361c0)
@martin-g
Copy link
Member

Thank you, @MarcoLugo !

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

Successfully merging this pull request may close these issues.

2 participants