Skip to content

Commit

Permalink
[GLUTEN-1682] [CH] fix hasNext will always be true if input is empty (f…
Browse files Browse the repository at this point in the history
…acebookincubator#1683)

What changes were proposed in this pull request?
This pr fix that if the current block is empty, it should return false for hasNext.

(Fixes: facebookincubator#1682)

How was this patch tested?
This patch was tested manually.
  • Loading branch information
shuai-xu authored Jun 1, 2023
1 parent c5fe982 commit 4c97a58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cpp-ch/local-engine/Parser/SerializedPlanParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,9 @@ bool LocalExecutor::checkAndSetDefaultBlock(size_t current_block_columns, bool h
const DB::ColumnWithTypeAndName default_col(default_col_ptr, col_type, col_name);
currentBlock().setColumn(i, default_col);
}
return true;
if (cols.size() > 0)
return true;
return false;
}

}

0 comments on commit 4c97a58

Please sign in to comment.