eldenmoon commented on code in PR #17389:
URL: https://github.com/apache/doris/pull/17389#discussion_r1124356719


##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -1058,13 +1146,34 @@ Status VOlapTableSink::send(RuntimeState* state, 
vectorized::Block* input_block,
         _convert_to_dest_desc_block(&block);
     }
 
+    // Load to single tablet
+    if (findTabletMode == FindTabletMode::FIND_TABLET_EVERY_SINK) {
+        if (filtered_rows > 0) {
+            // Filter block
+            auto filter = vectorized::ColumnUInt8::create(block.rows(), 0);
+            vectorized::UInt8* filter_data =
+                    
static_cast<vectorized::ColumnUInt8*>(filter.get())->get_data().data();
+            vectorized::IColumn::Filter& filter_col =
+                    
static_cast<vectorized::ColumnUInt8*>(filter.get())->get_data();
+            for (size_t i = 0; i < filter_col.size(); ++i) {
+                filter_data[i] = !_filter_bitmap.Get(i);
+            }
+            vectorized::Block::filter_block_internal(&block, filter_col, 
block.columns());
+        }
+        VLOG_DEBUG << "send block by append block";
+        RETURN_IF_ERROR(_append_block_to_single_tablet(state, block));
+        input_block->clear();
+        // recalcute tablet each time
+        _partition_to_tablet_map.clear();

Review Comment:
   you are right



-- 
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]

Reply via email to