This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push: new 0b39084562 [fix](agg) Incorrect aggregation result caused by wrong rows_returned from VExchangeNode (#17718) 0b39084562 is described below commit 0b39084562427185f1b65d29dfe62beb4f5f2607 Author: Jerry Hu <mrh...@gmail.com> AuthorDate: Mon Mar 13 14:10:53 2023 +0800 [fix](agg) Incorrect aggregation result caused by wrong rows_returned from VExchangeNode (#17718) In aggregation node, rows_returned will be used to determine whether the aggregate result is null or not: ColumnPtr ptr = std::move(columns[i]); // unless `count`, other aggregate function dispose empty set should be null // so here check the children row return ptr = make_nullable(ptr, _children[0]->rows_returned() == 0); columns[i] = std::move(*ptr).mutate(); --- be/src/vec/exec/vexchange_node.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/be/src/vec/exec/vexchange_node.cpp b/be/src/vec/exec/vexchange_node.cpp index f595c6fea3..43335ccf44 100644 --- a/be/src/vec/exec/vexchange_node.cpp +++ b/be/src/vec/exec/vexchange_node.cpp @@ -101,6 +101,7 @@ Status VExchangeNode::get_next(RuntimeState* state, Block* block, bool* eos) { *eos = true; auto limit = _limit - _num_rows_returned; block->set_num_rows(limit); + _num_rows_returned = _limit; } COUNTER_SET(_rows_returned_counter, _num_rows_returned); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org