Sunny-Island opened a new pull request, #51705: URL: https://github.com/apache/arrow/pull/51705
### 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::DebugPrint` currently formats min and max whenever any statistics are present. For a DECIMAL stored as `FIXED_LEN_BYTE_ARRAY`, formatting the missing max passes an empty byte array to `Decimal256::FromBigEndian` and makes `parquet-reader --only-metadata` fail. Closes #51673. ### What changes are included in this PR? - Print min and max only when their respective encoded statistics are present. Keep the existing output for columns with both values. - Add a self-contained reader test that writes an all-null DECIMAL column, verifies that null-count statistics exist without min/max, and checks that the text printer omits both values. ### Are these changes tested? - `parquet-reader-test --gtest_filter=TestDebugPrintWithMemoryFile.AllNullDecimalStatistics:TestAllTypesPlain.DebugPrintWorks` - `parquet-reader --only-metadata` against the Open Prices `prices.parquet` file referenced in the issue: all 313 row groups print successfully. ### Are there any user-facing changes? `parquet-reader --only-metadata` now 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](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR. **PR code and description written by:** - [ ] Human - [x] AI **Reviewed before submission by:** - [ ] Human - [x] AI - [ ] Not reviewed 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
