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; } }