liaoxin01 commented on code in PR #24011:
URL: https://github.com/apache/doris/pull/24011#discussion_r1319900467
##########
be/src/olap/rowset/segment_v2/segment_writer.cpp:
##########
@@ -638,6 +648,29 @@ Status SegmentWriter::append_block(const
vectorized::Block* block, size_t row_po
_serialize_block_to_row_column(*const_cast<vectorized::Block*>(block));
}
+ if (_opts.write_type == DataWriteType::TYPE_DIRECT &&
_opts.enable_unique_key_merge_on_write &&
+ !_tablet_schema->has_sequence_col() &&
_tablet_schema->delete_sign_idx() != -1) {
+ const vectorized::ColumnWithTypeAndName& delete_sign_column =
+ block->get_by_position(_tablet_schema->delete_sign_idx());
+ auto& delete_sign_col =
+ reinterpret_cast<const
vectorized::ColumnInt8&>(*(delete_sign_column.column));
+ if (delete_sign_col.size() >= row_pos + num_rows) {
+ const vectorized::Int8* delete_sign_column_data =
delete_sign_col.get_data().data();
+ uint32_t segment_start_pos =
+
_column_writers[_tablet_schema->delete_sign_idx()]->get_next_rowid();
+ for (size_t block_pos = row_pos, seg_pos = segment_start_pos;
seg_pos < num_rows;
Review Comment:
`seg_pos < num_rows` -> `seg_pos < segment_start_pos + num_rows`?
--
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]