thisisnic commented on issue #48138: URL: https://github.com/apache/arrow/issues/48138#issuecomment-7186328343
I used an AI agent to investigate this while going through older bug issues, and I've reviewed the results. @raulcd does this sound right to you? ---------------- 🤖 : `total_byte_size` isn't computed on read: the reader returns the value stored in the row group metadata (`cpp/src/parquet/metadata.cc`). Decoding the footer of `alltypes_plain.snappy.parquet` with a generic Thrift library gives the same 570, so that is what the file contains. What differs is what the writer stored. That file was written by `impala version 1.3.0-INTERNAL`, which stored the compressed size. Arrow C++ did the same until PARQUET-2008 (#9791, in 4.0.0): | written by | `total_byte_size` | sum of compressed | sum of uncompressed | |---|---|---|---| | Impala 1.3.0 (`alltypes_plain.snappy.parquet`) | 570 | 570 | 532 | | pyarrow 3.0.0 | 148538 | 148538 | 266376 | | pyarrow 4.0.0, same table | 266376 | 148538 | 266376 | pyarrow 22.0.0 and 26.0.1 read the same values from all three. So this looks like a property of files from older writers rather than a reader bug, and summing the columns' `total_uncompressed_size`, as datanomy now does, is the reliable approach. If that's right, this could become a docs issue: a note in the `RowGroupMetaData.total_byte_size` docstring that the value is whatever the writer stored. -- 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]
