Skip to content

Commit

Permalink
[opt](Variant) avoid unnecessary mem for variant extracted columns (a…
Browse files Browse the repository at this point in the history
…pache#43567)

_field_name_to_index and _field_id_to_index is unnecessary for variant
subcolumns, since they use column path as identifier
  • Loading branch information
eldenmoon committed Nov 11, 2024
1 parent 3960c59 commit 490c38e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions be/src/olap/tablet_schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 490c38e

Please sign in to comment.