This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new f88a8169dc8 [opt](Variant) avoid unnecessary mem for variant extracted
columns (#… (#44585)
f88a8169dc8 is described below
commit f88a8169dc8324e7b649a554e26612162e226173
Author: lihangyu <[email protected]>
AuthorDate: Tue Nov 26 19:30:06 2024 +0800
[opt](Variant) avoid unnecessary mem for variant extracted columns (#…
(#44585)
cherry-pick from #43567
---
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 ef0ff512039..7e83e15eac4 100644
--- a/be/src/olap/tablet_schema.cpp
+++ b/be/src/olap/tablet_schema.cpp
@@ -993,9 +993,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: [email protected]
For additional commands, e-mail: [email protected]