Skip to content

feat(avro): support zstd compression level configuration#131

Merged
zjw1111 merged 4 commits intoalibaba:mainfrom
dalingmeng:feat/zstd-level-config
Feb 12, 2026
Merged

feat(avro): support zstd compression level configuration#131
zjw1111 merged 4 commits intoalibaba:mainfrom
dalingmeng:feat/zstd-level-config

Conversation

@dalingmeng
Copy link
Copy Markdown
Contributor

@dalingmeng dalingmeng commented Feb 10, 2026

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / AvroWriterBuilder to propagate an optional compression level into the Avro DataFileWriterBase.
  • 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.

@dalingmeng dalingmeng force-pushed the feat/zstd-level-config branch 4 times, most recently from 21bd1c1 to 61d6560 Compare February 11, 2026 06:04
@dalingmeng dalingmeng force-pushed the feat/zstd-level-config branch 3 times, most recently from d90b736 to 695f3fb Compare February 11, 2026 06:32
@dalingmeng dalingmeng force-pushed the feat/zstd-level-config branch 2 times, most recently from c67750d to 07a9926 Compare February 11, 2026 09:52
@dalingmeng dalingmeng force-pushed the feat/zstd-level-config branch from a309b98 to 9737346 Compare February 11, 2026 10:20
Copy link
Copy Markdown
Collaborator

@zjw1111 zjw1111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@zjw1111 zjw1111 merged commit e2b24bf into alibaba:main Feb 12, 2026
8 checks passed
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

Successfully merging this pull request may close these issues.

5 participants