HappenLee commented on code in PR #31689: URL: https://github.com/apache/doris/pull/31689#discussion_r1519085855
########## be/src/pipeline/exec/exchange_sink_operator.cpp: ########## @@ -398,6 +464,40 @@ Status ExchangeSinkOperatorX::sink(RuntimeState* state, vectorized::Block* block state, local_state.channel_shared_ptrs, local_state._partition_count, (uint32_t*)local_state._partitioner->get_channel_ids(), rows, block, eos)); } + } else if (_part_type == TPartitionType::TABLET_SINK_SHUFFLE_PARTITIONED) { + // check out of limit + RETURN_IF_ERROR(local_state._send_new_partition_batch()); + std::shared_ptr<vectorized::Block> convert_block = std::make_shared<vectorized::Block>(); + const auto& num_channels = local_state._partition_count; + std::vector<std::vector<uint32>> channel2rows; + channel2rows.resize(num_channels); + auto input_rows = block->rows(); + + if (input_rows > 0) { + bool has_filtered_rows = false; + int64_t filtered_rows = 0; + local_state._number_input_rows += input_rows; + + RETURN_IF_ERROR(local_state._row_distribution.generate_rows_distribution( + *block, convert_block, filtered_rows, has_filtered_rows, + local_state._row_part_tablet_ids, local_state._number_input_rows)); + + const auto& row_ids = local_state._row_part_tablet_ids[0].row_ids; + const auto& tablet_ids = local_state._row_part_tablet_ids[0].tablet_ids; + for (int idx = 0; idx < row_ids.size(); ++idx) { + const auto& row = row_ids[idx]; + const auto& tablet_id = tablet_ids[idx]; Review Comment: do crc32 hash -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org