feat(avro): support zstd compression level configuration#131
Merged
zjw1111 merged 4 commits intoalibaba:mainfrom Feb 12, 2026
Merged
feat(avro): support zstd compression level configuration#131zjw1111 merged 4 commits intoalibaba:mainfrom
zjw1111 merged 4 commits intoalibaba:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for configuring Zstandard (zstd) compression level when writing Avro files, aligning Avro writing behavior with existing compression-level configuration patterns in the codebase.
Changes:
- Bumps the bundled Avro dependency to a commit that supports passing a zstd compression level.
- Extends
AvroFormatWriter::Create/AvroWriterBuilderto propagate an optional compression level into the AvroDataFileWriterBase. - Adds a unit test for retrieving the configured zstd compression level and updates Avro test linking.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
third_party/versions.txt |
Updates the Avro third-party revision + checksum to pick up compression-level support. |
src/paimon/format/avro/avro_writer_builder_test.cpp |
Adds coverage for zstd compression-level option retrieval. |
src/paimon/format/avro/avro_writer_builder.h |
Reads zstd level and passes it into AvroFormatWriter::Create. |
src/paimon/format/avro/avro_format_writer.h |
Extends the writer factory API with an optional compression level argument. |
src/paimon/format/avro/avro_format_writer.cpp |
Passes compression level into ::avro::DataFileWriterBase. |
src/paimon/format/avro/CMakeLists.txt |
Adds Parquet static lib to Avro test link set (new coupling). |
Comments suppressed due to low confidence (1)
src/paimon/format/avro/avro_writer_builder.h:35
- avro_writer_builder.h now uses std::optional in the public Build() signature path but does not include directly (currently it’s only available transitively via other headers). Please add an explicit #include to avoid fragile transitive-include dependencies.
#include <cstdint>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include "avro/DataFile.hh"
#include "avro/Stream.hh"
#include "paimon/common/utils/options_utils.h"
#include "paimon/common/utils/string_utils.h"
#include "paimon/core/core_options.h"
#include "paimon/format/avro/avro_format_writer.h"
#include "paimon/format/avro/avro_output_stream_impl.h"
#include "paimon/format/writer_builder.h"
#include "paimon/memory/memory_pool.h"
#include "paimon/result.h"
#include "paimon/status.h"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
21bd1c1 to
61d6560
Compare
lucasfang
reviewed
Feb 11, 2026
lucasfang
reviewed
Feb 11, 2026
lucasfang
reviewed
Feb 11, 2026
d90b736 to
695f3fb
Compare
zjw1111
reviewed
Feb 11, 2026
lxy-9602
reviewed
Feb 11, 2026
zjw1111
reviewed
Feb 11, 2026
c67750d to
07a9926
Compare
a309b98 to
9737346
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: #31
Add support for configuring Zstandard compression level in Avro writer
Tests
ToAvroCompressionKindTest ,CheckAvroCodec
ToAvroCompressionKindTest ,CheckAvroCompressionLevel
API and Format
No
Documentation
No