[C++][Parquet] Error when printing file metadata
Describe the bug, including details regarding any error messages, version, and platform.
If you download prices.parquet from https://www.data.gouv.fr/datasets/open-prices and then give it to parquet-reader --only-metadata, you get the following error:
[...]
Column 29
Values: 1024, Null Values: 1024, Distinct Values: 0
Max (exact: unknown): Parquet error: Failed to parse decimal value: Length of byte array passed to Decimal256::FromBigEndian was 0, but must be between 1 and 32
Ironically, the file was generated using Arrow C++:
File Name: ./prices.parquet
Version: 2.6
Created By: parquet-cpp-arrow version 18.0.0-SNAPSHOT
Component(s)
C++, Parquet
Hi @pitrou, I’d like to work on this issue and investigate the decimal metadata handling that leads to the Decimal256::FromBigEndian error.
If it’s okay, could you assign this issue to me? I’d be happy to work on a fix and add the necessary tests. Thanks!
Yes, feel free to open a PR.
Hi @pitrou , I’m interested in contributing a fix for this bug. I reproduced the error using the Open Prices prices.parquet file and traced it to the text metadata printer attempting to format missing min/max statistics for an all-null DECIMAL column. I’ve opened PR #51705 with a fix and a regression test. I’d be happy to address any feedback.
Hi @pitrou, I see that PR #51705 has been opened for #51673 and addresses the issue with missing min/max statistics for all-null DECIMAL columns.
Since I’m assigned to this issue, should I review/test the proposed fix, or would you prefer that I leave the implementation to the existing PR?
Hi @pitrou, I see that PR #51705 has been opened for #51673 and addresses the issue with missing min/max statistics for all-null DECIMAL columns.
Since I’m assigned to this issue, should I review/test the proposed fix, or would you prefer that I leave the implementation to the existing PR?
Hi @aryan9948 , I’d be glad to collaborate with you on this. I’d welcome your review or testing of PR #51705 and any feedback you have. I’m happy to make further changes to ensure the fix fully addresses the issue.
Issue resolved by pull request 51705 https://github.com/apache/arrow/pull/51705