GH-51673: [C++][Parquet] Skip missing min/max in metadata printer - #51705
Open
Sunny-Island wants to merge 1 commit into
Open
Sunny-Island wants to merge 1 commit into
Sunny-Island wants to merge 1 commit into
Conversation
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.
Rationale for this change
Parquet column statistics can contain a null count without min/max values, for example when every value in a column chunk is null.
ParquetFilePrinter::DebugPrintcurrently formats min and max whenever any statistics are present. For a DECIMAL stored asFIXED_LEN_BYTE_ARRAY, formatting the missing max passes an empty byte array toDecimal256::FromBigEndianand makesparquet-reader --only-metadatafail.Closes #51673.
What changes are included in this PR?
Are these changes tested?
parquet-reader-test --gtest_filter=TestDebugPrintWithMemoryFile.AllNullDecimalStatistics:TestAllTypesPlain.DebugPrintWorksparquet-reader --only-metadataagainst the Open Pricesprices.parquetfile referenced in the issue: all 313 row groups print successfully.Are there any user-facing changes?
parquet-reader --only-metadatanow prints valid files with all-null DECIMAL column chunks without an error. Missing min/max values are omitted instead of being formatted.Was AI used for this PR?
In accordance with the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by:
AI assisted with the code, test, and PR description. The issue was reproduced on the public Parquet file and investigated at the throw site with LLDB.