Repository navigation
[format]custom parquet parser - #10836
Open
weijietong wants to merge 1 commit into
Open
weijietong wants to merge 1 commit into
weijietong wants to merge 1 commit into
Conversation
weijietong
force-pushed
the
parquet_parser
branch
from
October 27, 2026 12:14
faa77a3 to
5e9f99b
Compare
weijietong
force-pushed
the
parquet_parser
branch
from
October 27, 2026 12:23
5e9f99b to
bbaaf87
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
This PR introduces a customized Parquet footer parser to significantly improve metadata reading performance, especially for wide tables with hundreds to thousands of columns.
Background
When reading Parquet files, Paimon needs to parse the footer metadata serialized with Thrift Compact Protocol. For wide tables (hundreds to thousands of columns), footer parsing becomes a significant performance bottleneck. The official ParquetMetadataConverter materializes every column chunk's metadata including all Statistics, even when only a subset of
columns is needed.
Implementation
The selective footer parser walks the Thrift compact-protocol bytes directly with a hand-written ThriftCompactReader and:
Object construction is delegated to ParquetMetadataConverter.fromParquetMetadata() to reuse the battle-tested conversion, ensuring byte-for-byte equivalence with the official reader for the retained subset.
Performance Results
Benchmark on a 232MB file with 1,570 columns and 8 row groups (1.29MB footer):
Even in full-parse mode (all columns requested), the selective parser achieves 2.4x speedup due to:
Integration
The selective parser is enabled in ParquetReaderFactory when no pushdown predicates are present (since predicates require Statistics for row-group filtering). It's controlled by two configuration properties:
Tests
Added comprehensive test coverage in SelectiveFooterParserTest with 30 test cases:
Equivalence Tests
Complex Schema Tests
Boundary Condition Tests
Exception Path Tests
Encryption Tests
Integration Tests
All 30 tests pass successfully, validating byte-for-byte equivalence with the official parser for the retained subset.