-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add @mention to select a table for the command input (#1432)
* feat: add @mention support for the command input * address comments * fix table selector disappear issue * comments * remove id * use suggest * add comment
- Loading branch information
Showing
14 changed files
with
241 additions
and
96 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
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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
def construct_suggest_table_query( | ||
prefix: str, | ||
keyword: str, | ||
limit: int, | ||
metastore_id: int, | ||
): | ||
return { | ||
"suggest": { | ||
"suggest": { | ||
"text": prefix, | ||
"completion": { | ||
"field": "completion_name", | ||
"size": limit, | ||
"contexts": {"metastore_id": metastore_id}, | ||
"from": 0, | ||
"size": limit, | ||
"query": { | ||
"bool": { | ||
"must": { | ||
"match": {"full_name_ngram": {"query": keyword, "operator": "and"}} | ||
}, | ||
"filter": {"match": {"metastore_id": metastore_id}}, | ||
} | ||
}, | ||
"_source": ["id", "full_name"], | ||
} |
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
Oops, something went wrong.