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

@@ -1149,6 +1149,14 @@ impl TryFrom<RawTableInfo> for TableInfo {
}
}
/// 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_schema: &mut ColumnSchema,
column_name: &str,
@@ -1156,14 +1164,6 @@ fn set_column_fulltext_options(
current_options: Option<FulltextOptions>,
) -> Result<()> {
if let Some(current_options) = current_options {
ensure!(
!current_options.enable,
error::InvalidColumnOptionSnafu {
column_name,
msg: "FULLTEXT index already enabled",
}
);
ensure!(
current_options.analyzer == options.analyzer
&& current_options.case_sensitive == options.case_sensitive,