dataroaring commented on code in PR #56058:
URL: https://github.com/apache/doris/pull/56058#discussion_r2354792267
##########
be/src/vec/sink/vtablet_finder.cpp:
##########
@@ -85,20 +86,113 @@ Status OlapTabletFinder::find_tablets(RuntimeState* state,
Block* block, int row
_vpartition->find_tablets(block, qualified_rows, partitions,
tablet_index);
} else {
// for random distribution
- _vpartition->find_tablets(block, qualified_rows, partitions,
tablet_index,
- &_partition_to_tablet_map);
+ if (_find_tablet_mode == FindTabletMode::FIND_TABLET_ROW_BASED) {
+ _find_tablets_with_row_based_switching(block, qualified_rows,
partitions, tablet_index);
+ } else {
+ _vpartition->find_tablets(block, qualified_rows, partitions,
tablet_index,
+ &_partition_to_tablet_map);
+ }
+
if (_find_tablet_mode == FindTabletMode::FIND_TABLET_EVERY_BATCH) {
for (auto it : _partition_to_tablet_map) {
// do round-robin for next batch
if (it.first->load_tablet_idx != -1) {
it.first->load_tablet_idx++;
}
}
- _partition_to_tablet_map.clear();
}
+ _partition_to_tablet_map.clear();
Review Comment:
For every sink, we should not clear it?
--
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]