[SNOW-3883414] verify() wraps ParquetDecodingException - #1165
Merged
yelgabra merged 3 commits intoAug 27, 2026
Conversation
Page/GZIP corruption is thrown unchecked, so verifyReadBack skipped the 3 rewrite retries. Catch it in verify() as IOException. Expand the corruption test so midpoint XOR actually hits the compressed page.
| String.format( | ||
| "Row count mismatch: expected %d, got %d", expectedRowCount, actualRowCount)); | ||
| } | ||
| } catch (ParquetDecodingException e) { |
Contributor
There was a problem hiding this comment.
can you check if there can be other exceptions? should we just catch all exception here?
| try (BdecParquetReader reader = new BdecParquetReader(data)) { | ||
| while (reader.read() != null) { | ||
| actualRowCount++; | ||
| try { |
Contributor
There was a problem hiding this comment.
do we need this second try clause?
sfc-gh-ggeng
left a comment
Contributor
There was a problem hiding this comment.
left some comments, please check
Catch RuntimeException instead of only ParquetDecodingException so footer and page-body corruption both retry. Restore the original midpoint XOR test with a 16-byte window, and add a page-body case that is stable across 4.4.4 and 4.4.4-SNAPSHOT.
sfc-gh-ggeng
approved these changes
Aug 27, 2026
yelgabra
enabled auto-merge (squash)
August 27, 2026 00:33
yelgabra
deleted the
yelgabra-SNOW-3883414-verify-wraps-decode-exception
branch
August 27, 2026 00:36
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.
Bug: verify(), introduced in [SNOW-3883414 parquet compression corruption check](#1162), expected BdecParquetReader.read() to return IOException when reading a corrupted BDEC file, but read() actually returns ParquetDecodingException when the BDEC body is corrupted.
testParquetReadBackVerificationCatchesCorruption() passed previously as the midpoint calculation returned a point in the footer instead of body, leading to an IOException accidentally.
Impact: the verifier would still successfully block corrupted BDEC uploads, which is an improvement on previous behaviour where we upload corrupted files. But it would not retry compressing them.
This PR modifies verify to catch ParquetDecodingException and fixes the test to properly test the verifier