Skip to content

Commit d6e1df2

Browse files
authored
fix(trino): support function COALESCE (#471)
1 parent 5f0e936 commit d6e1df2

12 files changed

Lines changed: 5142 additions & 4990 deletions

File tree

src/grammar/trino/TrinoSql.g4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ primaryExpression
614614
| KW_SUBSTRING '(' valueExpression KW_FROM valueExpression (KW_FOR valueExpression)? ')' # substring
615615
| KW_NORMALIZE '(' valueExpression (',' normalForm)? ')' # normalize
616616
| KW_EXTRACT '(' identifier KW_FROM valueExpression ')' # extract
617+
| KW_COALESCE '(' expression (',' expression)* ')' # coalesce
617618
| '(' expression ')' # parenthesizedExpression
618619
| KW_GROUPING '(' (qualifiedName (',' qualifiedName)*)? ')' # groupingOperation
619620
| KW_JSON_EXISTS '(' jsonPathInvocation (jsonExistsErrorBehavior KW_ON KW_ERROR)? ')' # jsonExists
@@ -1101,6 +1102,7 @@ nonReserved
11011102
| KW_CASCADE
11021103
| KW_CATALOG
11031104
| KW_CATALOGS
1105+
| KW_COALESCE
11041106
| KW_COLUMN
11051107
| KW_COLUMNS
11061108
| KW_COMMENT
@@ -1334,6 +1336,7 @@ KW_CASE : 'CASE';
13341336
KW_CAST : 'CAST';
13351337
KW_CATALOG : 'CATALOG';
13361338
KW_CATALOGS : 'CATALOGS';
1339+
KW_COALESCE : 'COALESCE';
13371340
KW_COLUMN : 'COLUMN';
13381341
KW_COLUMNS : 'COLUMNS';
13391342
KW_COMMENT : 'COMMENT';

src/lib/trino/TrinoSql.interp

Lines changed: 3 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)