This is an automated email from the ASF dual-hosted git repository. yiguolei 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 b57dc79cc96 branch-3.0: [Fix](index build) should not append index to meta while column id is -1 #46307 (#46335) b57dc79cc96 is described below commit b57dc79cc969f553a175bad135ff306a65dfb462 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Fri Jan 3 22:00:23 2025 +0800 branch-3.0: [Fix](index build) should not append index to meta while column id is -1 #46307 (#46335) Cherry-picked from #46307 Co-authored-by: airborne12 <jiang...@selectdb.com> --- 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 d9a6b6f2804..1db389eff81 100644 --- a/be/src/olap/tablet_schema.h +++ b/be/src/olap/tablet_schema.h @@ -408,7 +408,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 2ce31527f61..bd17dedbbee 100644 --- a/be/src/olap/task/index_builder.cpp +++ b/be/src/olap/task/index_builder.cpp @@ -166,7 +166,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(std::move(index)); continue; } const TabletColumn& col = output_rs_tablet_schema->column_by_uid(column_uid); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org