-
Notifications
You must be signed in to change notification settings - Fork 26
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
11 changed files
with
966 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ANALYZE web; | ||
|
||
ANALYZE hive.default.stores; | ||
|
||
ANALYZE hive.default.sales WITH (partitions = 1); |
34 changes: 34 additions & 0 deletions
34
crates/lib-dialects/test/fixtures/dialects/trino/analyze.yml
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,34 @@ | ||
file: | ||
- statement: | ||
- keyword: ANALYZE | ||
- table_reference: | ||
- naked_identifier: web | ||
- statement_terminator: ; | ||
- statement: | ||
- keyword: ANALYZE | ||
- table_reference: | ||
- naked_identifier: hive | ||
- dot: . | ||
- naked_identifier: default | ||
- dot: . | ||
- naked_identifier: stores | ||
- statement_terminator: ; | ||
- statement: | ||
- keyword: ANALYZE | ||
- table_reference: | ||
- naked_identifier: hive | ||
- dot: . | ||
- naked_identifier: default | ||
- dot: . | ||
- naked_identifier: sales | ||
- keyword: WITH | ||
- bracketed: | ||
- start_bracket: ( | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: partitions | ||
- comparison_operator: | ||
- raw_comparison_operator: = | ||
- numeric_literal: '1' | ||
- end_bracket: ) | ||
- statement_terminator: ; |
5 changes: 5 additions & 0 deletions
5
crates/lib-dialects/test/fixtures/dialects/trino/comment_on.sql
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,5 @@ | ||
COMMENT ON TABLE abc IS 'xyz'; | ||
COMMENT ON VIEW abc IS 'xyz'; | ||
COMMENT ON COLUMN table1.column1 IS 'abc'; | ||
COMMENT ON COLUMN table1.column2 IS 'abc'; | ||
COMMENT ON COLUMN table1.column3 IS 'abc.'; |
52 changes: 52 additions & 0 deletions
52
crates/lib-dialects/test/fixtures/dialects/trino/comment_on.yml
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,52 @@ | ||
file: | ||
- statement: | ||
- keyword: COMMENT | ||
- keyword: ON | ||
- keyword: TABLE | ||
- table_reference: | ||
- naked_identifier: abc | ||
- keyword: IS | ||
- quoted_literal: '''xyz''' | ||
- statement_terminator: ; | ||
- statement: | ||
- keyword: COMMENT | ||
- keyword: ON | ||
- keyword: VIEW | ||
- table_reference: | ||
- naked_identifier: abc | ||
- keyword: IS | ||
- quoted_literal: '''xyz''' | ||
- statement_terminator: ; | ||
- statement: | ||
- keyword: COMMENT | ||
- keyword: ON | ||
- keyword: COLUMN | ||
- column_reference: | ||
- naked_identifier: table1 | ||
- dot: . | ||
- naked_identifier: column1 | ||
- keyword: IS | ||
- quoted_literal: '''abc''' | ||
- statement_terminator: ; | ||
- statement: | ||
- keyword: COMMENT | ||
- keyword: ON | ||
- keyword: COLUMN | ||
- column_reference: | ||
- naked_identifier: table1 | ||
- dot: . | ||
- naked_identifier: column2 | ||
- keyword: IS | ||
- quoted_literal: '''abc''' | ||
- statement_terminator: ; | ||
- statement: | ||
- keyword: COMMENT | ||
- keyword: ON | ||
- keyword: COLUMN | ||
- column_reference: | ||
- naked_identifier: table1 | ||
- dot: . | ||
- naked_identifier: column3 | ||
- keyword: IS | ||
- quoted_literal: '''abc.''' | ||
- statement_terminator: ; |
4 changes: 4 additions & 0 deletions
4
crates/lib-dialects/test/fixtures/dialects/trino/row_datatype.sql
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,4 @@ | ||
SELECT | ||
name, | ||
CAST(ROW(price, store) AS ROW(price REAL, store VARCHAR)) AS data_row | ||
FROM customers |
53 changes: 53 additions & 0 deletions
53
crates/lib-dialects/test/fixtures/dialects/trino/row_datatype.yml
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,53 @@ | ||
file: | ||
- statement: | ||
- select_statement: | ||
- select_clause: | ||
- keyword: SELECT | ||
- select_clause_element: | ||
- column_reference: | ||
- naked_identifier: name | ||
- comma: ',' | ||
- select_clause_element: | ||
- function: | ||
- function_name: | ||
- function_name_identifier: CAST | ||
- bracketed: | ||
- start_bracket: ( | ||
- expression: | ||
- function: | ||
- function_name: | ||
- function_name_identifier: ROW | ||
- bracketed: | ||
- start_bracket: ( | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: price | ||
- comma: ',' | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: store | ||
- end_bracket: ) | ||
- keyword: AS | ||
- data_type: | ||
- keyword: ROW | ||
- bracketed: | ||
- start_bracket: ( | ||
- parameter: price | ||
- data_type: | ||
- keyword: REAL | ||
- comma: ',' | ||
- parameter: store | ||
- data_type: | ||
- keyword: VARCHAR | ||
- end_bracket: ) | ||
- end_bracket: ) | ||
- alias_expression: | ||
- keyword: AS | ||
- naked_identifier: data_row | ||
- from_clause: | ||
- keyword: FROM | ||
- from_expression: | ||
- from_expression_element: | ||
- table_expression: | ||
- table_reference: | ||
- naked_identifier: customers |
Oops, something went wrong.