This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-1.1-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push: new 395d827cf6 [fix](agg) Incorrect aggregation result caused by wrong rows_returned from VExchangeNode (#17718) (#17729) 395d827cf6 is described below commit 395d827cf6c6c9ac8aa64e813d1e0fcc9e8e7ddf Author: yiguolei <676222...@qq.com> AuthorDate: Mon Mar 13 15:53:25 2023 +0800 [fix](agg) Incorrect aggregation result caused by wrong rows_returned from VExchangeNode (#17718) (#17729) 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(); Co-authored-by: Jerry Hu <mrh...@gmail.com> --- 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 014716b542..535bc9567e 100644 --- a/be/src/vec/exec/vexchange_node.cpp +++ b/be/src/vec/exec/vexchange_node.cpp @@ -88,6 +88,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