-
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
3 changed files
with
175 additions
and
0 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
7 changes: 7 additions & 0 deletions
7
crates/lib-dialects/test/fixtures/dialects/trino/json_functions.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,7 @@ | ||
select | ||
json_query(payload format json, 'lax $.unstructured.abcd[*].field?(@ > 0.5)' with array wrapper), | ||
json_query(payload format json encoding utf8, 'lax $.unstructured.abcd[*].field?(@ > 0.5)' without array wrapper), | ||
json_query(payload format json encoding utf16, 'lax $.unstructured.abcd[*].field?(@ > 0.5)' with conditional wrapper), | ||
json_query(payload format json encoding utf32, 'lax $.unstructured.abcd[*].field?(@ > 0.5)' with unconditional array wrapper), | ||
json_query(payload format json, 'lax $.unstructured.abcd[*].field?(@ > 0.5)') | ||
; |
112 changes: 112 additions & 0 deletions
112
crates/lib-dialects/test/fixtures/dialects/trino/json_functions.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,112 @@ | ||
file: | ||
- statement: | ||
- select_statement: | ||
- select_clause: | ||
- keyword: select | ||
- select_clause_element: | ||
- function: | ||
- function_name: | ||
- function_name_identifier: json_query | ||
- bracketed: | ||
- start_bracket: ( | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: payload | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: format | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: json | ||
- comma: ',' | ||
- expression: | ||
- quoted_literal: '''lax $.unstructured.abcd[*].field?(@ > 0.5)''' | ||
- keyword: with | ||
- keyword: array | ||
- keyword: wrapper | ||
- end_bracket: ) | ||
- comma: ',' | ||
- select_clause_element: | ||
- function: | ||
- function_name: | ||
- function_name_identifier: json_query | ||
- bracketed: | ||
- start_bracket: ( | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: payload | ||
- keyword: format | ||
- keyword: json | ||
- keyword: encoding | ||
- keyword: utf8 | ||
- comma: ',' | ||
- expression: | ||
- quoted_literal: '''lax $.unstructured.abcd[*].field?(@ > 0.5)''' | ||
- keyword: without | ||
- keyword: array | ||
- keyword: wrapper | ||
- end_bracket: ) | ||
- comma: ',' | ||
- select_clause_element: | ||
- function: | ||
- function_name: | ||
- function_name_identifier: json_query | ||
- bracketed: | ||
- start_bracket: ( | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: payload | ||
- keyword: format | ||
- keyword: json | ||
- keyword: encoding | ||
- keyword: utf16 | ||
- comma: ',' | ||
- expression: | ||
- quoted_literal: '''lax $.unstructured.abcd[*].field?(@ > 0.5)''' | ||
- keyword: with | ||
- keyword: conditional | ||
- keyword: wrapper | ||
- end_bracket: ) | ||
- comma: ',' | ||
- select_clause_element: | ||
- function: | ||
- function_name: | ||
- function_name_identifier: json_query | ||
- bracketed: | ||
- start_bracket: ( | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: payload | ||
- keyword: format | ||
- keyword: json | ||
- keyword: encoding | ||
- keyword: utf32 | ||
- comma: ',' | ||
- expression: | ||
- quoted_literal: '''lax $.unstructured.abcd[*].field?(@ > 0.5)''' | ||
- keyword: with | ||
- keyword: unconditional | ||
- keyword: array | ||
- keyword: wrapper | ||
- end_bracket: ) | ||
- comma: ',' | ||
- select_clause_element: | ||
- function: | ||
- function_name: | ||
- function_name_identifier: json_query | ||
- bracketed: | ||
- start_bracket: ( | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: payload | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: format | ||
- expression: | ||
- column_reference: | ||
- naked_identifier: json | ||
- comma: ',' | ||
- expression: | ||
- quoted_literal: '''lax $.unstructured.abcd[*].field?(@ > 0.5)''' | ||
- end_bracket: ) | ||
- statement_terminator: ; |