-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add Trino column suggestions #282
Conversation
"test:yql": "node --experimental-vm-modules ./node_modules/.bin/jest --testPathIgnorePatterns tests/generated/.+ --verbose src/autocomplete/databases/yql/tests/", | ||
"test:redis": "node --experimental-vm-modules ./node_modules/.bin/jest --testPathIgnorePatterns tests/generated/.+ --verbose src/autocomplete/databases/redis/tests/", | ||
"test:trino": "node --experimental-vm-modules ./node_modules/.bin/jest --testPathIgnorePatterns tests/generated/.+ --verbose src/autocomplete/databases/trino/tests/", | ||
"test:mongo": "node --experimental-vm-modules ./node_modules/.bin/jest --testPathIgnorePatterns tests/generated/.+ --verbose src/autocomplete/databases/mongo/tests/", |
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.
We'll have less parameters this way, much easier to modify
WHERE_ where = booleanExpression | ||
)? # update | ||
| MERGE_ INTO_ tableIdentifier (AS_? identifier)? USING_ relation ON_ expression mergeCase+ # merge | ||
)? |
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.
I need these statements separate, to be able to run my visitor on them
WHERE_ where = booleanExpression | ||
)? (GROUP_ BY_ groupBy)? (HAVING_ having = booleanExpression)? ( | ||
WINDOW_ windowDefinition (COMMA_ windowDefinition)* | ||
)? | ||
; | ||
|
||
fromClause | ||
: FROM_ relation (COMMA_ relation)* | ||
; |
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.
Same as with insertStatement, I need to be able to run my visior on fromClause
: patternRecognition (TABLESAMPLE_ sampleType LPAREN_ percentage = expression RPAREN_)? | ||
| tableIdentifier | ||
: tableReference | ||
| patternRecognition (TABLESAMPLE_ sampleType LPAREN_ percentage = expression RPAREN_)? |
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.
They need to be reversed, because patterRecognition can include almost anything, and we want to have tableReference
in a priority
@@ -20,8 +20,6 @@ export interface TrinoAutocompleteResult extends SqlAutocompleteResult { | |||
// TODO-TRINO: enrich autocomplete | |||
suggestAggregateFunctions?: undefined; | |||
suggestFunctions?: undefined; | |||
suggestColumns?: undefined; | |||
suggestColumnAliases?: undefined; |
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.
We properly support them now! :)
No description provided.