HappenLee commented on code in PR #19917: URL: https://github.com/apache/doris/pull/19917#discussion_r1233780692
########## 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); + Review Comment: // the code should be DEBUG ``` size_t count = 0; for (size_t i = 0; i < rows; i++) { if (src_column_ptr->is_null_at(i)) { ++count; } } ``` -- 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