Skip to content

Commit

Permalink
test: update sqlness test
Browse files Browse the repository at this point in the history
  • Loading branch information
CookiePieWw committed Nov 7, 2024
1 parent 2e49660 commit 77852d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 77852d1

Please sign in to comment.