From 4b7fd37a72cf623efd93b3957260f4a561247fdd Mon Sep 17 00:00:00 2001 From: HSunboy Date: Mon, 23 Dec 2019 17:09:16 +0800 Subject: [PATCH] bugfix: add impala insert round brackets --- .npmignore | 3 ++- package.json | 2 +- src/jison/sql_insert.jison | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.npmignore b/.npmignore index 6f59478..6d6c0df 100644 --- a/.npmignore +++ b/.npmignore @@ -2,4 +2,5 @@ node_modules /test/ package-lock.json .DS_Store -.git \ No newline at end of file +.git +src/ diff --git a/package.json b/package.json index d015439..77d6516 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dt-sql-parser", - "version": "2.0.7", + "version": "2.0.9", "description": "sql,hive,parser ", "keywords": [ "hive", diff --git a/src/jison/sql_insert.jison b/src/jison/sql_insert.jison index 4611b40..61dc992 100755 --- a/src/jison/sql_insert.jison +++ b/src/jison/sql_insert.jison @@ -382,7 +382,7 @@ ImpalaInsertOrUpsertStatement_EDIT ImpalaInsertOrUpsertStatementWithoutCTE : ImpalaInsertOrUpsertLeftPart OptionalImpalaShuffleOrNoShuffle SelectStatement OptionalUnions - | ImpalaInsertOrUpsertLeftPart 'VALUES' ImpalaRowValuesLists + | ImpalaInsertOrUpsertLeftPart 'VALUES' '(' ImpalaRowValuesLists ')' ; ImpalaInsertOrUpsertStatementWithoutCTE_EDIT @@ -400,8 +400,8 @@ ImpalaInsertOrUpsertStatementWithoutCTE_EDIT | ImpalaInsertOrUpsertLeftPart_EDIT OptionalImpalaShuffleOrNoShuffle SelectStatement OptionalUnions | ImpalaInsertOrUpsertLeftPart OptionalImpalaShuffleOrNoShuffle SelectStatement_EDIT OptionalUnions | ImpalaInsertOrUpsertLeftPart OptionalImpalaShuffleOrNoShuffle SelectStatement OptionalUnions_EDIT - | ImpalaInsertOrUpsertLeftPart_EDIT 'VALUES' ImpalaRowValuesLists - | ImpalaInsertOrUpsertLeftPart 'VALUES' ImpalaRowValuesLists_EDIT + | ImpalaInsertOrUpsertLeftPart_EDIT 'VALUES' '(' ImpalaRowValuesLists ')' + | ImpalaInsertOrUpsertLeftPart 'VALUES' '(' ImpalaRowValuesLists_EDIT ')' ; ImpalaInsertOrUpsertLeftPart