apache / apache/parquet-java

Old Parquet files with wrong Compressed Size not Readable

Open
#2,926 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

In certain circumstances, the CLI will fail to read old (perhaps ancient) parquet files that have an incorrect compressed_size field set in the column metadata that does not include the dictionary page (at least according to the comment in the code). The code that is supposed to handle this does not flip the byte buffer it reads the extra bytes into. It appears to have been broken for a few years now.

I have written a PR that includes a defective parquet file with this issue, wrote a unit test that fails without the additional `flip`, and validated that the code works afterwards.

This is a trivial minor issue that was from learning the code rather than actually addressing a production issue, so there's no urgency.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the CLI code path that handles old Parquet files whose compressed_size excludes the dictionary page, then inspect the byte buffer used for the extra bytes. Use the defective Parquet file and unit test described in the issue; done means the test passes and the old file is readable after the buffer is flipped.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.