Skip to content

Commit

Permalink
Merge branch 'main' into enable-read-from-s3
Browse files Browse the repository at this point in the history
  • Loading branch information
acezen authored Apr 18, 2023
2 parents 44127c7 + 551cc78 commit 19de831
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cpp/include/gar/reader/arrow_chunk_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ class AdjListArrowChunkReader {
*/
Status next_chunk() {
Status st;
if (++chunk_index_ >= chunk_num_) {
++chunk_index_;
while (chunk_index_ >= chunk_num_) {
st = Status::EndOfChunk();
++vertex_chunk_index_;
if (vertex_chunk_index_ >= vertex_chunk_num_) {
Expand Down Expand Up @@ -494,7 +495,8 @@ class AdjListPropertyArrowChunkReader {
*/
Status next_chunk() {
Status st;
if (++chunk_index_ >= chunk_num_) {
++chunk_index_;
while (chunk_index_ >= chunk_num_) {
st = Status::EndOfChunk();
++vertex_chunk_index_;
if (vertex_chunk_index_ >= vertex_chunk_num_) {
Expand Down
6 changes: 4 additions & 2 deletions cpp/include/gar/reader/chunk_info_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ class AdjListChunkInfoReader {
* error.
*/
Status next_chunk() {
if (++chunk_index_ >= chunk_num_) {
++chunk_index_;
while (chunk_index_ >= chunk_num_) {
++vertex_chunk_index_;
if (vertex_chunk_index_ >= vertex_chunk_num_) {
return Status::OutOfRange();
Expand Down Expand Up @@ -290,7 +291,8 @@ class AdjListPropertyChunkInfoReader {
* error.
*/
Status next_chunk() {
if (++chunk_index_ >= chunk_num_) {
++chunk_index_;
while (chunk_index_ >= chunk_num_) {
++vertex_chunk_index_;
if (vertex_chunk_index_ >= vertex_chunk_num_) {
return Status::OutOfRange();
Expand Down

0 comments on commit 19de831

Please sign in to comment.