[BUG.FIX] Disable full-text or multi-value index for partition table without primary key

This commit is contained in:
Tyshawn
2024-05-16 08:52:02 +00:00
committed by ob-robot
parent 9dda2ed0ea
commit 78d299ab14
4 changed files with 26 additions and 4 deletions

View File

@ -1511,6 +1511,20 @@ int ObFtsIndexBuilderUtil::get_doc_id_col(
return ret;
}
int ObFtsIndexBuilderUtil::check_fts_or_multivalue_index_allowed(
ObTableSchema &data_schema)
{
int ret = OB_SUCCESS;
if (OB_UNLIKELY(!data_schema.is_valid())) {
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid argument", K(ret), K(data_schema));
} else if (data_schema.is_partitioned_table() && data_schema.is_heap_table()) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "create full-text or multi-value index on partition table without primary key");
}
return ret;
}
int ObFtsIndexBuilderUtil::get_word_segment_col(
const ObTableSchema &data_schema,
const obrpc::ObCreateIndexArg *index_arg,