Function supports Squarebrackets syntax

This commit is contained in:
HSunboy 2018-12-10 16:10:37 +08:00
parent 77bbf57d28
commit aebf4e5ec8
4 changed files with 1039 additions and 1034 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3314,9 +3314,14 @@ ArbitraryFunctionName
| 'TRUNCATE' | 'TRUNCATE'
; ;
OptionalFunctionSquareBracket
: HiveOrImpalaLeftSquareBracket ValueExpression HiveOrImpalaRightSquareBracket
| HiveOrImpalaLeftSquareBracket HiveOrImpalaRightSquareBracket
|
;
ArbitraryFunctionRightPart ArbitraryFunctionRightPart
: '(' ')' : '(' ')' OptionalFunctionSquareBracket
| '(' ValueExpressionList ')' -> { expression: $2 } | '(' ValueExpressionList ')' OptionalFunctionSquareBracket -> { expression: $2 }
; ;
ArbitraryFunctionRightPart_EDIT ArbitraryFunctionRightPart_EDIT

View File

@ -1,6 +1,6 @@
{ {
"name": "dt-sql-parser", "name": "dt-sql-parser",
"version": "1.1.8", "version": "1.1.9",
"description": "sql,hive,parser ", "description": "sql,hive,parser ",
"keywords":["hive","hql","sql","parser"], "keywords":["hive","hql","sql","parser"],
"main": "index.js", "main": "index.js",