eldenmoon commented on code in PR #24554:
URL: https://github.com/apache/doris/pull/24554#discussion_r1336910574
##########
be/src/olap/tablet.cpp:
##########
@@ -626,6 +626,18 @@ RowsetMetaSharedPtr
Tablet::rowset_meta_with_max_schema_version(
:
a->tablet_schema()->schema_version() <
b->tablet_schema()->schema_version());
});
+ TabletSchemaSPtr target_schema = max_schema_version_rs->tablet_schema();
+ if (target_schema->num_variant_columns() > 0) {
+ // For variant columns tablet schema need to be the merged wide tablet
schema
+ std::vector<TabletSchemaSPtr> schemas;
+ std::transform(rowset_metas.begin(), rowset_metas.end(),
std::back_inserter(schemas),
+ [](const RowsetMetaSharedPtr& rs_meta) { return
rs_meta->tablet_schema(); });
+ target_schema = std::make_shared<TabletSchema>();
+ // TODO(lhy) maybe slow?
+ vectorized::schema_util::get_least_common_schema(schemas,
target_schema);
Review Comment:
max version schema may not contain all the subcolumns, since different
rowset has different schema,we need to merge them all
--
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]