From 77852d18e5e2cd442310206d0b16e52545964017 Mon Sep 17 00:00:00 2001 From: CookiePieWw Date: Thu, 7 Nov 2024 12:07:42 +0800 Subject: [PATCH] test: update sqlness test --- .../alter/change_col_fulltext_options.result | 55 ++----------------- .../alter/change_col_fulltext_options.sql | 8 +-- 2 files changed, 6 insertions(+), 57 deletions(-) diff --git a/tests/cases/standalone/common/alter/change_col_fulltext_options.result b/tests/cases/standalone/common/alter/change_col_fulltext_options.result index cdf965c81ada..be5b203f6327 100644 --- a/tests/cases/standalone/common/alter/change_col_fulltext_options.result +++ b/tests/cases/standalone/common/alter/change_col_fulltext_options.result @@ -88,6 +88,10 @@ SHOW CREATE TABLE test; | | ) | +-------+---------------------------------------------------------------------------------------+ +ALTER TABLE test MODIFY COLUMN message SET FULLTEXT WITH(analyzer = 'Chinese', case_sensitive = 'false'); + +Error: 1004(InvalidArguments), Failed to set fulltext options for column message, reason: fulltext options already enabled + ALTER TABLE test MODIFY COLUMN message SET FULLTEXT WITH(enable = 'false'); Affected Rows: 0 @@ -113,65 +117,14 @@ ALTER TABLE test MODIFY COLUMN message SET FULLTEXT WITH(analyzer = 'Chinglish', Error: 1002(Unexpected), Invalid fulltext option: Chinglish, expected: 'English' | 'Chinese' -SHOW CREATE TABLE test; - -+-------+-------------------------------------+ -| Table | Create Table | -+-------+-------------------------------------+ -| test | CREATE TABLE IF NOT EXISTS "test" ( | -| | "message" STRING NULL, | -| | "time" TIMESTAMP(3) NOT NULL, | -| | TIME INDEX ("time") | -| | ) | -| | | -| | ENGINE=mito | -| | WITH( | -| | append_mode = 'true' | -| | ) | -+-------+-------------------------------------+ - ALTER TABLE test MODIFY COLUMN message SET FULLTEXT WITH(analyzer = 'Chinese', case_sensitive = 'no'); Error: 1002(Unexpected), Invalid fulltext option: no, expected: 'true' | 'false' -SHOW CREATE TABLE test; - -+-------+-------------------------------------+ -| Table | Create Table | -+-------+-------------------------------------+ -| test | CREATE TABLE IF NOT EXISTS "test" ( | -| | "message" STRING NULL, | -| | "time" TIMESTAMP(3) NOT NULL, | -| | TIME INDEX ("time") | -| | ) | -| | | -| | ENGINE=mito | -| | WITH( | -| | append_mode = 'true' | -| | ) | -+-------+-------------------------------------+ - ALTER TABLE test MODIFY COLUMN time SET FULLTEXT WITH(analyzer = 'Chinese', case_sensitive = 'false'); Error: 1004(InvalidArguments), Failed to set fulltext options for column time, reason: column time is not a string type, but Timestamp(Millisecond(TimestampMillisecondType)) -SHOW CREATE TABLE test; - -+-------+-------------------------------------+ -| Table | Create Table | -+-------+-------------------------------------+ -| test | CREATE TABLE IF NOT EXISTS "test" ( | -| | "message" STRING NULL, | -| | "time" TIMESTAMP(3) NOT NULL, | -| | TIME INDEX ("time") | -| | ) | -| | | -| | ENGINE=mito | -| | WITH( | -| | append_mode = 'true' | -| | ) | -+-------+-------------------------------------+ - DROP TABLE test; Affected Rows: 0 diff --git a/tests/cases/standalone/common/alter/change_col_fulltext_options.sql b/tests/cases/standalone/common/alter/change_col_fulltext_options.sql index c5d7658e15ec..979c869039da 100644 --- a/tests/cases/standalone/common/alter/change_col_fulltext_options.sql +++ b/tests/cases/standalone/common/alter/change_col_fulltext_options.sql @@ -20,20 +20,16 @@ ALTER TABLE test MODIFY COLUMN message SET FULLTEXT WITH(analyzer = 'English', c SHOW CREATE TABLE test; +ALTER TABLE test MODIFY COLUMN message SET FULLTEXT WITH(analyzer = 'Chinese', case_sensitive = 'false'); + ALTER TABLE test MODIFY COLUMN message SET FULLTEXT WITH(enable = 'false'); SHOW CREATE TABLE test; ALTER TABLE test MODIFY COLUMN message SET FULLTEXT WITH(analyzer = 'Chinglish', case_sensitive = 'false'); -SHOW CREATE TABLE test; - ALTER TABLE test MODIFY COLUMN message SET FULLTEXT WITH(analyzer = 'Chinese', case_sensitive = 'no'); -SHOW CREATE TABLE test; - ALTER TABLE test MODIFY COLUMN time SET FULLTEXT WITH(analyzer = 'Chinese', case_sensitive = 'false'); -SHOW CREATE TABLE test; - DROP TABLE test; \ No newline at end of file