fix hive insert syntax
This commit is contained in:
parent
364dc5fcae
commit
0c5f6164f4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dt-sql-parser",
|
||||
"version": "3.0.2",
|
||||
"version": "3.0.3",
|
||||
"description": "sql,hive,parser ",
|
||||
"keywords": [
|
||||
"hive",
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -255,7 +255,7 @@ GenericInsert_EDIT
|
||||
|
||||
InsertValuesList
|
||||
: ParenthesizedRowValuesList
|
||||
| RowValuesList ',' ParenthesizedRowValuesList
|
||||
| ParenthesizedRowValuesList ',' ParenthesizedRowValuesList
|
||||
;
|
||||
|
||||
ParenthesizedRowValuesList
|
||||
|
@ -76,6 +76,11 @@ describe('syntax test', () => {
|
||||
const result = parser.parseSyntax([sql, ''], dtSqlParser.parser.sqlType.Hive);
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
test('insert', () => {
|
||||
const sql = `insert into table user1 values (1, 'a'), (2, 'b')`;
|
||||
const result = parser.parseSyntax([sql, ''], dtSqlParser.parser.sqlType.Hive);
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
test('select table should not be null', () => {
|
||||
const sql = 'select id,name from ';
|
||||
const result = parser.parseSyntax([sql, ''], dtSqlParser.parser.sqlType.Hive) as SyntaxResult;
|
||||
|
Loading…
Reference in New Issue
Block a user