[fix](parquet) Handle empty value sections - #66556
Open
acarofpigs wants to merge 1 commit into
Open
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
acarofpigs
force-pushed
the
fix/66430-empty-value-section-crash
branch
from
August 6, 2026 14:44
23de867 to
fd0d0f1
Compare
Contributor
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 28635 ms |
Contributor
TPC-DS: Total hot run time: 164318 ms |
Contributor
ClickBench: Total hot run time: 23.69 s |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
### What problem does this PR solve? Issue Number: close apache#66430 Related PR: None Problem Summary: A compressed Parquet DataPageV2 can legally contain definition levels but no physical values when every nullable value is NULL. The legacy reader passed the resulting null, zero-length slice to the BOOLEAN PLAIN decoder and aborted the BE in BatchedBitReader::Reset(). Use a dedicated empty-value-section decoder for these pages. Accept the page when definition levels require no physical values, and return Corruption when values are required but absent. Update page progress only after decoding succeeds so failures leave reader state unchanged. ### Release note Fix a BE crash when reading Parquet pages with empty value sections. ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [x] Unit Test - ./run-be-ut.sh --run --filter=ParquetColumnChunkReaderTest.* -j 2 - All 11 tests passed with ASAN. - [x] Manual test (add detailed scripts or steps below) - ./build.sh --be -j 2 - BE build succeeded. - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [ ] No. - [x] Yes. Valid all-NULL Parquet pages are accepted. Pages whose definition levels require missing physical values return Corruption instead of aborting the BE. - Does this need documentation? - [x] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
acarofpigs
force-pushed
the
fix/66430-empty-value-section-crash
branch
from
August 6, 2026 22:53
fd0d0f1 to
aba31ae
Compare
Contributor
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 28412 ms |
Contributor
TPC-DS: Total hot run time: 166157 ms |
Contributor
ClickBench: Total hot run time: 23.77 s |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
3 tasks
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.
• ### What problem does this PR solve?
Issue Number: close #66430
Related PR: None
Problem Summary:
A compressed Parquet DataPageV2 can legally contain definition levels
but no physical values when every nullable value is NULL. The legacy
reader passed the resulting null, zero-length slice to the BOOLEAN
PLAIN decoder and aborted the BE in BatchedBitReader::Reset().
Use a dedicated empty-value-section decoder for these pages. Accept the
page when definition levels require no physical values, and return
Corruption when values are required but absent. Update page progress
only after decoding succeeds so failures leave reader state unchanged.
Release note
Fix a BE crash when reading Parquet pages with empty value sections.
Check List (For Author)
Test
./run-be-ut.sh --run --filter=ParquetColumnChunkReaderTest.* -j 2./build.sh --be -j 2Behavior changed:
definition levels require missing physical values return
Corruption instead of aborting the BE.
Does this need documentation?
Check List (For Reviewer who merge this PR)