dmgcodevil opened a new issue #12597:
URL: https://github.com/apache/arrow/issues/12597
I'm using pyarrow to read parquet files, however, it fails to read some
files.
Error:
```
table = self._dataset.to_table(
File "pyarrow\_dataset.pyx", line 323, in pyarrow._dataset.Dataset.to_table
File "pyarrow\_dataset.pyx", line 2311, in
pyarrow._dataset.Scanner.to_table
File "pyarrow\error.pxi", line 143, in
pyarrow.lib.pyarrow_internal_check_status
File "pyarrow\error.pxi", line 114, in pyarrow.lib.check_status
OSError: Malformed levels. min: 60 max: 60 out of range. Max Level: 1
```
Based on my research the file that cannot be read uses a new 2.0 encoding
Column meta from the file that pyarrow reads successfully
`id: BINARY GZIP DO:0 FPO:630 SZ:101/63/0.62 VC:30
ENC:PLAIN_DICTIONARY,BIT_PACKED,RLE ST:[min: , max: D, num_nulls: 0]`
Column meta from the file that pyarrow fails to read
`id: BINARY GZIP DO:0 FPO:593 SZ:90/52/0.58 VC:30
ENC:RLE_DICTIONARY ST:[min: , max: D, num_nulls: 0]`
Based on Parquet spec, `RLE_DICTIONARY` is a new encoding format:
> Using the PLAIN_DICTIONARY enum value is deprecated in the Parquet 2.0
specification. Prefer using RLE_DICTIONARY in a data page and PLAIN in a
dictionary page for Parquet 2.0+ files.
Does Pyarrow support Parquet 2.0 format ?
--
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]