bobhan1 commented on code in PR #19917:
URL: https://github.com/apache/doris/pull/19917#discussion_r1233940048
##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -1171,6 +1309,46 @@ void VOlapTableSink::_open_partition(const
VOlapTablePartition* partition) {
}
}
+Status VOlapTableSink::_fill_auto_inc_cols(vectorized::Block* block, size_t
rows, bool eos) {
+ size_t idx = _auto_inc_col_idx.value();
+ SlotDescriptor* slot = _output_tuple_desc->slots()[idx];
+ DCHECK(slot->type().type == PrimitiveType::TYPE_BIGINT);
+ DCHECK(!slot->is_nullable());
+
+ vectorized::ColumnPtr src_column_ptr = block->get_by_position(idx).column;
+ auto src_nested_column_ptr =
+ assert_cast<const
vectorized::ColumnNullable&>(*src_column_ptr).get_nested_column_ptr();
+
+ auto dst_column = vectorized::ColumnInt64::create();
+ vectorized::ColumnInt64::Container& dst_values = dst_column->get_data();
+ dst_values.reserve(rows);
+
+ size_t count = 0;
+ for (size_t i = 0; i < rows; i++) {
+ if (src_column_ptr->is_null_at(i)) {
+ ++count;
+ }
+ }
+
+ DCHECK(_request_future.valid());
+
+ // if the pipeline is enabled, this will not be blocked,
+ // if the pipeline is not enabled, this will not be blocked in most
occasions
+ RETURN_IF_ERROR(_request_future.get());
+ DCHECK(_auto_inc_id_allocator.total_count >= count);
+ for (size_t i = 0; i < rows; i++) {
+ if (src_column_ptr->is_null_at(i)) {
Review Comment:
OK, I'll extract the null bitmap out and add SIMD code for this process
--
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]