Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangstar333 committed Aug 2, 2023
1 parent 093f2f2 commit 80a1c90
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ Status DistinctStreamingAggSinkOperator::sink(RuntimeState* state, vectorized::B
// get enough data or reached limit rows, need push block to queue
if (_node->limit() != -1 &&
(_output_block->rows() + _output_distinct_rows) >= _node->limit()) {
auto need_cut_rows = (_output_block->rows() + _output_distinct_rows) - _node->limit();
auto limit_rows = _output_block->rows() - need_cut_rows;
auto limit_rows = _node->limit() - _output_distinct_rows;
_output_block->set_num_rows(limit_rows);
_output_distinct_rows += limit_rows;
_data_queue->push_block(std::move(_output_block));
Expand Down

0 comments on commit 80a1c90

Please sign in to comment.