Skip to content

Commit

Permalink
Enhance empty file handling (facebookincubator#8459)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookincubator#8459

Enhance empty file handling especially for empty files with headers by
checking if the reader actually reads
nothing.
1. The current implementation checks if `pos_` is `0` which does not
cover the case when a header is present in the file.
2. When `skipLine()` returns true the loop should not be broken as
logic like elements counting and null setting still yet to happen.

Reviewed By: Yuhta

Differential Revision: D52929853

fbshipit-source-id: 7e1c52c8cdf09b04f453d7ad81235429796096c9
  • Loading branch information
zacw7 authored and facebook-github-bot committed Jan 22, 2024
1 parent 0d71afa commit 3777dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion velox/dwio/common/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class RowReaderOptions {
skipRows_ = skipRows;
}

bool getSkipRows() const {
uint64_t getSkipRows() const {
return skipRows_;
}

Expand Down

0 comments on commit 3777dfc

Please sign in to comment.