github-actions[bot] commented on code in PR #62760:
URL: https://github.com/apache/doris/pull/62760#discussion_r3135096132
##########
be/src/exec/exchange/local_exchanger.cpp:
##########
@@ -530,17 +533,43 @@ Status AdaptivePassthroughExchanger::sink(RuntimeState*
state, Block* in_block,
Status AdaptivePassthroughExchanger::get_block(RuntimeState* state, Block*
block, bool* eos,
Profile&& profile, SourceInfo&&
source_info) {
- BlockWrapperSPtr next_block;
- _dequeue_data(source_info.local_state, next_block, eos, block,
source_info.channel_id);
+ PartitionedBlock partitioned_block;
+ MutableBlock mutable_block;
+
+ auto get_data = [&]() -> Status {
+ do {
Review Comment:
Once `get_block()` has already accumulated one or more shuffled fragments
into `mutable_block`, this assignment overwrites the output block and silently
drops the rows copied earlier in the same call. That mixed queue state is
expected here: after the first `_num_partitions` inputs are split, the same
source queue can still dequeue a passthrough block before `state->batch_size()`
is reached. In that case the previously dequeued fragment rows are lost. The
zero-copy fast path is only safe when the passthrough block is the first
dequeued item; otherwise this branch needs to append the passthrough rows to
the existing accumulator (or defer that block to the next call).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]