Skip to content

Commit

Permalink
import: handle empty orc file (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyaug authored Dec 20, 2020
1 parent 7c2c305 commit 0aaf99c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cloud/aws/s3inventory/orc_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,15 @@ func (r *OrcInventoryFileReader) Close() error {
}

func (r *OrcInventoryFileReader) FirstObjectKey() string {
if len(r.reader.Metadata().StripeStats) == 0 {
return ""
}
return *r.reader.Metadata().StripeStats[0].GetColStats()[r.orcSelect.IndexInFile[keyFieldName]+1].StringStatistics.Minimum
}

func (r *OrcInventoryFileReader) LastObjectKey() string {
if len(r.reader.Metadata().StripeStats) == 0 {
return ""
}
return *r.reader.Metadata().StripeStats[0].GetColStats()[r.orcSelect.IndexInFile[keyFieldName]+1].StringStatistics.Maximum
}

0 comments on commit 0aaf99c

Please sign in to comment.