From 490c38e171ea66599316b26ead6bd575660ec070 Mon Sep 17 00:00:00 2001 From: lihangyu <15605149486@163.com> Date: Mon, 11 Nov 2024 17:39:04 +0800 Subject: [PATCH] [opt](Variant) avoid unnecessary mem for variant extracted columns (#43567) _field_name_to_index and _field_id_to_index is unnecessary for variant subcolumns, since they use column path as identifier --- be/src/olap/tablet_schema.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/be/src/olap/tablet_schema.cpp b/be/src/olap/tablet_schema.cpp index 6c88d4cc61b3b8e..ef48c06aa3fdb80 100644 --- a/be/src/olap/tablet_schema.cpp +++ b/be/src/olap/tablet_schema.cpp @@ -1000,6 +1000,7 @@ void TabletSchema::init_from_pb(const TabletSchemaPB& schema, bool ignore_extrac if (column->is_variant_type()) { ++_num_variant_columns; } + _cols.emplace_back(std::move(column)); if (!_cols.back()->is_extracted_column()) { _field_name_to_index.emplace(StringRef(_cols.back()->name()), _num_columns);