Commits


KarateSnowMachine authored and GitHub committed 710f96069f9
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 <prosenfeld@gmail.com> Co-authored-by: Gang Wu <ustcwg@gmail.com> Co-authored-by: KarateSnowMachine <KarateSnowMachine@users.noreply.github.com> Co-authored-by: Antoine Pitrou <pitrou@free.fr> Signed-off-by: Gang Wu <ustcwg@gmail.com>