add primary key support
This commit is contained in:
parent
2962271262
commit
02b00e17e0
File diff suppressed because it is too large
Load Diff
@ -1184,6 +1184,12 @@ sqlListener.prototype.enterDtColType = function (ctx) {
|
||||
// Exit a parse tree produced by sqlParser#dtColType.
|
||||
sqlListener.prototype.exitDtColType = function (ctx) {
|
||||
};
|
||||
// Enter a parse tree produced by sqlParser#dtColIdentifier.
|
||||
sqlListener.prototype.enterDtColIdentifier = function (ctx) {
|
||||
};
|
||||
// Exit a parse tree produced by sqlParser#dtColIdentifier.
|
||||
sqlListener.prototype.exitDtColIdentifier = function (ctx) {
|
||||
};
|
||||
// Enter a parse tree produced by sqlParser#complexColTypeList.
|
||||
sqlListener.prototype.enterComplexColTypeList = function (ctx) {
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -792,6 +792,10 @@ sqlVisitor.prototype.visitDtColTypeList = function (ctx) {
|
||||
sqlVisitor.prototype.visitDtColType = function (ctx) {
|
||||
return this.visitChildren(ctx);
|
||||
};
|
||||
// Visit a parse tree produced by sqlParser#dtColIdentifier.
|
||||
sqlVisitor.prototype.visitDtColIdentifier = function (ctx) {
|
||||
return this.visitChildren(ctx);
|
||||
};
|
||||
// Visit a parse tree produced by sqlParser#complexColTypeList.
|
||||
sqlVisitor.prototype.visitComplexColTypeList = function (ctx) {
|
||||
return this.visitChildren(ctx);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dt-sql-parser",
|
||||
"version": "2.0.6",
|
||||
"version": "2.0.7",
|
||||
"description": "sql,hive,parser ",
|
||||
"keywords": [
|
||||
"hive",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1775,6 +1775,15 @@ sqlListener.prototype.exitDtColType = function(ctx) {
|
||||
};
|
||||
|
||||
|
||||
// Enter a parse tree produced by sqlParser#dtColIdentifier.
|
||||
sqlListener.prototype.enterDtColIdentifier = function(ctx) {
|
||||
};
|
||||
|
||||
// Exit a parse tree produced by sqlParser#dtColIdentifier.
|
||||
sqlListener.prototype.exitDtColIdentifier = function(ctx) {
|
||||
};
|
||||
|
||||
|
||||
// Enter a parse tree produced by sqlParser#complexColTypeList.
|
||||
sqlListener.prototype.enterComplexColTypeList = function(ctx) {
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -1188,6 +1188,12 @@ sqlVisitor.prototype.visitDtColType = function(ctx) {
|
||||
};
|
||||
|
||||
|
||||
// Visit a parse tree produced by sqlParser#dtColIdentifier.
|
||||
sqlVisitor.prototype.visitDtColIdentifier = function(ctx) {
|
||||
return this.visitChildren(ctx);
|
||||
};
|
||||
|
||||
|
||||
// Visit a parse tree produced by sqlParser#complexColTypeList.
|
||||
sqlVisitor.prototype.visitComplexColTypeList = function(ctx) {
|
||||
return this.visitChildren(ctx);
|
||||
|
@ -156,5 +156,17 @@ describe('syntax test', () => {
|
||||
const result = flinksqlParser(sql);
|
||||
expect(result).toBeNull();
|
||||
})
|
||||
test('test primary key', () => {
|
||||
const sql = `create table aa(
|
||||
name.a[1].a varchar as name ,
|
||||
ts int,
|
||||
primary key (id, id[2])
|
||||
) with (
|
||||
type = 'kafka',
|
||||
aa = '12'
|
||||
);`;
|
||||
const result = flinksqlParser(sql);
|
||||
expect(result).toBeNull();
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue
Block a user