This is an automated email from the ASF dual-hosted git repository. eldenmoon pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new ff6ec6c9814 [opt](Variant) avoid unnecessary mem for variant extracted columns (#43567) (#43620) ff6ec6c9814 is described below commit ff6ec6c981440bb92a0879eb3c74840ff60855cf Author: lihangyu <lihan...@flywheels.com> AuthorDate: Mon Nov 11 21:03:32 2024 +0800 [opt](Variant) avoid unnecessary mem for variant extracted columns (#43567) (#43620) (#43567) Co-authored-by: eldenmoon <lihan...@selectdb.com> --- be/src/olap/tablet_schema.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/be/src/olap/tablet_schema.cpp b/be/src/olap/tablet_schema.cpp index e264c402029..ef48c06aa3f 100644 --- a/be/src/olap/tablet_schema.cpp +++ b/be/src/olap/tablet_schema.cpp @@ -1000,9 +1000,12 @@ 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)); - _field_name_to_index.emplace(StringRef(_cols.back()->name()), _num_columns); - _field_id_to_index[_cols.back()->unique_id()] = _num_columns; + if (!_cols.back()->is_extracted_column()) { + _field_name_to_index.emplace(StringRef(_cols.back()->name()), _num_columns); + _field_id_to_index[_cols.back()->unique_id()] = _num_columns; + } _num_columns++; } for (auto& index_pb : schema.index()) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org