-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
147 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
tests/tck/features/fulltext_index/FultextIndexDDL.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Copyright (c) 2022 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
Feature: FulltextIndexTest | ||
|
||
Background: | ||
Given an empty graph | ||
And create a space with following options: | ||
| partition_num | 1 | | ||
| replica_factor | 1 | | ||
| vid_type | FIXED_STRING(30) | | ||
And add listeners to space | ||
|
||
@ft_index | ||
Scenario: fulltext ddl | ||
When executing query: | ||
""" | ||
CREATE TAG ddl_tag(prop1 string,prop2 fixed_string(20),prop3 int); | ||
CREATE EDGE ddl_edge(prop1 string,prop2 float); | ||
""" | ||
Then the execution should be successful | ||
And wait 3 seconds | ||
When executing query: | ||
""" | ||
CREATE FULLTEXT TAG INDEX nebula_index_ddl_tag_prop1 on ddl_tag(prop1); | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
CREATE FULLTEXT TAG INDEX nebula_index_ddl_tag_prop2 on ddl_tag(prop2); | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
CREATE FULLTEXT TAG INDEX nebula_index_ddl_tag_prop3 on ddl_tag(prop3); | ||
""" | ||
Then a ExecutionError should be raised at runtime: Unsupported! | ||
When executing query: | ||
""" | ||
SHOW FULLTEXT INDEXES; | ||
""" | ||
Then the result should be, in any order: | ||
| Name | Schema Type | Schema Name | Fields | | ||
| "nebula_index_ddl_tag_prop1" | "Tag" | "ddl_tag" | "prop1" | | ||
| "nebula_index_ddl_tag_prop2" | "Tag" | "ddl_tag" | "prop2" | | ||
When executing query: | ||
""" | ||
DROP FULLTEXT INDEX nebula_index_ddl_tag_prop1; | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
DROP FULLTEXT INDEX nebula_index_ddl_tag_prop2; | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
SHOW FULLTEXT INDEXES; | ||
""" | ||
Then the result should be, in any order: | ||
| Name | Schema Type | Schema Name | Fields | | ||
When executing query: | ||
""" | ||
CREATE FULLTEXT TAG INDEX nebula_index_ddl_tag_prop1 on ddl_tag(prop2); | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
SHOW FULLTEXT INDEXES; | ||
""" | ||
Then the result should be, in any order: | ||
| Name | Schema Type | Schema Name | Fields | | ||
| "nebula_index_ddl_tag_prop1" | "Tag" | "ddl_tag" | "prop2" | | ||
When executing query: | ||
""" | ||
DROP TAG ddl_tag; | ||
""" | ||
Then a ExecutionError should be raised at runtime: Related index exists, please drop index first | ||
When executing query: | ||
""" | ||
ALTER TAG ddl_tag DROP (prop2); | ||
""" | ||
Then a ExecutionError should be raised at runtime: Related fulltext index exists, please drop it first | ||
When executing query: | ||
""" | ||
ALTER TAG ddl_tag DROP (prop1); | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
ALTER TAG ddl_tag ADD (prop1 string); | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
ALTER TAG ddl_tag CHANGE (prop2 string); | ||
""" | ||
Then a ExecutionError should be raised at runtime: Related fulltext index exists, please drop it first | ||
When executing query: | ||
""" | ||
DROP FULLTEXT INDEX nebula_index_ddl_tag_prop1; | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
DROP TAG ddl_tag; | ||
DROP EDGE ddl_edge; | ||
""" | ||
Then the execution should be successful |