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 08cb06396b0 branch-2.1: [Fix](index build) should not append index to
meta while column id is -1 #46307 (#46345)
08cb06396b0 is described below
commit 08cb06396b0cce7157549fb26c214c39c58c4367
Author: walter <[email protected]>
AuthorDate: Fri Jan 3 21:59:55 2025 +0800
branch-2.1: [Fix](index build) should not append index to meta while column
id is -1 #46307 (#46345)
cherry pick from #46307
Co-authored-by: airborne12 <[email protected]>
---
be/src/olap/tablet_schema.h | 5 ++++-
be/src/olap/task/index_builder.cpp | 1 -
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/be/src/olap/tablet_schema.h b/be/src/olap/tablet_schema.h
index 75b3a78e183..cb251d9f140 100644
--- a/be/src/olap/tablet_schema.h
+++ b/be/src/olap/tablet_schema.h
@@ -362,7 +362,10 @@ public:
bool has_inverted_index() const {
for (const auto& index : _indexes) {
if (index.index_type() == IndexType::INVERTED) {
- return true;
+ //if index_id == -1, ignore it.
+ if (index.col_unique_ids()[0] >= 0) {
+ return true;
+ }
}
}
return false;
diff --git a/be/src/olap/task/index_builder.cpp
b/be/src/olap/task/index_builder.cpp
index bd4fea67f3b..68232326b0b 100644
--- a/be/src/olap/task/index_builder.cpp
+++ b/be/src/olap/task/index_builder.cpp
@@ -153,7 +153,6 @@ Status IndexBuilder::update_inverted_index_info() {
LOG(WARNING) << "referenced column was missing. "
<< "[column=" << t_inverted_index.columns[0]
<< " referenced_column=" << column_uid << "]";
- output_rs_tablet_schema->append_index(index);
continue;
}
const TabletColumn& col =
output_rs_tablet_schema->column_by_uid(column_uid);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]