From 03a3f37cc4e1e4cdddf080fefa4ac0a8f440edeb Mon Sep 17 00:00:00 2001 From: airborne12 Date: Tue, 7 Jan 2025 09:36:22 +0800 Subject: [PATCH] [fix](index meta) make has_inverted_index function more robust #46364 (#46428) cherry pick from #46364 --- be/src/olap/tablet_schema.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/olap/tablet_schema.h b/be/src/olap/tablet_schema.h index cb251d9f14..029401468d 100644 --- a/be/src/olap/tablet_schema.h +++ b/be/src/olap/tablet_schema.h @@ -363,7 +363,7 @@ public: for (const auto& index : _indexes) { if (index.index_type() == IndexType::INVERTED) { //if index_id == -1, ignore it. - if (index.col_unique_ids()[0] >= 0) { + if (!index.col_unique_ids().empty() && index.col_unique_ids()[0] >= 0) { return true; } }