eldenmoon commented on code in PR #28673: URL: https://github.com/apache/doris/pull/28673#discussion_r1462873247
########## be/src/vec/columns/column_object.cpp: ########## @@ -1196,6 +1197,18 @@ void ColumnObject::finalize(bool ignore_sparse) { if (!ignore_sparse && (entry->data.check_if_sparse_column(num_rows))) { // TODO seperate ambiguous path sparse_columns.add(entry->path, entry->data); + if (sparse_subcolumns_schema != nullptr) { + const std::string& column_name = entry->path.get_path(); + const vectorized::DataTypePtr& final_data_type_from_object = + entry->data.get_least_common_type(); + vectorized::PathInDataBuilder full_path_builder; + auto full_path = full_path_builder.append(entry->path.get_parts(), false).build(); + TabletColumn tablet_column = vectorized::schema_util::get_column_by_type( + final_data_type_from_object, column_name, + vectorized::schema_util::ExtraInfo { + .unique_id = -1, .parent_unique_id = -1, .path_info = full_path}); + sparse_subcolumns_schema->emplace_back(std::move(tablet_column)); Review Comment: refactored -- 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