Do not try to uncompress pages that are not compressed - #103
Open
papanikge wants to merge 4 commits into
Open
Conversation
Do not try to uncompress pages that are not compressed
… encoding of byte arrays (#2) * remove restriction on miniblock width * do not read miniblock header on init * do not read miniblock header on init * do not read delta values when there is only one entry * remove comments * Update deltabp_decoder.go Co-authored-by: George Papanikolaou <george.papanikolaou@panther.io> --------- Co-authored-by: George Papanikolaou <george.papanikolaou@panther.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[This is a sync of a fix already done and tested in a fork]
Relates to #102
Context
Panther is running fraugster/parguet-go in production for some months now ingesting TBs of data.
Some customers reported that they got the following error:
After some investigation we can see that in the
readfunction of the the V2 DataPage, the flag (already present inDataPageHeaderV2) was not checked.More context: Parquet files - when compressed - are so in the page layer. Parquet supports compression per page, (as shown from the
DataPageHeaderV2IsCompressedfield, which comes directly from the thrift definition). The library detects the compression type (calledCompressionCodec) and passes that down to thenewBlockReaderlevel. However it still needs to check if that specific page is indeed compressed, and that was missing.Checks
FWIW, I doubled check this with parquet-go/parquet-goparquet-go/parquet-go and confirmed that they don't try to decompress that.
Ran all the tests with https://github.com/apache/parquet-testing
[Note: I can try adding a file into https://github.com/apache/parquet-testing before trying merging this into upstream]
Ran all unit tests with the race detector on
Added a unit tests
... that passes with false, but breaks if I do
IsCompressed=>truebecause the input is not snappy