-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more fulltext index tck case #5122
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need to retrieve adapter for each data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the password of elasticsearch may be modified during the system operation. Therefore, you need to obtain the configuration of the elasticsearch service again.
In addition, there was a problem before that. If there was no sign in text service when adding listener, the nebula-listener would crash directly. Therefore, the address of elasticsearch cannot be obtained during initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌