csun5285 commented on code in PR #28673:
URL: https://github.com/apache/doris/pull/28673#discussion_r1435918671
##########
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:
这里不需要 parent_unique_id,把 sparse_subcolumns_schema 里面的稀疏列append到tablet_schema
时会设置parent_unique_id
--
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]