Commit bf4fc65
authored
### Rationale for this change
Parquet CLI tools fail printing the statistics for a Decimal column with a precision larger than the max Decimal128 precision.
Example:
```console
$ /build/build-test/debug/parquet-reader --only-metadata /tmp/pqfuzz/pq-table-1
...
Column 5: col_6 (FIXED_LEN_BYTE_ARRAY(11) / Decimal(precision=24, scale=7) / DECIMAL(24,7))
Column 6: col_7 (FIXED_LEN_BYTE_ARRAY(18) / Decimal(precision=43, scale=7) / DECIMAL(43,7))
...
Column 5
Values: 375, Null Values: 74, Distinct Values: 0
Max (exact: true): 98505381700645007.0205463, Min (exact: true): -99708959786297168.1726196
Compression: UNCOMPRESSED, Encodings: PLAIN(DICT_PAGE) RLE_DICTIONARY
Uncompressed Size: 3754, Compressed Size: 3754
Column 6
Values: 375, Null Values: 69, Distinct Values: 0
Max (exact: true): Parquet error: Failed to parse decimal value: Length of byte array passed to Decimal128::FromBigEndian was 18, but must be between 1 and 16
...
```
### What changes are included in this PR?
Use Decimal256 instead of Decimal128 when printing a Decimal statistic.
### Are these changes tested?
Yes, by new tests.
### Are there any user-facing changes?
No.
* GitHub Issue: #47596
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
1 parent d803afc commit bf4fc65
2 files changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
150 | | - | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
159 | 175 | | |
160 | 176 | | |
161 | 177 | | |
| |||
0 commit comments