[fix](inverted index)Make build index operation only affect base index (#36869) (#36988)

backport #36869
This commit is contained in:
qiye
2024-06-28 16:57:07 +08:00
committed by GitHub
parent 72de9c1b8f
commit 4bec08c7e8
2 changed files with 137 additions and 0 deletions

View File

@ -2932,6 +2932,8 @@ public class SchemaChangeHandler extends AlterHandler {
// for now table's state can only be NORMAL
Preconditions.checkState(olapTable.getState() == OlapTableState.NORMAL, olapTable.getState().name());
// remove the index which is not the base index, only base index can be built inverted index
indexSchemaMap.entrySet().removeIf(entry -> !entry.getKey().equals(olapTable.getBaseIndexId()));
// begin checking each table
Map<Long, List<Column>> changedIndexIdToSchema = Maps.newHashMap();
try {