feat: support altering fulltext backend (#5896)

* feat: add `greptime_index_type` to `information_schema.key_column_usage`

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: show create

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

---------

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
This commit is contained in:
Zhenchi
2025-04-15 14:36:06 +08:00
committed by GitHub
parent 6a50d71920
commit 8d485e9be0
14 changed files with 294 additions and 191 deletions

View File

@@ -969,6 +969,14 @@ impl ErrorExt for MetadataError {
}
}
/// Set column fulltext options if it passed the validation.
///
/// Options allowed to modify:
/// * backend
///
/// Options not allowed to modify:
/// * analyzer
/// * case_sensitive
fn set_column_fulltext_options(
column_meta: &mut ColumnMetadata,
column_name: String,
@@ -976,14 +984,6 @@ fn set_column_fulltext_options(
current_options: Option<FulltextOptions>,
) -> Result<()> {
if let Some(current_options) = current_options {
ensure!(
!current_options.enable,
InvalidColumnOptionSnafu {
column_name,
msg: "FULLTEXT index already enabled".to_string(),
}
);
ensure!(
current_options.analyzer == options.analyzer
&& current_options.case_sensitive == options.case_sensitive,