add lateral table support
This commit is contained in:
parent
3b6c224e0e
commit
eb0d32751b
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dt-sql-parser",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"description": "sql,hive,parser ",
|
||||
"keywords": [
|
||||
"hive",
|
||||
|
File diff suppressed because one or more lines are too long
@ -238,21 +238,22 @@ ANTI=237
|
||||
LOCAL=238
|
||||
INPATH=239
|
||||
WATERMARK=240
|
||||
STRING=241
|
||||
BIGINT_LITERAL=242
|
||||
SMALLINT_LITERAL=243
|
||||
TINYINT_LITERAL=244
|
||||
INTEGER_VALUE=245
|
||||
DECIMAL_VALUE=246
|
||||
DOUBLE_LITERAL=247
|
||||
BIGDECIMAL_LITERAL=248
|
||||
IDENTIFIER=249
|
||||
BACKQUOTED_IDENTIFIER=250
|
||||
SIMPLE_COMMENT=251
|
||||
BRACKETED_EMPTY_COMMENT=252
|
||||
BRACKETED_COMMENT=253
|
||||
WS=254
|
||||
UNRECOGNIZED=255
|
||||
UNNEST=241
|
||||
STRING=242
|
||||
BIGINT_LITERAL=243
|
||||
SMALLINT_LITERAL=244
|
||||
TINYINT_LITERAL=245
|
||||
INTEGER_VALUE=246
|
||||
DECIMAL_VALUE=247
|
||||
DOUBLE_LITERAL=248
|
||||
BIGDECIMAL_LITERAL=249
|
||||
IDENTIFIER=250
|
||||
BACKQUOTED_IDENTIFIER=251
|
||||
SIMPLE_COMMENT=252
|
||||
BRACKETED_EMPTY_COMMENT=253
|
||||
BRACKETED_COMMENT=254
|
||||
WS=255
|
||||
UNRECOGNIZED=256
|
||||
'('=1
|
||||
')'=2
|
||||
'.'=3
|
||||
@ -485,4 +486,5 @@ UNRECOGNIZED=255
|
||||
'LOCAL'=238
|
||||
'INPATH'=239
|
||||
'WATERMARK'=240
|
||||
'/**/'=252
|
||||
'UNNEST'=241
|
||||
'/**/'=253
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -238,21 +238,22 @@ ANTI=237
|
||||
LOCAL=238
|
||||
INPATH=239
|
||||
WATERMARK=240
|
||||
STRING=241
|
||||
BIGINT_LITERAL=242
|
||||
SMALLINT_LITERAL=243
|
||||
TINYINT_LITERAL=244
|
||||
INTEGER_VALUE=245
|
||||
DECIMAL_VALUE=246
|
||||
DOUBLE_LITERAL=247
|
||||
BIGDECIMAL_LITERAL=248
|
||||
IDENTIFIER=249
|
||||
BACKQUOTED_IDENTIFIER=250
|
||||
SIMPLE_COMMENT=251
|
||||
BRACKETED_EMPTY_COMMENT=252
|
||||
BRACKETED_COMMENT=253
|
||||
WS=254
|
||||
UNRECOGNIZED=255
|
||||
UNNEST=241
|
||||
STRING=242
|
||||
BIGINT_LITERAL=243
|
||||
SMALLINT_LITERAL=244
|
||||
TINYINT_LITERAL=245
|
||||
INTEGER_VALUE=246
|
||||
DECIMAL_VALUE=247
|
||||
DOUBLE_LITERAL=248
|
||||
BIGDECIMAL_LITERAL=249
|
||||
IDENTIFIER=250
|
||||
BACKQUOTED_IDENTIFIER=251
|
||||
SIMPLE_COMMENT=252
|
||||
BRACKETED_EMPTY_COMMENT=253
|
||||
BRACKETED_COMMENT=254
|
||||
WS=255
|
||||
UNRECOGNIZED=256
|
||||
'('=1
|
||||
')'=2
|
||||
'.'=3
|
||||
@ -485,4 +486,5 @@ UNRECOGNIZED=255
|
||||
'LOCAL'=238
|
||||
'INPATH'=239
|
||||
'WATERMARK'=240
|
||||
'/**/'=252
|
||||
'UNNEST'=241
|
||||
'/**/'=253
|
||||
|
File diff suppressed because one or more lines are too long
@ -82,6 +82,14 @@ describe('syntax test', () => {
|
||||
expect(result.token.start).toBe(0);
|
||||
expect(result.token.stop).toBe(4);
|
||||
});
|
||||
test('test lateral table', () => {
|
||||
const sql = `select
|
||||
id
|
||||
FROM
|
||||
userTable, LATERAL table(json(mess)) as t(ord, name_id);`;
|
||||
const result = flinksqlParser(sql);
|
||||
expect(result).toBeNull();
|
||||
});
|
||||
test('syntax error', () => {
|
||||
const sql = 'select id from user.id; \nselect id from us*er.id; \nselect id from *user.id;';
|
||||
const result = flinksqlParser(sql);
|
||||
|
Loading…
Reference in New Issue
Block a user