This is an automated email from the ASF dual-hosted git repository.
zhangstar333 pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 441c754183e [cherry-pick](branch-30)fix the exchange not skip offset
rows (#42190) (#42490)
441c754183e is described below
commit 441c754183e4cbe860bda31db4e8cfd15ad5c406
Author: zhangstar333 <[email protected]>
AuthorDate: Mon Nov 11 19:56:57 2024 +0800
[cherry-pick](branch-30)fix the exchange not skip offset rows (#42190)
(#42490)
cherry-pick from master (#42190)
---
be/src/pipeline/exec/exchange_source_operator.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/be/src/pipeline/exec/exchange_source_operator.cpp
b/be/src/pipeline/exec/exchange_source_operator.cpp
index 7ccb310bca4..deafb361c57 100644
--- a/be/src/pipeline/exec/exchange_source_operator.cpp
+++ b/be/src/pipeline/exec/exchange_source_operator.cpp
@@ -17,6 +17,7 @@
#include "exchange_source_operator.h"
+#include <cstdint>
#include <memory>
#include "pipeline/exec/operator.h"
@@ -171,9 +172,10 @@ Status ExchangeSourceOperatorX::get_block(RuntimeState*
state, vectorized::Block
local_state.num_rows_skipped += block->rows();
block->set_num_rows(0);
} else if (local_state.num_rows_skipped < _offset) {
- auto offset = _offset - local_state.num_rows_skipped;
+ int64_t offset = _offset - local_state.num_rows_skipped;
local_state.num_rows_skipped = _offset;
- block->set_num_rows(block->rows() - offset);
+ // should skip some rows
+ block->skip_num_rows(offset);
}
}
if (local_state.num_rows_returned() + block->rows() < _limit) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]