zhannngchen commented on code in PR #32200:
URL: https://github.com/apache/doris/pull/32200#discussion_r1539232141


##########
be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp:
##########
@@ -809,8 +825,26 @@ Status VerticalSegmentWriter::write_batch() {
         _olap_data_convertor->clear_source_content();
         _num_rows_written += data.num_rows;
     }
-
     _batched_blocks.clear();
+    _full_blocks.clear();
+    return Status::OK();
+}
+
+Status 
VerticalSegmentWriter::_make_full_block(std::shared_ptr<vectorized::Block>& 
block_ptr,
+                                               const vectorized::Block* block, 
size_t num_rows) {
+    block_ptr = 
std::make_shared<vectorized::Block>(_tablet_schema->create_block());
+    const auto& including_cids = 
_opts.rowset_ctx->partial_update_info->update_cids;
+    size_t input_id = 0;
+    for (auto i : including_cids) {
+        block_ptr->replace_by_position(i, 
block->get_by_position(input_id++).column);
+    }
+    std::vector<bool> use_default_or_null_flag;
+    use_default_or_null_flag.reserve(num_rows);
+    auto mutable_full_columns = block_ptr->mutate_columns();
+    for (size_t block_pos = 0; block_pos < num_rows; block_pos++) {
+        use_default_or_null_flag.emplace_back(true);
+    }
+    RETURN_IF_ERROR(_fill_missing_columns(mutable_full_columns, 
use_default_or_null_flag, true, 0));

Review Comment:
   Is this the same behavior with normal insert?



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

Reply via email to