add impala lifecycle
This commit is contained in:
parent
67b3f68113
commit
a486270ab1
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": "2.0.10",
|
||||
"version": "2.0.11",
|
||||
"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
@ -67,7 +67,6 @@
|
||||
<hive>'USER' { return '<hive>USER'; }
|
||||
<hive>'USING' { return '<hive>USING'; }
|
||||
<hive>'VIEWS' { return '<hive>VIEWS'; }
|
||||
<hive>'LIFECYCLE' { return '<hive>LIFECYCLE'; }
|
||||
|
||||
// Non-reserved Keywords
|
||||
<hive>'ABORT' { parser.determineCase(yytext); return '<hive>ABORT'; }
|
||||
@ -331,6 +330,7 @@
|
||||
<between>'AND' { this.popState(); return 'BETWEEN_AND'; }
|
||||
|
||||
// Reserved Keywords
|
||||
'LIFECYCLE' { return 'LIFECYCLE'; }
|
||||
'ALL' { return 'ALL'; }
|
||||
'ALTER' { parser.determineCase(yytext); parser.addStatementTypeLocation('ALTER', yylloc, yy.lexer.upcomingInput()); return 'ALTER'; }
|
||||
'AND' { return 'AND'; }
|
||||
|
@ -157,7 +157,7 @@ TableDefinition
|
||||
|
||||
LifeCyclePart
|
||||
:
|
||||
| '<hive>LIFECYCLE' 'UNSIGNED_INTEGER'
|
||||
| 'LIFECYCLE' 'UNSIGNED_INTEGER'
|
||||
;
|
||||
|
||||
TableDefinition_EDIT
|
||||
|
@ -48,7 +48,8 @@ describe('syntax test', () => {
|
||||
WITH SERDEPROPERTIES ('field.delim'=',', 'line.delim'='\n', 'serialization.format'=',')
|
||||
STORED AS TEXTFILE
|
||||
LOCATION 'hdfs://kudu1'
|
||||
TBLPROPERTIES ('last_modified_by'='anonymous', 'last_modified_time'='1577082098', 'skip.header.line.count'='1')`;
|
||||
TBLPROPERTIES ('last_modified_by'='anonymous', 'last_modified_time'='1577082098', 'skip.header.line.count'='1')
|
||||
lifecycle 888`;
|
||||
const result = parser.parseSyntax([sql, ''], dtSqlParser.parser.sqlType.Impala);
|
||||
expect(result).toBe(false);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user