Skip to content

Commit

Permalink
Handle parquet files that don't have any rows
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Swank authored and Craig Swank committed Feb 13, 2019
1 parent 8bcb5a2 commit 641ebd1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/parquetgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,13 @@ func (p *ParquetReader) Error() error {
}
func (p *ParquetReader) readRowGroup() error {
p.rowGroupCursor = 0
if len(p.rowGroups) == 0 {
p.rowGroupCount = 0
return nil
}
rg := p.rowGroups[0]
p.fields = getFields(Fields())
p.rowGroupCount = rg.Rows
Expand Down

0 comments on commit 641ebd1

Please sign in to comment.