zclllyybb commented on code in PR #31827: URL: https://github.com/apache/doris/pull/31827#discussion_r1528583202
########## be/src/vec/sink/vrow_distribution.cpp: ########## @@ -247,29 +256,34 @@ Status VRowDistribution::_generate_rows_distribution_for_auto_partition( if (!_missing_map.empty()) { // for missing partition keys, calc the missing partition and save in _partitions_need_create - auto [part_ctxs, part_funcs] = _get_partition_function(); - auto funcs_size = part_funcs.size(); + auto [part_ctxs, part_exprs] = _get_partition_function(); + auto part_col_num = part_exprs.size(); + // the two vectors are in column-first-order std::vector<std::vector<std::string>> col_strs; - col_strs.resize(funcs_size); - - for (int i = 0; i < funcs_size; ++i) { - auto return_type = part_funcs[i]->data_type(); - // expose the data column - vectorized::ColumnPtr range_left_col = - block->get_by_position(partition_cols_idx[i]).column; - if (const auto* nullable = - check_and_get_column<vectorized::ColumnNullable>(*range_left_col)) { - range_left_col = nullable->get_nested_column_ptr(); - return_type = assert_cast<const vectorized::DataTypeNullable*>(return_type.get()) - ->get_nested_type(); + std::vector<const NullMap*> col_null_maps; + col_strs.resize(part_col_num); + col_null_maps.reserve(part_col_num); Review Comment: it has no perf diff here -- 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