[fix](index meta) make has_inverted_index function more robust #46364 (#46428)

cherry pick from #46364
This commit is contained in:
airborne12
2025-01-07 09:36:22 +08:00
committed by GitHub
parent ccb6c2610a
commit 03a3f37cc4

View File

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