-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-36189: [C++][Parquet] StreamReader::SkipRows() skips to incorrect …
…place in multi-row-group files (#36191) ### Rationale for this change The behavior of Parquet `StreamReader::SkipRows()` is wrong due to an error in calculating the row offset from the current row group. ### What changes are included in this PR? A unit test case demonstrating the failure and a trivial fix. ### Are these changes tested? Yes ### Are there any user-facing changes? No I am not sure if this bug is critical given how long it has existed in the code and no one has seemed to notice. There are two manifestations of this bug that might give the user the wrong impression about what is in their data: * sometimes a negative return value is returned, which is unexpected given the nature of the API, so the user should know something is up (this is how I discovered the bug) * the `SkipRows()` call leads to setting of the `eof` flag prematurely, which might lead the user to think there is less data in the file than there is. * Closes: #36189 Lead-authored-by: Paul Rosenfeld <[email protected]> Co-authored-by: Gang Wu <[email protected]> Co-authored-by: KarateSnowMachine <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Gang Wu <[email protected]>
- Loading branch information
1 parent
0de6673
commit 710f960
Showing
2 changed files
with
101 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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