@@ -36471,19 +36471,28 @@ int ObDDLService::drop_index_to_scheduler_(ObMySQLTransaction &trans,
3647136471 new_index_schemas))) {
3647236472 LOG_WARN("submit drop index arg failed", KR(ret));
3647336473 } else {
36474+ const int64_t NORMAL_INDEX_COUNT = 1;
36475+ const int64_t VEC_INDEX_COUNT = 5;
36476+ const int64_t VEC_INDEX_VID_OPT_COUNT = 3;
36477+ const int64_t FTS_INDEX_COUNT = 4;
36478+ const int64_t FTS_INDEX_DOCID_OPT_COUNT = 2;
36479+ const int64_t MULTIVALUE_INDEX_COUNT = 3;
36480+ const int64_t MULTIVALUE_INDEX_DOCID_OPT_COUNT = 1;
36481+
3647436482 // normal index has 1 index schema
36475- const bool normal_index_count_invalid = (!is_fts_or_multivalue_or_vec_index && new_index_schemas.count() != 1 );
36483+ const bool normal_index_count_invalid = (!is_fts_or_multivalue_or_vec_index && new_index_schemas.count() != NORMAL_INDEX_COUNT );
3647636484
3647736485 // vec index aux has 5 index schemas for now
3647836486 const bool vec_index_count_invalid = (!drop_index_arg->is_inner_
3647936487 && index_table_schema->is_vec_delta_buffer_type()
36480- && new_index_schemas.count() != 5);
36488+ && new_index_schemas.count() != VEC_INDEX_COUNT
36489+ && new_index_schemas.count() != VEC_INDEX_VID_OPT_COUNT);
3648136490
3648236491 // fts index aux has 4 index schemas for now, but can be 2 index schemas when doc id optimization is enabled
3648336492 // schemas: (docid_rowkey, rowkey_docid, doc_word, word_doc) / (doc_word, word_doc)
3648436493 const bool fts_index_count_invalid = (index_table_schema->is_fts_index_aux()
36485- && new_index_schemas.count() != 4
36486- && new_index_schemas.count() != 2 );
36494+ && new_index_schemas.count() != FTS_INDEX_COUNT
36495+ && new_index_schemas.count() != FTS_INDEX_DOCID_OPT_COUNT );
3648736496
3648836497 // multivalue index aux has 3 index schemas for now, but can be 1 index schemas when doc id optimization is enabled
3648936498 const bool multivalue_index_count_invalid = index_table_schema->is_multivalue_index_aux()
0 commit comments