-
Notifications
You must be signed in to change notification settings - Fork 135
fix(parquet/file): count repeated skips in logical rows #1002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -708,13 +708,13 @@ func (c *columnChunkReader) skipRows(nrows int64) error { | |
| valuesToSkip = int64(levelsToSkip) | ||
| } | ||
|
|
||
| skipped, err := c.curDecoder.Discard(int(valuesToSkip)) | ||
| _, err = c.curDecoder.Discard(int(valuesToSkip)) | ||
| if err != nil { | ||
| c.err = err | ||
| return err | ||
| } | ||
|
|
||
| toSkip -= int64(skipped) | ||
| toSkip -= rowsSkipped | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the record, this line is the actual fix and it is correct. |
||
| c.consumeBufferedValues(int64(levelsToSkip)) | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not compile. Changing
skipped, err := ...to_, err = ...removes the only declaration oferrin this scope — there is noerrin any enclosing scope (skipRowshas no named return, and the sibling branch above declares its own via:=). I reproduced this:Easiest fix is to keep the short variable declaration, which is legal here because
erris still a new variable even with_on the left:Alternatively declare
var err errorbefore the loop.