Skip to content

GH-55861: [C++][Parquet] Write Arrow fixed-size binary arrays directly to Parquet encoders - #55862

Merged
HuaHuaY merged 2 commits into
apache:mainfrom
HuaHuaY:avoid_FLBA_array
Dec 1, 2026
Merged

HuaHuaY merged 2 commits into
apache:mainfrom
HuaHuaY:avoid_FLBA_array

Conversation

@HuaHuaY

@HuaHuaY HuaHuaY commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Rationale for this change

The Parquet C++ writer builds a temporary array of FixedLenByteArray descriptors when writing an Arrow FixedSizeBinaryArray. The encoders already accept the Arrow array directly, so the writer can avoid building those descriptors.

What changes are included in this PR?

Implemented TypedComparatorImpl::GetMinMax and TypedBloomFilterWriter::Update for FLBA.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

Was AI used for this PR?

In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Copilot AI balanced review requested due to automatic review settings November 30, 2026 13:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

2 open issues
What changed in this PR

This PR optimizes Parquet C++ writing of Arrow FixedSizeBinaryArray by avoiding intermediate FixedLenByteArray descriptor materialization, enabling direct use of Arrow arrays in min/max computation and bloom filter updates.

Changes:

  • Implemented TypedComparatorImpl::GetMinMax(const ::arrow::Array&) for FLBA and refactored shared min/max traversal logic.
  • Added TypedBloomFilterWriter::Update support for FLBA (FIXED_SIZE_BINARY).
  • Updated/extended tests to cover FixedSizeBinary statistics and bloom filter round-trips.
File Description
cpp/​src/​parquet/​statistics_test.cc Extends statistics tests to validate min/max and FLBA stats updates using Arrow FixedSizeBinaryArray.
cpp/​src/​parquet/​statistics.cc Adds Arrow-array-based GetMinMax support for FLBA and refactors common min/max traversal.
cpp/​src/​parquet/​column_writer.cc Routes fixed-size binary writing through a shared binary write path to avoid building FLBA descriptors.
cpp/​src/​parquet/​bloom_filter_writer.cc Implements bloom filter updates for FIXED_LEN_BYTE_ARRAY from Arrow fixed-size binary arrays; improves error message.
cpp/​src/​parquet/​arrow/​index_test.cc Adds bloom filter round-trip coverage for fixed-size binary columns and fixes a redundant table construction.
cpp/​src/​parquet/​arrow/​arrow_statistics_test.cc Adds Arrow statistics verification for fixed_size_binary columns.

Review effort: Lite

Comment thread cpp/src/parquet/column_writer.cc Resolved
Comment thread cpp/src/parquet/column_writer.cc Resolved
Comment thread cpp/src/parquet/column_writer.cc Resolved
Copilot AI balanced review requested due to automatic review settings December 1, 2026 06:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the fixed-size binary direct-writing changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@HuaHuaY
HuaHuaY merged commit a130249 into apache:main Dec 1, 2026
56 checks passed
@HuaHuaY
HuaHuaY deleted the avoid_FLBA_array branch December 1, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++][Parquet] Avoid building a temporary FLBA array when writing fixed-size binary columns

4 participants