update sql parser name
This commit is contained in:
parent
0d47b7debc
commit
edbc87e8f1
@ -14,7 +14,7 @@
|
|||||||
* This file is an adaptation of Presto's presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 grammar.
|
* This file is an adaptation of Presto's presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 grammar.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
grammar SqlBase;
|
grammar SparkSql;
|
||||||
|
|
||||||
@parser::members {
|
@parser::members {
|
||||||
/**
|
/**
|
@ -1,4 +1,4 @@
|
|||||||
// Generated from /Users/jinjiongxi/workspace/dt-sql-parser/src/grammar/spark/SqlBase.g4 by ANTLR 4.8
|
// Generated from /Users/jinjiongxi/workspace/dt-sql-parser/src/grammar/spark/SparkSql.g4 by ANTLR 4.8
|
||||||
// jshint ignore: start
|
// jshint ignore: start
|
||||||
var antlr4 = require('antlr4/index');
|
var antlr4 = require('antlr4/index');
|
||||||
|
|
||||||
@ -1755,7 +1755,7 @@ var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
|
|||||||
|
|
||||||
var decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });
|
var decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });
|
||||||
|
|
||||||
function SqlBaseLexer(input) {
|
function SparkSqlLexer(input) {
|
||||||
antlr4.Lexer.call(this, input);
|
antlr4.Lexer.call(this, input);
|
||||||
this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
|
this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
|
||||||
|
|
||||||
@ -1792,316 +1792,316 @@ function SqlBaseLexer(input) {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
SqlBaseLexer.prototype = Object.create(antlr4.Lexer.prototype);
|
SparkSqlLexer.prototype = Object.create(antlr4.Lexer.prototype);
|
||||||
SqlBaseLexer.prototype.constructor = SqlBaseLexer;
|
SparkSqlLexer.prototype.constructor = SparkSqlLexer;
|
||||||
|
|
||||||
Object.defineProperty(SqlBaseLexer.prototype, "atn", {
|
Object.defineProperty(SparkSqlLexer.prototype, "atn", {
|
||||||
get : function() {
|
get : function() {
|
||||||
return atn;
|
return atn;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
SqlBaseLexer.EOF = antlr4.Token.EOF;
|
SparkSqlLexer.EOF = antlr4.Token.EOF;
|
||||||
SqlBaseLexer.T__0 = 1;
|
SparkSqlLexer.T__0 = 1;
|
||||||
SqlBaseLexer.T__1 = 2;
|
SparkSqlLexer.T__1 = 2;
|
||||||
SqlBaseLexer.T__2 = 3;
|
SparkSqlLexer.T__2 = 3;
|
||||||
SqlBaseLexer.T__3 = 4;
|
SparkSqlLexer.T__3 = 4;
|
||||||
SqlBaseLexer.T__4 = 5;
|
SparkSqlLexer.T__4 = 5;
|
||||||
SqlBaseLexer.T__5 = 6;
|
SparkSqlLexer.T__5 = 6;
|
||||||
SqlBaseLexer.T__6 = 7;
|
SparkSqlLexer.T__6 = 7;
|
||||||
SqlBaseLexer.T__7 = 8;
|
SparkSqlLexer.T__7 = 8;
|
||||||
SqlBaseLexer.T__8 = 9;
|
SparkSqlLexer.T__8 = 9;
|
||||||
SqlBaseLexer.T__9 = 10;
|
SparkSqlLexer.T__9 = 10;
|
||||||
SqlBaseLexer.T__10 = 11;
|
SparkSqlLexer.T__10 = 11;
|
||||||
SqlBaseLexer.ADD = 12;
|
SparkSqlLexer.ADD = 12;
|
||||||
SqlBaseLexer.AFTER = 13;
|
SparkSqlLexer.AFTER = 13;
|
||||||
SqlBaseLexer.ALL = 14;
|
SparkSqlLexer.ALL = 14;
|
||||||
SqlBaseLexer.ALTER = 15;
|
SparkSqlLexer.ALTER = 15;
|
||||||
SqlBaseLexer.ANALYZE = 16;
|
SparkSqlLexer.ANALYZE = 16;
|
||||||
SqlBaseLexer.AND = 17;
|
SparkSqlLexer.AND = 17;
|
||||||
SqlBaseLexer.ANTI = 18;
|
SparkSqlLexer.ANTI = 18;
|
||||||
SqlBaseLexer.ANY = 19;
|
SparkSqlLexer.ANY = 19;
|
||||||
SqlBaseLexer.ARCHIVE = 20;
|
SparkSqlLexer.ARCHIVE = 20;
|
||||||
SqlBaseLexer.ARRAY = 21;
|
SparkSqlLexer.ARRAY = 21;
|
||||||
SqlBaseLexer.AS = 22;
|
SparkSqlLexer.AS = 22;
|
||||||
SqlBaseLexer.ASC = 23;
|
SparkSqlLexer.ASC = 23;
|
||||||
SqlBaseLexer.AT = 24;
|
SparkSqlLexer.AT = 24;
|
||||||
SqlBaseLexer.AUTHORIZATION = 25;
|
SparkSqlLexer.AUTHORIZATION = 25;
|
||||||
SqlBaseLexer.BETWEEN = 26;
|
SparkSqlLexer.BETWEEN = 26;
|
||||||
SqlBaseLexer.BOTH = 27;
|
SparkSqlLexer.BOTH = 27;
|
||||||
SqlBaseLexer.BUCKET = 28;
|
SparkSqlLexer.BUCKET = 28;
|
||||||
SqlBaseLexer.BUCKETS = 29;
|
SparkSqlLexer.BUCKETS = 29;
|
||||||
SqlBaseLexer.BY = 30;
|
SparkSqlLexer.BY = 30;
|
||||||
SqlBaseLexer.CACHE = 31;
|
SparkSqlLexer.CACHE = 31;
|
||||||
SqlBaseLexer.CASCADE = 32;
|
SparkSqlLexer.CASCADE = 32;
|
||||||
SqlBaseLexer.CASE = 33;
|
SparkSqlLexer.CASE = 33;
|
||||||
SqlBaseLexer.CAST = 34;
|
SparkSqlLexer.CAST = 34;
|
||||||
SqlBaseLexer.CHANGE = 35;
|
SparkSqlLexer.CHANGE = 35;
|
||||||
SqlBaseLexer.CHECK = 36;
|
SparkSqlLexer.CHECK = 36;
|
||||||
SqlBaseLexer.CLEAR = 37;
|
SparkSqlLexer.CLEAR = 37;
|
||||||
SqlBaseLexer.CLUSTER = 38;
|
SparkSqlLexer.CLUSTER = 38;
|
||||||
SqlBaseLexer.CLUSTERED = 39;
|
SparkSqlLexer.CLUSTERED = 39;
|
||||||
SqlBaseLexer.CODEGEN = 40;
|
SparkSqlLexer.CODEGEN = 40;
|
||||||
SqlBaseLexer.COLLATE = 41;
|
SparkSqlLexer.COLLATE = 41;
|
||||||
SqlBaseLexer.COLLECTION = 42;
|
SparkSqlLexer.COLLECTION = 42;
|
||||||
SqlBaseLexer.COLUMN = 43;
|
SparkSqlLexer.COLUMN = 43;
|
||||||
SqlBaseLexer.COLUMNS = 44;
|
SparkSqlLexer.COLUMNS = 44;
|
||||||
SqlBaseLexer.COMMENT = 45;
|
SparkSqlLexer.COMMENT = 45;
|
||||||
SqlBaseLexer.COMMIT = 46;
|
SparkSqlLexer.COMMIT = 46;
|
||||||
SqlBaseLexer.COMPACT = 47;
|
SparkSqlLexer.COMPACT = 47;
|
||||||
SqlBaseLexer.COMPACTIONS = 48;
|
SparkSqlLexer.COMPACTIONS = 48;
|
||||||
SqlBaseLexer.COMPUTE = 49;
|
SparkSqlLexer.COMPUTE = 49;
|
||||||
SqlBaseLexer.CONCATENATE = 50;
|
SparkSqlLexer.CONCATENATE = 50;
|
||||||
SqlBaseLexer.CONSTRAINT = 51;
|
SparkSqlLexer.CONSTRAINT = 51;
|
||||||
SqlBaseLexer.COST = 52;
|
SparkSqlLexer.COST = 52;
|
||||||
SqlBaseLexer.CREATE = 53;
|
SparkSqlLexer.CREATE = 53;
|
||||||
SqlBaseLexer.CROSS = 54;
|
SparkSqlLexer.CROSS = 54;
|
||||||
SqlBaseLexer.CUBE = 55;
|
SparkSqlLexer.CUBE = 55;
|
||||||
SqlBaseLexer.CURRENT = 56;
|
SparkSqlLexer.CURRENT = 56;
|
||||||
SqlBaseLexer.CURRENT_DATE = 57;
|
SparkSqlLexer.CURRENT_DATE = 57;
|
||||||
SqlBaseLexer.CURRENT_TIME = 58;
|
SparkSqlLexer.CURRENT_TIME = 58;
|
||||||
SqlBaseLexer.CURRENT_TIMESTAMP = 59;
|
SparkSqlLexer.CURRENT_TIMESTAMP = 59;
|
||||||
SqlBaseLexer.CURRENT_USER = 60;
|
SparkSqlLexer.CURRENT_USER = 60;
|
||||||
SqlBaseLexer.DATA = 61;
|
SparkSqlLexer.DATA = 61;
|
||||||
SqlBaseLexer.DATABASE = 62;
|
SparkSqlLexer.DATABASE = 62;
|
||||||
SqlBaseLexer.DATABASES = 63;
|
SparkSqlLexer.DATABASES = 63;
|
||||||
SqlBaseLexer.DBPROPERTIES = 64;
|
SparkSqlLexer.DBPROPERTIES = 64;
|
||||||
SqlBaseLexer.DEFINED = 65;
|
SparkSqlLexer.DEFINED = 65;
|
||||||
SqlBaseLexer.DELETE = 66;
|
SparkSqlLexer.DELETE = 66;
|
||||||
SqlBaseLexer.DELIMITED = 67;
|
SparkSqlLexer.DELIMITED = 67;
|
||||||
SqlBaseLexer.DESC = 68;
|
SparkSqlLexer.DESC = 68;
|
||||||
SqlBaseLexer.DESCRIBE = 69;
|
SparkSqlLexer.DESCRIBE = 69;
|
||||||
SqlBaseLexer.DFS = 70;
|
SparkSqlLexer.DFS = 70;
|
||||||
SqlBaseLexer.DIRECTORIES = 71;
|
SparkSqlLexer.DIRECTORIES = 71;
|
||||||
SqlBaseLexer.DIRECTORY = 72;
|
SparkSqlLexer.DIRECTORY = 72;
|
||||||
SqlBaseLexer.DISTINCT = 73;
|
SparkSqlLexer.DISTINCT = 73;
|
||||||
SqlBaseLexer.DISTRIBUTE = 74;
|
SparkSqlLexer.DISTRIBUTE = 74;
|
||||||
SqlBaseLexer.DIV = 75;
|
SparkSqlLexer.DIV = 75;
|
||||||
SqlBaseLexer.DROP = 76;
|
SparkSqlLexer.DROP = 76;
|
||||||
SqlBaseLexer.ELSE = 77;
|
SparkSqlLexer.ELSE = 77;
|
||||||
SqlBaseLexer.END = 78;
|
SparkSqlLexer.END = 78;
|
||||||
SqlBaseLexer.ESCAPE = 79;
|
SparkSqlLexer.ESCAPE = 79;
|
||||||
SqlBaseLexer.ESCAPED = 80;
|
SparkSqlLexer.ESCAPED = 80;
|
||||||
SqlBaseLexer.EXCEPT = 81;
|
SparkSqlLexer.EXCEPT = 81;
|
||||||
SqlBaseLexer.EXCHANGE = 82;
|
SparkSqlLexer.EXCHANGE = 82;
|
||||||
SqlBaseLexer.EXISTS = 83;
|
SparkSqlLexer.EXISTS = 83;
|
||||||
SqlBaseLexer.EXPLAIN = 84;
|
SparkSqlLexer.EXPLAIN = 84;
|
||||||
SqlBaseLexer.EXPORT = 85;
|
SparkSqlLexer.EXPORT = 85;
|
||||||
SqlBaseLexer.EXTENDED = 86;
|
SparkSqlLexer.EXTENDED = 86;
|
||||||
SqlBaseLexer.EXTERNAL = 87;
|
SparkSqlLexer.EXTERNAL = 87;
|
||||||
SqlBaseLexer.EXTRACT = 88;
|
SparkSqlLexer.EXTRACT = 88;
|
||||||
SqlBaseLexer.FALSE = 89;
|
SparkSqlLexer.FALSE = 89;
|
||||||
SqlBaseLexer.FETCH = 90;
|
SparkSqlLexer.FETCH = 90;
|
||||||
SqlBaseLexer.FIELDS = 91;
|
SparkSqlLexer.FIELDS = 91;
|
||||||
SqlBaseLexer.FILTER = 92;
|
SparkSqlLexer.FILTER = 92;
|
||||||
SqlBaseLexer.FILEFORMAT = 93;
|
SparkSqlLexer.FILEFORMAT = 93;
|
||||||
SqlBaseLexer.FIRST = 94;
|
SparkSqlLexer.FIRST = 94;
|
||||||
SqlBaseLexer.FOLLOWING = 95;
|
SparkSqlLexer.FOLLOWING = 95;
|
||||||
SqlBaseLexer.FOR = 96;
|
SparkSqlLexer.FOR = 96;
|
||||||
SqlBaseLexer.FOREIGN = 97;
|
SparkSqlLexer.FOREIGN = 97;
|
||||||
SqlBaseLexer.FORMAT = 98;
|
SparkSqlLexer.FORMAT = 98;
|
||||||
SqlBaseLexer.FORMATTED = 99;
|
SparkSqlLexer.FORMATTED = 99;
|
||||||
SqlBaseLexer.FROM = 100;
|
SparkSqlLexer.FROM = 100;
|
||||||
SqlBaseLexer.FULL = 101;
|
SparkSqlLexer.FULL = 101;
|
||||||
SqlBaseLexer.FUNCTION = 102;
|
SparkSqlLexer.FUNCTION = 102;
|
||||||
SqlBaseLexer.FUNCTIONS = 103;
|
SparkSqlLexer.FUNCTIONS = 103;
|
||||||
SqlBaseLexer.GLOBAL = 104;
|
SparkSqlLexer.GLOBAL = 104;
|
||||||
SqlBaseLexer.GRANT = 105;
|
SparkSqlLexer.GRANT = 105;
|
||||||
SqlBaseLexer.GROUP = 106;
|
SparkSqlLexer.GROUP = 106;
|
||||||
SqlBaseLexer.GROUPING = 107;
|
SparkSqlLexer.GROUPING = 107;
|
||||||
SqlBaseLexer.HAVING = 108;
|
SparkSqlLexer.HAVING = 108;
|
||||||
SqlBaseLexer.IF = 109;
|
SparkSqlLexer.IF = 109;
|
||||||
SqlBaseLexer.IGNORE = 110;
|
SparkSqlLexer.IGNORE = 110;
|
||||||
SqlBaseLexer.IMPORT = 111;
|
SparkSqlLexer.IMPORT = 111;
|
||||||
SqlBaseLexer.IN = 112;
|
SparkSqlLexer.IN = 112;
|
||||||
SqlBaseLexer.INDEX = 113;
|
SparkSqlLexer.INDEX = 113;
|
||||||
SqlBaseLexer.INDEXES = 114;
|
SparkSqlLexer.INDEXES = 114;
|
||||||
SqlBaseLexer.INNER = 115;
|
SparkSqlLexer.INNER = 115;
|
||||||
SqlBaseLexer.INPATH = 116;
|
SparkSqlLexer.INPATH = 116;
|
||||||
SqlBaseLexer.INPUTFORMAT = 117;
|
SparkSqlLexer.INPUTFORMAT = 117;
|
||||||
SqlBaseLexer.INSERT = 118;
|
SparkSqlLexer.INSERT = 118;
|
||||||
SqlBaseLexer.INTERSECT = 119;
|
SparkSqlLexer.INTERSECT = 119;
|
||||||
SqlBaseLexer.INTERVAL = 120;
|
SparkSqlLexer.INTERVAL = 120;
|
||||||
SqlBaseLexer.INTO = 121;
|
SparkSqlLexer.INTO = 121;
|
||||||
SqlBaseLexer.IS = 122;
|
SparkSqlLexer.IS = 122;
|
||||||
SqlBaseLexer.ITEMS = 123;
|
SparkSqlLexer.ITEMS = 123;
|
||||||
SqlBaseLexer.JOIN = 124;
|
SparkSqlLexer.JOIN = 124;
|
||||||
SqlBaseLexer.KEYS = 125;
|
SparkSqlLexer.KEYS = 125;
|
||||||
SqlBaseLexer.LAST = 126;
|
SparkSqlLexer.LAST = 126;
|
||||||
SqlBaseLexer.LATERAL = 127;
|
SparkSqlLexer.LATERAL = 127;
|
||||||
SqlBaseLexer.LAZY = 128;
|
SparkSqlLexer.LAZY = 128;
|
||||||
SqlBaseLexer.LEADING = 129;
|
SparkSqlLexer.LEADING = 129;
|
||||||
SqlBaseLexer.LEFT = 130;
|
SparkSqlLexer.LEFT = 130;
|
||||||
SqlBaseLexer.LIKE = 131;
|
SparkSqlLexer.LIKE = 131;
|
||||||
SqlBaseLexer.LIMIT = 132;
|
SparkSqlLexer.LIMIT = 132;
|
||||||
SqlBaseLexer.LINES = 133;
|
SparkSqlLexer.LINES = 133;
|
||||||
SqlBaseLexer.LIST = 134;
|
SparkSqlLexer.LIST = 134;
|
||||||
SqlBaseLexer.LOAD = 135;
|
SparkSqlLexer.LOAD = 135;
|
||||||
SqlBaseLexer.LOCAL = 136;
|
SparkSqlLexer.LOCAL = 136;
|
||||||
SqlBaseLexer.LOCATION = 137;
|
SparkSqlLexer.LOCATION = 137;
|
||||||
SqlBaseLexer.LOCK = 138;
|
SparkSqlLexer.LOCK = 138;
|
||||||
SqlBaseLexer.LOCKS = 139;
|
SparkSqlLexer.LOCKS = 139;
|
||||||
SqlBaseLexer.LOGICAL = 140;
|
SparkSqlLexer.LOGICAL = 140;
|
||||||
SqlBaseLexer.MACRO = 141;
|
SparkSqlLexer.MACRO = 141;
|
||||||
SqlBaseLexer.MAP = 142;
|
SparkSqlLexer.MAP = 142;
|
||||||
SqlBaseLexer.MATCHED = 143;
|
SparkSqlLexer.MATCHED = 143;
|
||||||
SqlBaseLexer.MERGE = 144;
|
SparkSqlLexer.MERGE = 144;
|
||||||
SqlBaseLexer.MSCK = 145;
|
SparkSqlLexer.MSCK = 145;
|
||||||
SqlBaseLexer.NAMESPACE = 146;
|
SparkSqlLexer.NAMESPACE = 146;
|
||||||
SqlBaseLexer.NAMESPACES = 147;
|
SparkSqlLexer.NAMESPACES = 147;
|
||||||
SqlBaseLexer.NATURAL = 148;
|
SparkSqlLexer.NATURAL = 148;
|
||||||
SqlBaseLexer.NO = 149;
|
SparkSqlLexer.NO = 149;
|
||||||
SqlBaseLexer.NOT = 150;
|
SparkSqlLexer.NOT = 150;
|
||||||
SqlBaseLexer.NULL = 151;
|
SparkSqlLexer.NULL = 151;
|
||||||
SqlBaseLexer.NULLS = 152;
|
SparkSqlLexer.NULLS = 152;
|
||||||
SqlBaseLexer.OF = 153;
|
SparkSqlLexer.OF = 153;
|
||||||
SqlBaseLexer.ON = 154;
|
SparkSqlLexer.ON = 154;
|
||||||
SqlBaseLexer.ONLY = 155;
|
SparkSqlLexer.ONLY = 155;
|
||||||
SqlBaseLexer.OPTION = 156;
|
SparkSqlLexer.OPTION = 156;
|
||||||
SqlBaseLexer.OPTIONS = 157;
|
SparkSqlLexer.OPTIONS = 157;
|
||||||
SqlBaseLexer.OR = 158;
|
SparkSqlLexer.OR = 158;
|
||||||
SqlBaseLexer.ORDER = 159;
|
SparkSqlLexer.ORDER = 159;
|
||||||
SqlBaseLexer.OUT = 160;
|
SparkSqlLexer.OUT = 160;
|
||||||
SqlBaseLexer.OUTER = 161;
|
SparkSqlLexer.OUTER = 161;
|
||||||
SqlBaseLexer.OUTPUTFORMAT = 162;
|
SparkSqlLexer.OUTPUTFORMAT = 162;
|
||||||
SqlBaseLexer.OVER = 163;
|
SparkSqlLexer.OVER = 163;
|
||||||
SqlBaseLexer.OVERLAPS = 164;
|
SparkSqlLexer.OVERLAPS = 164;
|
||||||
SqlBaseLexer.OVERLAY = 165;
|
SparkSqlLexer.OVERLAY = 165;
|
||||||
SqlBaseLexer.OVERWRITE = 166;
|
SparkSqlLexer.OVERWRITE = 166;
|
||||||
SqlBaseLexer.PARTITION = 167;
|
SparkSqlLexer.PARTITION = 167;
|
||||||
SqlBaseLexer.PARTITIONED = 168;
|
SparkSqlLexer.PARTITIONED = 168;
|
||||||
SqlBaseLexer.PARTITIONS = 169;
|
SparkSqlLexer.PARTITIONS = 169;
|
||||||
SqlBaseLexer.PERCENTLIT = 170;
|
SparkSqlLexer.PERCENTLIT = 170;
|
||||||
SqlBaseLexer.PIVOT = 171;
|
SparkSqlLexer.PIVOT = 171;
|
||||||
SqlBaseLexer.PLACING = 172;
|
SparkSqlLexer.PLACING = 172;
|
||||||
SqlBaseLexer.POSITION = 173;
|
SparkSqlLexer.POSITION = 173;
|
||||||
SqlBaseLexer.PRECEDING = 174;
|
SparkSqlLexer.PRECEDING = 174;
|
||||||
SqlBaseLexer.PRIMARY = 175;
|
SparkSqlLexer.PRIMARY = 175;
|
||||||
SqlBaseLexer.PRINCIPALS = 176;
|
SparkSqlLexer.PRINCIPALS = 176;
|
||||||
SqlBaseLexer.PROPERTIES = 177;
|
SparkSqlLexer.PROPERTIES = 177;
|
||||||
SqlBaseLexer.PURGE = 178;
|
SparkSqlLexer.PURGE = 178;
|
||||||
SqlBaseLexer.QUERY = 179;
|
SparkSqlLexer.QUERY = 179;
|
||||||
SqlBaseLexer.RANGE = 180;
|
SparkSqlLexer.RANGE = 180;
|
||||||
SqlBaseLexer.RECORDREADER = 181;
|
SparkSqlLexer.RECORDREADER = 181;
|
||||||
SqlBaseLexer.RECORDWRITER = 182;
|
SparkSqlLexer.RECORDWRITER = 182;
|
||||||
SqlBaseLexer.RECOVER = 183;
|
SparkSqlLexer.RECOVER = 183;
|
||||||
SqlBaseLexer.REDUCE = 184;
|
SparkSqlLexer.REDUCE = 184;
|
||||||
SqlBaseLexer.REFERENCES = 185;
|
SparkSqlLexer.REFERENCES = 185;
|
||||||
SqlBaseLexer.REFRESH = 186;
|
SparkSqlLexer.REFRESH = 186;
|
||||||
SqlBaseLexer.RENAME = 187;
|
SparkSqlLexer.RENAME = 187;
|
||||||
SqlBaseLexer.REPAIR = 188;
|
SparkSqlLexer.REPAIR = 188;
|
||||||
SqlBaseLexer.REPLACE = 189;
|
SparkSqlLexer.REPLACE = 189;
|
||||||
SqlBaseLexer.RESET = 190;
|
SparkSqlLexer.RESET = 190;
|
||||||
SqlBaseLexer.RESTRICT = 191;
|
SparkSqlLexer.RESTRICT = 191;
|
||||||
SqlBaseLexer.REVOKE = 192;
|
SparkSqlLexer.REVOKE = 192;
|
||||||
SqlBaseLexer.RIGHT = 193;
|
SparkSqlLexer.RIGHT = 193;
|
||||||
SqlBaseLexer.RLIKE = 194;
|
SparkSqlLexer.RLIKE = 194;
|
||||||
SqlBaseLexer.ROLE = 195;
|
SparkSqlLexer.ROLE = 195;
|
||||||
SqlBaseLexer.ROLES = 196;
|
SparkSqlLexer.ROLES = 196;
|
||||||
SqlBaseLexer.ROLLBACK = 197;
|
SparkSqlLexer.ROLLBACK = 197;
|
||||||
SqlBaseLexer.ROLLUP = 198;
|
SparkSqlLexer.ROLLUP = 198;
|
||||||
SqlBaseLexer.ROW = 199;
|
SparkSqlLexer.ROW = 199;
|
||||||
SqlBaseLexer.ROWS = 200;
|
SparkSqlLexer.ROWS = 200;
|
||||||
SqlBaseLexer.SCHEMA = 201;
|
SparkSqlLexer.SCHEMA = 201;
|
||||||
SqlBaseLexer.SELECT = 202;
|
SparkSqlLexer.SELECT = 202;
|
||||||
SqlBaseLexer.SEMI = 203;
|
SparkSqlLexer.SEMI = 203;
|
||||||
SqlBaseLexer.SEPARATED = 204;
|
SparkSqlLexer.SEPARATED = 204;
|
||||||
SqlBaseLexer.SERDE = 205;
|
SparkSqlLexer.SERDE = 205;
|
||||||
SqlBaseLexer.SERDEPROPERTIES = 206;
|
SparkSqlLexer.SERDEPROPERTIES = 206;
|
||||||
SqlBaseLexer.SESSION_USER = 207;
|
SparkSqlLexer.SESSION_USER = 207;
|
||||||
SqlBaseLexer.SET = 208;
|
SparkSqlLexer.SET = 208;
|
||||||
SqlBaseLexer.SETMINUS = 209;
|
SparkSqlLexer.SETMINUS = 209;
|
||||||
SqlBaseLexer.SETS = 210;
|
SparkSqlLexer.SETS = 210;
|
||||||
SqlBaseLexer.SHOW = 211;
|
SparkSqlLexer.SHOW = 211;
|
||||||
SqlBaseLexer.SKEWED = 212;
|
SparkSqlLexer.SKEWED = 212;
|
||||||
SqlBaseLexer.SOME = 213;
|
SparkSqlLexer.SOME = 213;
|
||||||
SqlBaseLexer.SORT = 214;
|
SparkSqlLexer.SORT = 214;
|
||||||
SqlBaseLexer.SORTED = 215;
|
SparkSqlLexer.SORTED = 215;
|
||||||
SqlBaseLexer.START = 216;
|
SparkSqlLexer.START = 216;
|
||||||
SqlBaseLexer.STATISTICS = 217;
|
SparkSqlLexer.STATISTICS = 217;
|
||||||
SqlBaseLexer.STORED = 218;
|
SparkSqlLexer.STORED = 218;
|
||||||
SqlBaseLexer.STRATIFY = 219;
|
SparkSqlLexer.STRATIFY = 219;
|
||||||
SqlBaseLexer.STRUCT = 220;
|
SparkSqlLexer.STRUCT = 220;
|
||||||
SqlBaseLexer.SUBSTR = 221;
|
SparkSqlLexer.SUBSTR = 221;
|
||||||
SqlBaseLexer.SUBSTRING = 222;
|
SparkSqlLexer.SUBSTRING = 222;
|
||||||
SqlBaseLexer.TABLE = 223;
|
SparkSqlLexer.TABLE = 223;
|
||||||
SqlBaseLexer.TABLES = 224;
|
SparkSqlLexer.TABLES = 224;
|
||||||
SqlBaseLexer.TABLESAMPLE = 225;
|
SparkSqlLexer.TABLESAMPLE = 225;
|
||||||
SqlBaseLexer.TBLPROPERTIES = 226;
|
SparkSqlLexer.TBLPROPERTIES = 226;
|
||||||
SqlBaseLexer.TEMPORARY = 227;
|
SparkSqlLexer.TEMPORARY = 227;
|
||||||
SqlBaseLexer.TERMINATED = 228;
|
SparkSqlLexer.TERMINATED = 228;
|
||||||
SqlBaseLexer.THEN = 229;
|
SparkSqlLexer.THEN = 229;
|
||||||
SqlBaseLexer.TIME = 230;
|
SparkSqlLexer.TIME = 230;
|
||||||
SqlBaseLexer.TO = 231;
|
SparkSqlLexer.TO = 231;
|
||||||
SqlBaseLexer.TOUCH = 232;
|
SparkSqlLexer.TOUCH = 232;
|
||||||
SqlBaseLexer.TRAILING = 233;
|
SparkSqlLexer.TRAILING = 233;
|
||||||
SqlBaseLexer.TRANSACTION = 234;
|
SparkSqlLexer.TRANSACTION = 234;
|
||||||
SqlBaseLexer.TRANSACTIONS = 235;
|
SparkSqlLexer.TRANSACTIONS = 235;
|
||||||
SqlBaseLexer.TRANSFORM = 236;
|
SparkSqlLexer.TRANSFORM = 236;
|
||||||
SqlBaseLexer.TRIM = 237;
|
SparkSqlLexer.TRIM = 237;
|
||||||
SqlBaseLexer.TRUE = 238;
|
SparkSqlLexer.TRUE = 238;
|
||||||
SqlBaseLexer.TRUNCATE = 239;
|
SparkSqlLexer.TRUNCATE = 239;
|
||||||
SqlBaseLexer.TYPE = 240;
|
SparkSqlLexer.TYPE = 240;
|
||||||
SqlBaseLexer.UNARCHIVE = 241;
|
SparkSqlLexer.UNARCHIVE = 241;
|
||||||
SqlBaseLexer.UNBOUNDED = 242;
|
SparkSqlLexer.UNBOUNDED = 242;
|
||||||
SqlBaseLexer.UNCACHE = 243;
|
SparkSqlLexer.UNCACHE = 243;
|
||||||
SqlBaseLexer.UNION = 244;
|
SparkSqlLexer.UNION = 244;
|
||||||
SqlBaseLexer.UNIQUE = 245;
|
SparkSqlLexer.UNIQUE = 245;
|
||||||
SqlBaseLexer.UNKNOWN = 246;
|
SparkSqlLexer.UNKNOWN = 246;
|
||||||
SqlBaseLexer.UNLOCK = 247;
|
SparkSqlLexer.UNLOCK = 247;
|
||||||
SqlBaseLexer.UNSET = 248;
|
SparkSqlLexer.UNSET = 248;
|
||||||
SqlBaseLexer.UPDATE = 249;
|
SparkSqlLexer.UPDATE = 249;
|
||||||
SqlBaseLexer.USE = 250;
|
SparkSqlLexer.USE = 250;
|
||||||
SqlBaseLexer.USER = 251;
|
SparkSqlLexer.USER = 251;
|
||||||
SqlBaseLexer.USING = 252;
|
SparkSqlLexer.USING = 252;
|
||||||
SqlBaseLexer.VALUES = 253;
|
SparkSqlLexer.VALUES = 253;
|
||||||
SqlBaseLexer.VIEW = 254;
|
SparkSqlLexer.VIEW = 254;
|
||||||
SqlBaseLexer.VIEWS = 255;
|
SparkSqlLexer.VIEWS = 255;
|
||||||
SqlBaseLexer.WHEN = 256;
|
SparkSqlLexer.WHEN = 256;
|
||||||
SqlBaseLexer.WHERE = 257;
|
SparkSqlLexer.WHERE = 257;
|
||||||
SqlBaseLexer.WINDOW = 258;
|
SparkSqlLexer.WINDOW = 258;
|
||||||
SqlBaseLexer.WITH = 259;
|
SparkSqlLexer.WITH = 259;
|
||||||
SqlBaseLexer.ZONE = 260;
|
SparkSqlLexer.ZONE = 260;
|
||||||
SqlBaseLexer.EQ = 261;
|
SparkSqlLexer.EQ = 261;
|
||||||
SqlBaseLexer.NSEQ = 262;
|
SparkSqlLexer.NSEQ = 262;
|
||||||
SqlBaseLexer.NEQ = 263;
|
SparkSqlLexer.NEQ = 263;
|
||||||
SqlBaseLexer.NEQJ = 264;
|
SparkSqlLexer.NEQJ = 264;
|
||||||
SqlBaseLexer.LT = 265;
|
SparkSqlLexer.LT = 265;
|
||||||
SqlBaseLexer.LTE = 266;
|
SparkSqlLexer.LTE = 266;
|
||||||
SqlBaseLexer.GT = 267;
|
SparkSqlLexer.GT = 267;
|
||||||
SqlBaseLexer.GTE = 268;
|
SparkSqlLexer.GTE = 268;
|
||||||
SqlBaseLexer.PLUS = 269;
|
SparkSqlLexer.PLUS = 269;
|
||||||
SqlBaseLexer.MINUS = 270;
|
SparkSqlLexer.MINUS = 270;
|
||||||
SqlBaseLexer.ASTERISK = 271;
|
SparkSqlLexer.ASTERISK = 271;
|
||||||
SqlBaseLexer.SLASH = 272;
|
SparkSqlLexer.SLASH = 272;
|
||||||
SqlBaseLexer.PERCENT = 273;
|
SparkSqlLexer.PERCENT = 273;
|
||||||
SqlBaseLexer.TILDE = 274;
|
SparkSqlLexer.TILDE = 274;
|
||||||
SqlBaseLexer.AMPERSAND = 275;
|
SparkSqlLexer.AMPERSAND = 275;
|
||||||
SqlBaseLexer.PIPE = 276;
|
SparkSqlLexer.PIPE = 276;
|
||||||
SqlBaseLexer.CONCAT_PIPE = 277;
|
SparkSqlLexer.CONCAT_PIPE = 277;
|
||||||
SqlBaseLexer.HAT = 278;
|
SparkSqlLexer.HAT = 278;
|
||||||
SqlBaseLexer.STRING = 279;
|
SparkSqlLexer.STRING = 279;
|
||||||
SqlBaseLexer.BIGINT_LITERAL = 280;
|
SparkSqlLexer.BIGINT_LITERAL = 280;
|
||||||
SqlBaseLexer.SMALLINT_LITERAL = 281;
|
SparkSqlLexer.SMALLINT_LITERAL = 281;
|
||||||
SqlBaseLexer.TINYINT_LITERAL = 282;
|
SparkSqlLexer.TINYINT_LITERAL = 282;
|
||||||
SqlBaseLexer.INTEGER_VALUE = 283;
|
SparkSqlLexer.INTEGER_VALUE = 283;
|
||||||
SqlBaseLexer.EXPONENT_VALUE = 284;
|
SparkSqlLexer.EXPONENT_VALUE = 284;
|
||||||
SqlBaseLexer.DECIMAL_VALUE = 285;
|
SparkSqlLexer.DECIMAL_VALUE = 285;
|
||||||
SqlBaseLexer.FLOAT_LITERAL = 286;
|
SparkSqlLexer.FLOAT_LITERAL = 286;
|
||||||
SqlBaseLexer.DOUBLE_LITERAL = 287;
|
SparkSqlLexer.DOUBLE_LITERAL = 287;
|
||||||
SqlBaseLexer.BIGDECIMAL_LITERAL = 288;
|
SparkSqlLexer.BIGDECIMAL_LITERAL = 288;
|
||||||
SqlBaseLexer.IDENTIFIER = 289;
|
SparkSqlLexer.IDENTIFIER = 289;
|
||||||
SqlBaseLexer.BACKQUOTED_IDENTIFIER = 290;
|
SparkSqlLexer.BACKQUOTED_IDENTIFIER = 290;
|
||||||
SqlBaseLexer.SIMPLE_COMMENT = 291;
|
SparkSqlLexer.SIMPLE_COMMENT = 291;
|
||||||
SqlBaseLexer.BRACKETED_COMMENT = 292;
|
SparkSqlLexer.BRACKETED_COMMENT = 292;
|
||||||
SqlBaseLexer.WS = 293;
|
SparkSqlLexer.WS = 293;
|
||||||
SqlBaseLexer.UNRECOGNIZED = 294;
|
SparkSqlLexer.UNRECOGNIZED = 294;
|
||||||
|
|
||||||
SqlBaseLexer.prototype.channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ];
|
SparkSqlLexer.prototype.channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ];
|
||||||
|
|
||||||
SqlBaseLexer.prototype.modeNames = [ "DEFAULT_MODE" ];
|
SparkSqlLexer.prototype.modeNames = [ "DEFAULT_MODE" ];
|
||||||
|
|
||||||
SqlBaseLexer.prototype.literalNames = [ null, "';'", "'('", "')'", "','",
|
SparkSqlLexer.prototype.literalNames = [ null, "';'", "'('", "')'", "','",
|
||||||
"'.'", "'/*+'", "'*/'", "'->'",
|
"'.'", "'/*+'", "'*/'", "'->'",
|
||||||
"'['", "']'", "':'", "'ADD'", "'AFTER'",
|
"'['", "']'", "':'", "'ADD'", "'AFTER'",
|
||||||
"'ALL'", "'ALTER'", "'ANALYZE'",
|
"'ALL'", "'ALTER'", "'ANALYZE'",
|
||||||
@ -2165,15 +2165,16 @@ SqlBaseLexer.prototype.literalNames = [ null, "';'", "'('", "')'", "','",
|
|||||||
"'REPLACE'", "'RESET'", "'RESTRICT'",
|
"'REPLACE'", "'RESET'", "'RESTRICT'",
|
||||||
"'REVOKE'", "'RIGHT'", null, "'ROLE'",
|
"'REVOKE'", "'RIGHT'", null, "'ROLE'",
|
||||||
"'ROLES'", "'ROLLBACK'", "'ROLLUP'",
|
"'ROLES'", "'ROLLBACK'", "'ROLLUP'",
|
||||||
"'ROW'", "'ROWS'", "'SCHEMA'", "'SELECT'",
|
"'ROW'", "'ROWS'", "'SCHEMA'",
|
||||||
"'SEMI'", "'SEPARATED'", "'SERDE'",
|
"'SELECT'", "'SEMI'", "'SEPARATED'",
|
||||||
"'SERDEPROPERTIES'", "'SESSION_USER'",
|
"'SERDE'", "'SERDEPROPERTIES'",
|
||||||
"'SET'", "'MINUS'", "'SETS'", "'SHOW'",
|
"'SESSION_USER'", "'SET'", "'MINUS'",
|
||||||
"'SKEWED'", "'SOME'", "'SORT'",
|
"'SETS'", "'SHOW'", "'SKEWED'",
|
||||||
"'SORTED'", "'START'", "'STATISTICS'",
|
"'SOME'", "'SORT'", "'SORTED'",
|
||||||
"'STORED'", "'STRATIFY'", "'STRUCT'",
|
"'START'", "'STATISTICS'", "'STORED'",
|
||||||
"'SUBSTR'", "'SUBSTRING'", "'TABLE'",
|
"'STRATIFY'", "'STRUCT'", "'SUBSTR'",
|
||||||
"'TABLES'", "'TABLESAMPLE'", "'TBLPROPERTIES'",
|
"'SUBSTRING'", "'TABLE'", "'TABLES'",
|
||||||
|
"'TABLESAMPLE'", "'TBLPROPERTIES'",
|
||||||
null, "'TERMINATED'", "'THEN'",
|
null, "'TERMINATED'", "'THEN'",
|
||||||
"'TIME'", "'TO'", "'TOUCH'", "'TRAILING'",
|
"'TIME'", "'TO'", "'TOUCH'", "'TRAILING'",
|
||||||
"'TRANSACTION'", "'TRANSACTIONS'",
|
"'TRANSACTION'", "'TRANSACTIONS'",
|
||||||
@ -2183,35 +2184,36 @@ SqlBaseLexer.prototype.literalNames = [ null, "';'", "'('", "')'", "','",
|
|||||||
"'UNIQUE'", "'UNKNOWN'", "'UNLOCK'",
|
"'UNIQUE'", "'UNKNOWN'", "'UNLOCK'",
|
||||||
"'UNSET'", "'UPDATE'", "'USE'",
|
"'UNSET'", "'UPDATE'", "'USE'",
|
||||||
"'USER'", "'USING'", "'VALUES'",
|
"'USER'", "'USING'", "'VALUES'",
|
||||||
"'VIEW'", "'VIEWS'", "'WHEN'", "'WHERE'",
|
"'VIEW'", "'VIEWS'", "'WHEN'",
|
||||||
"'WINDOW'", "'WITH'", "'ZONE'",
|
"'WHERE'", "'WINDOW'", "'WITH'",
|
||||||
null, "'<=>'", "'<>'", "'!='", "'<'",
|
"'ZONE'", null, "'<=>'", "'<>'",
|
||||||
null, "'>'", null, "'+'", "'-'",
|
"'!='", "'<'", null, "'>'", null,
|
||||||
"'*'", "'/'", "'%'", "'~'", "'&'",
|
"'+'", "'-'", "'*'", "'/'", "'%'",
|
||||||
"'|'", "'||'", "'^'" ];
|
"'~'", "'&'", "'|'", "'||'", "'^'" ];
|
||||||
|
|
||||||
SqlBaseLexer.prototype.symbolicNames = [ null, null, null, null, null, null,
|
SparkSqlLexer.prototype.symbolicNames = [ null, null, null, null, null,
|
||||||
null, null, null, null, null, null,
|
null, null, null, null, null,
|
||||||
"ADD", "AFTER", "ALL", "ALTER",
|
null, null, "ADD", "AFTER", "ALL",
|
||||||
"ANALYZE", "AND", "ANTI", "ANY",
|
"ALTER", "ANALYZE", "AND", "ANTI",
|
||||||
"ARCHIVE", "ARRAY", "AS", "ASC",
|
"ANY", "ARCHIVE", "ARRAY", "AS",
|
||||||
"AT", "AUTHORIZATION", "BETWEEN",
|
"ASC", "AT", "AUTHORIZATION",
|
||||||
"BOTH", "BUCKET", "BUCKETS", "BY",
|
"BETWEEN", "BOTH", "BUCKET", "BUCKETS",
|
||||||
"CACHE", "CASCADE", "CASE", "CAST",
|
"BY", "CACHE", "CASCADE", "CASE",
|
||||||
"CHANGE", "CHECK", "CLEAR", "CLUSTER",
|
"CAST", "CHANGE", "CHECK", "CLEAR",
|
||||||
"CLUSTERED", "CODEGEN", "COLLATE",
|
"CLUSTER", "CLUSTERED", "CODEGEN",
|
||||||
"COLLECTION", "COLUMN", "COLUMNS",
|
"COLLATE", "COLLECTION", "COLUMN",
|
||||||
"COMMENT", "COMMIT", "COMPACT",
|
"COLUMNS", "COMMENT", "COMMIT",
|
||||||
"COMPACTIONS", "COMPUTE", "CONCATENATE",
|
"COMPACT", "COMPACTIONS", "COMPUTE",
|
||||||
"CONSTRAINT", "COST", "CREATE",
|
"CONCATENATE", "CONSTRAINT", "COST",
|
||||||
"CROSS", "CUBE", "CURRENT", "CURRENT_DATE",
|
"CREATE", "CROSS", "CUBE", "CURRENT",
|
||||||
"CURRENT_TIME", "CURRENT_TIMESTAMP",
|
"CURRENT_DATE", "CURRENT_TIME",
|
||||||
"CURRENT_USER", "DATA", "DATABASE",
|
"CURRENT_TIMESTAMP", "CURRENT_USER",
|
||||||
"DATABASES", "DBPROPERTIES", "DEFINED",
|
"DATA", "DATABASE", "DATABASES",
|
||||||
"DELETE", "DELIMITED", "DESC",
|
"DBPROPERTIES", "DEFINED", "DELETE",
|
||||||
"DESCRIBE", "DFS", "DIRECTORIES",
|
"DELIMITED", "DESC", "DESCRIBE",
|
||||||
"DIRECTORY", "DISTINCT", "DISTRIBUTE",
|
"DFS", "DIRECTORIES", "DIRECTORY",
|
||||||
"DIV", "DROP", "ELSE", "END", "ESCAPE",
|
"DISTINCT", "DISTRIBUTE", "DIV",
|
||||||
|
"DROP", "ELSE", "END", "ESCAPE",
|
||||||
"ESCAPED", "EXCEPT", "EXCHANGE",
|
"ESCAPED", "EXCEPT", "EXCHANGE",
|
||||||
"EXISTS", "EXPLAIN", "EXPORT",
|
"EXISTS", "EXPLAIN", "EXPORT",
|
||||||
"EXTENDED", "EXTERNAL", "EXTRACT",
|
"EXTENDED", "EXTERNAL", "EXTRACT",
|
||||||
@ -2231,43 +2233,45 @@ SqlBaseLexer.prototype.symbolicNames = [ null, null, null, null, null, null,
|
|||||||
"LOCK", "LOCKS", "LOGICAL", "MACRO",
|
"LOCK", "LOCKS", "LOGICAL", "MACRO",
|
||||||
"MAP", "MATCHED", "MERGE", "MSCK",
|
"MAP", "MATCHED", "MERGE", "MSCK",
|
||||||
"NAMESPACE", "NAMESPACES", "NATURAL",
|
"NAMESPACE", "NAMESPACES", "NATURAL",
|
||||||
"NO", "NOT", "NULL", "NULLS", "OF",
|
"NO", "NOT", "NULL", "NULLS",
|
||||||
"ON", "ONLY", "OPTION", "OPTIONS",
|
"OF", "ON", "ONLY", "OPTION",
|
||||||
"OR", "ORDER", "OUT", "OUTER",
|
"OPTIONS", "OR", "ORDER", "OUT",
|
||||||
"OUTPUTFORMAT", "OVER", "OVERLAPS",
|
"OUTER", "OUTPUTFORMAT", "OVER",
|
||||||
"OVERLAY", "OVERWRITE", "PARTITION",
|
"OVERLAPS", "OVERLAY", "OVERWRITE",
|
||||||
"PARTITIONED", "PARTITIONS", "PERCENTLIT",
|
"PARTITION", "PARTITIONED", "PARTITIONS",
|
||||||
"PIVOT", "PLACING", "POSITION",
|
"PERCENTLIT", "PIVOT", "PLACING",
|
||||||
"PRECEDING", "PRIMARY", "PRINCIPALS",
|
"POSITION", "PRECEDING", "PRIMARY",
|
||||||
"PROPERTIES", "PURGE", "QUERY",
|
"PRINCIPALS", "PROPERTIES", "PURGE",
|
||||||
"RANGE", "RECORDREADER", "RECORDWRITER",
|
"QUERY", "RANGE", "RECORDREADER",
|
||||||
"RECOVER", "REDUCE", "REFERENCES",
|
"RECORDWRITER", "RECOVER", "REDUCE",
|
||||||
"REFRESH", "RENAME", "REPAIR",
|
"REFERENCES", "REFRESH", "RENAME",
|
||||||
"REPLACE", "RESET", "RESTRICT",
|
"REPAIR", "REPLACE", "RESET",
|
||||||
"REVOKE", "RIGHT", "RLIKE", "ROLE",
|
"RESTRICT", "REVOKE", "RIGHT",
|
||||||
"ROLES", "ROLLBACK", "ROLLUP",
|
"RLIKE", "ROLE", "ROLES", "ROLLBACK",
|
||||||
"ROW", "ROWS", "SCHEMA", "SELECT",
|
"ROLLUP", "ROW", "ROWS", "SCHEMA",
|
||||||
"SEMI", "SEPARATED", "SERDE", "SERDEPROPERTIES",
|
"SELECT", "SEMI", "SEPARATED",
|
||||||
"SESSION_USER", "SET", "SETMINUS",
|
"SERDE", "SERDEPROPERTIES", "SESSION_USER",
|
||||||
"SETS", "SHOW", "SKEWED", "SOME",
|
"SET", "SETMINUS", "SETS", "SHOW",
|
||||||
"SORT", "SORTED", "START", "STATISTICS",
|
"SKEWED", "SOME", "SORT", "SORTED",
|
||||||
"STORED", "STRATIFY", "STRUCT",
|
"START", "STATISTICS", "STORED",
|
||||||
"SUBSTR", "SUBSTRING", "TABLE",
|
"STRATIFY", "STRUCT", "SUBSTR",
|
||||||
"TABLES", "TABLESAMPLE", "TBLPROPERTIES",
|
"SUBSTRING", "TABLE", "TABLES",
|
||||||
|
"TABLESAMPLE", "TBLPROPERTIES",
|
||||||
"TEMPORARY", "TERMINATED", "THEN",
|
"TEMPORARY", "TERMINATED", "THEN",
|
||||||
"TIME", "TO", "TOUCH", "TRAILING",
|
"TIME", "TO", "TOUCH", "TRAILING",
|
||||||
"TRANSACTION", "TRANSACTIONS",
|
"TRANSACTION", "TRANSACTIONS",
|
||||||
"TRANSFORM", "TRIM", "TRUE", "TRUNCATE",
|
"TRANSFORM", "TRIM", "TRUE", "TRUNCATE",
|
||||||
"TYPE", "UNARCHIVE", "UNBOUNDED",
|
"TYPE", "UNARCHIVE", "UNBOUNDED",
|
||||||
"UNCACHE", "UNION", "UNIQUE", "UNKNOWN",
|
"UNCACHE", "UNION", "UNIQUE",
|
||||||
"UNLOCK", "UNSET", "UPDATE", "USE",
|
"UNKNOWN", "UNLOCK", "UNSET",
|
||||||
"USER", "USING", "VALUES", "VIEW",
|
"UPDATE", "USE", "USER", "USING",
|
||||||
"VIEWS", "WHEN", "WHERE", "WINDOW",
|
"VALUES", "VIEW", "VIEWS", "WHEN",
|
||||||
"WITH", "ZONE", "EQ", "NSEQ", "NEQ",
|
"WHERE", "WINDOW", "WITH", "ZONE",
|
||||||
"NEQJ", "LT", "LTE", "GT", "GTE",
|
"EQ", "NSEQ", "NEQ", "NEQJ", "LT",
|
||||||
"PLUS", "MINUS", "ASTERISK", "SLASH",
|
"LTE", "GT", "GTE", "PLUS", "MINUS",
|
||||||
"PERCENT", "TILDE", "AMPERSAND",
|
"ASTERISK", "SLASH", "PERCENT",
|
||||||
"PIPE", "CONCAT_PIPE", "HAT", "STRING",
|
"TILDE", "AMPERSAND", "PIPE",
|
||||||
|
"CONCAT_PIPE", "HAT", "STRING",
|
||||||
"BIGINT_LITERAL", "SMALLINT_LITERAL",
|
"BIGINT_LITERAL", "SMALLINT_LITERAL",
|
||||||
"TINYINT_LITERAL", "INTEGER_VALUE",
|
"TINYINT_LITERAL", "INTEGER_VALUE",
|
||||||
"EXPONENT_VALUE", "DECIMAL_VALUE",
|
"EXPONENT_VALUE", "DECIMAL_VALUE",
|
||||||
@ -2276,30 +2280,31 @@ SqlBaseLexer.prototype.symbolicNames = [ null, null, null, null, null, null,
|
|||||||
"BACKQUOTED_IDENTIFIER", "SIMPLE_COMMENT",
|
"BACKQUOTED_IDENTIFIER", "SIMPLE_COMMENT",
|
||||||
"BRACKETED_COMMENT", "WS", "UNRECOGNIZED" ];
|
"BRACKETED_COMMENT", "WS", "UNRECOGNIZED" ];
|
||||||
|
|
||||||
SqlBaseLexer.prototype.ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4",
|
SparkSqlLexer.prototype.ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4",
|
||||||
"T__5", "T__6", "T__7", "T__8", "T__9",
|
"T__5", "T__6", "T__7", "T__8", "T__9",
|
||||||
"T__10", "ADD", "AFTER", "ALL", "ALTER",
|
"T__10", "ADD", "AFTER", "ALL", "ALTER",
|
||||||
"ANALYZE", "AND", "ANTI", "ANY", "ARCHIVE",
|
"ANALYZE", "AND", "ANTI", "ANY", "ARCHIVE",
|
||||||
"ARRAY", "AS", "ASC", "AT", "AUTHORIZATION",
|
"ARRAY", "AS", "ASC", "AT", "AUTHORIZATION",
|
||||||
"BETWEEN", "BOTH", "BUCKET", "BUCKETS",
|
"BETWEEN", "BOTH", "BUCKET", "BUCKETS",
|
||||||
"BY", "CACHE", "CASCADE", "CASE", "CAST",
|
"BY", "CACHE", "CASCADE", "CASE",
|
||||||
"CHANGE", "CHECK", "CLEAR", "CLUSTER",
|
"CAST", "CHANGE", "CHECK", "CLEAR",
|
||||||
"CLUSTERED", "CODEGEN", "COLLATE",
|
"CLUSTER", "CLUSTERED", "CODEGEN",
|
||||||
"COLLECTION", "COLUMN", "COLUMNS",
|
"COLLATE", "COLLECTION", "COLUMN",
|
||||||
"COMMENT", "COMMIT", "COMPACT", "COMPACTIONS",
|
"COLUMNS", "COMMENT", "COMMIT", "COMPACT",
|
||||||
"COMPUTE", "CONCATENATE", "CONSTRAINT",
|
"COMPACTIONS", "COMPUTE", "CONCATENATE",
|
||||||
"COST", "CREATE", "CROSS", "CUBE",
|
"CONSTRAINT", "COST", "CREATE", "CROSS",
|
||||||
"CURRENT", "CURRENT_DATE", "CURRENT_TIME",
|
"CUBE", "CURRENT", "CURRENT_DATE",
|
||||||
"CURRENT_TIMESTAMP", "CURRENT_USER",
|
"CURRENT_TIME", "CURRENT_TIMESTAMP",
|
||||||
"DATA", "DATABASE", "DATABASES", "DBPROPERTIES",
|
"CURRENT_USER", "DATA", "DATABASE",
|
||||||
"DEFINED", "DELETE", "DELIMITED", "DESC",
|
"DATABASES", "DBPROPERTIES", "DEFINED",
|
||||||
"DESCRIBE", "DFS", "DIRECTORIES", "DIRECTORY",
|
"DELETE", "DELIMITED", "DESC", "DESCRIBE",
|
||||||
|
"DFS", "DIRECTORIES", "DIRECTORY",
|
||||||
"DISTINCT", "DISTRIBUTE", "DIV", "DROP",
|
"DISTINCT", "DISTRIBUTE", "DIV", "DROP",
|
||||||
"ELSE", "END", "ESCAPE", "ESCAPED",
|
"ELSE", "END", "ESCAPE", "ESCAPED",
|
||||||
"EXCEPT", "EXCHANGE", "EXISTS", "EXPLAIN",
|
"EXCEPT", "EXCHANGE", "EXISTS", "EXPLAIN",
|
||||||
"EXPORT", "EXTENDED", "EXTERNAL", "EXTRACT",
|
"EXPORT", "EXTENDED", "EXTERNAL",
|
||||||
"FALSE", "FETCH", "FIELDS", "FILTER",
|
"EXTRACT", "FALSE", "FETCH", "FIELDS",
|
||||||
"FILEFORMAT", "FIRST", "FOLLOWING",
|
"FILTER", "FILEFORMAT", "FIRST", "FOLLOWING",
|
||||||
"FOR", "FOREIGN", "FORMAT", "FORMATTED",
|
"FOR", "FOREIGN", "FORMAT", "FORMATTED",
|
||||||
"FROM", "FULL", "FUNCTION", "FUNCTIONS",
|
"FROM", "FULL", "FUNCTION", "FUNCTIONS",
|
||||||
"GLOBAL", "GRANT", "GROUP", "GROUPING",
|
"GLOBAL", "GRANT", "GROUP", "GROUPING",
|
||||||
@ -2309,55 +2314,57 @@ SqlBaseLexer.prototype.ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4",
|
|||||||
"INTERSECT", "INTERVAL", "INTO", "IS",
|
"INTERSECT", "INTERVAL", "INTO", "IS",
|
||||||
"ITEMS", "JOIN", "KEYS", "LAST", "LATERAL",
|
"ITEMS", "JOIN", "KEYS", "LAST", "LATERAL",
|
||||||
"LAZY", "LEADING", "LEFT", "LIKE",
|
"LAZY", "LEADING", "LEFT", "LIKE",
|
||||||
"LIMIT", "LINES", "LIST", "LOAD", "LOCAL",
|
"LIMIT", "LINES", "LIST", "LOAD",
|
||||||
"LOCATION", "LOCK", "LOCKS", "LOGICAL",
|
"LOCAL", "LOCATION", "LOCK", "LOCKS",
|
||||||
"MACRO", "MAP", "MATCHED", "MERGE",
|
"LOGICAL", "MACRO", "MAP", "MATCHED",
|
||||||
"MSCK", "NAMESPACE", "NAMESPACES",
|
"MERGE", "MSCK", "NAMESPACE", "NAMESPACES",
|
||||||
"NATURAL", "NO", "NOT", "NULL", "NULLS",
|
"NATURAL", "NO", "NOT", "NULL", "NULLS",
|
||||||
"OF", "ON", "ONLY", "OPTION", "OPTIONS",
|
"OF", "ON", "ONLY", "OPTION", "OPTIONS",
|
||||||
"OR", "ORDER", "OUT", "OUTER", "OUTPUTFORMAT",
|
"OR", "ORDER", "OUT", "OUTER", "OUTPUTFORMAT",
|
||||||
"OVER", "OVERLAPS", "OVERLAY", "OVERWRITE",
|
"OVER", "OVERLAPS", "OVERLAY", "OVERWRITE",
|
||||||
"PARTITION", "PARTITIONED", "PARTITIONS",
|
"PARTITION", "PARTITIONED", "PARTITIONS",
|
||||||
"PERCENTLIT", "PIVOT", "PLACING", "POSITION",
|
"PERCENTLIT", "PIVOT", "PLACING",
|
||||||
"PRECEDING", "PRIMARY", "PRINCIPALS",
|
"POSITION", "PRECEDING", "PRIMARY",
|
||||||
"PROPERTIES", "PURGE", "QUERY", "RANGE",
|
"PRINCIPALS", "PROPERTIES", "PURGE",
|
||||||
"RECORDREADER", "RECORDWRITER", "RECOVER",
|
"QUERY", "RANGE", "RECORDREADER",
|
||||||
"REDUCE", "REFERENCES", "REFRESH",
|
"RECORDWRITER", "RECOVER", "REDUCE",
|
||||||
"RENAME", "REPAIR", "REPLACE", "RESET",
|
"REFERENCES", "REFRESH", "RENAME",
|
||||||
"RESTRICT", "REVOKE", "RIGHT", "RLIKE",
|
"REPAIR", "REPLACE", "RESET", "RESTRICT",
|
||||||
"ROLE", "ROLES", "ROLLBACK", "ROLLUP",
|
"REVOKE", "RIGHT", "RLIKE", "ROLE",
|
||||||
"ROW", "ROWS", "SCHEMA", "SELECT",
|
"ROLES", "ROLLBACK", "ROLLUP", "ROW",
|
||||||
"SEMI", "SEPARATED", "SERDE", "SERDEPROPERTIES",
|
"ROWS", "SCHEMA", "SELECT", "SEMI",
|
||||||
|
"SEPARATED", "SERDE", "SERDEPROPERTIES",
|
||||||
"SESSION_USER", "SET", "SETMINUS",
|
"SESSION_USER", "SET", "SETMINUS",
|
||||||
"SETS", "SHOW", "SKEWED", "SOME", "SORT",
|
"SETS", "SHOW", "SKEWED", "SOME",
|
||||||
"SORTED", "START", "STATISTICS", "STORED",
|
"SORT", "SORTED", "START", "STATISTICS",
|
||||||
"STRATIFY", "STRUCT", "SUBSTR", "SUBSTRING",
|
"STORED", "STRATIFY", "STRUCT", "SUBSTR",
|
||||||
"TABLE", "TABLES", "TABLESAMPLE", "TBLPROPERTIES",
|
"SUBSTRING", "TABLE", "TABLES", "TABLESAMPLE",
|
||||||
"TEMPORARY", "TERMINATED", "THEN",
|
"TBLPROPERTIES", "TEMPORARY", "TERMINATED",
|
||||||
"TIME", "TO", "TOUCH", "TRAILING",
|
"THEN", "TIME", "TO", "TOUCH", "TRAILING",
|
||||||
"TRANSACTION", "TRANSACTIONS", "TRANSFORM",
|
"TRANSACTION", "TRANSACTIONS", "TRANSFORM",
|
||||||
"TRIM", "TRUE", "TRUNCATE", "TYPE",
|
"TRIM", "TRUE", "TRUNCATE", "TYPE",
|
||||||
"UNARCHIVE", "UNBOUNDED", "UNCACHE",
|
"UNARCHIVE", "UNBOUNDED", "UNCACHE",
|
||||||
"UNION", "UNIQUE", "UNKNOWN", "UNLOCK",
|
"UNION", "UNIQUE", "UNKNOWN", "UNLOCK",
|
||||||
"UNSET", "UPDATE", "USE", "USER", "USING",
|
"UNSET", "UPDATE", "USE", "USER",
|
||||||
"VALUES", "VIEW", "VIEWS", "WHEN",
|
"USING", "VALUES", "VIEW", "VIEWS",
|
||||||
"WHERE", "WINDOW", "WITH", "ZONE",
|
"WHEN", "WHERE", "WINDOW", "WITH",
|
||||||
"EQ", "NSEQ", "NEQ", "NEQJ", "LT",
|
"ZONE", "EQ", "NSEQ", "NEQ", "NEQJ",
|
||||||
"LTE", "GT", "GTE", "PLUS", "MINUS",
|
"LT", "LTE", "GT", "GTE", "PLUS",
|
||||||
"ASTERISK", "SLASH", "PERCENT", "TILDE",
|
"MINUS", "ASTERISK", "SLASH", "PERCENT",
|
||||||
"AMPERSAND", "PIPE", "CONCAT_PIPE",
|
"TILDE", "AMPERSAND", "PIPE", "CONCAT_PIPE",
|
||||||
"HAT", "STRING", "BIGINT_LITERAL",
|
"HAT", "STRING", "BIGINT_LITERAL",
|
||||||
"SMALLINT_LITERAL", "TINYINT_LITERAL",
|
"SMALLINT_LITERAL", "TINYINT_LITERAL",
|
||||||
"INTEGER_VALUE", "EXPONENT_VALUE",
|
"INTEGER_VALUE", "EXPONENT_VALUE",
|
||||||
"DECIMAL_VALUE", "FLOAT_LITERAL", "DOUBLE_LITERAL",
|
"DECIMAL_VALUE", "FLOAT_LITERAL",
|
||||||
"BIGDECIMAL_LITERAL", "IDENTIFIER",
|
"DOUBLE_LITERAL", "BIGDECIMAL_LITERAL",
|
||||||
"BACKQUOTED_IDENTIFIER", "DECIMAL_DIGITS",
|
"IDENTIFIER", "BACKQUOTED_IDENTIFIER",
|
||||||
"EXPONENT", "DIGIT", "LETTER", "SIMPLE_COMMENT",
|
"DECIMAL_DIGITS", "EXPONENT", "DIGIT",
|
||||||
"BRACKETED_COMMENT", "WS", "UNRECOGNIZED" ];
|
"LETTER", "SIMPLE_COMMENT", "BRACKETED_COMMENT",
|
||||||
|
"WS", "UNRECOGNIZED" ];
|
||||||
|
|
||||||
SqlBaseLexer.prototype.grammarFileName = "SqlBase.g4";
|
SparkSqlLexer.prototype.grammarFileName = "SparkSql.g4";
|
||||||
|
|
||||||
SqlBaseLexer.prototype.sempred = function(localctx, ruleIndex, predIndex) {
|
SparkSqlLexer.prototype.sempred = function(localctx, ruleIndex, predIndex) {
|
||||||
switch (ruleIndex) {
|
switch (ruleIndex) {
|
||||||
case 283:
|
case 283:
|
||||||
return this.EXPONENT_VALUE_sempred(localctx, predIndex);
|
return this.EXPONENT_VALUE_sempred(localctx, predIndex);
|
||||||
@ -2376,7 +2383,7 @@ SqlBaseLexer.prototype.sempred = function(localctx, ruleIndex, predIndex) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SqlBaseLexer.prototype.EXPONENT_VALUE_sempred = function(localctx, predIndex) {
|
SparkSqlLexer.prototype.EXPONENT_VALUE_sempred = function(localctx, predIndex) {
|
||||||
switch(predIndex) {
|
switch(predIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
return isValidDecimal();
|
return isValidDecimal();
|
||||||
@ -2385,7 +2392,7 @@ SqlBaseLexer.prototype.EXPONENT_VALUE_sempred = function(localctx, predIndex) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SqlBaseLexer.prototype.DECIMAL_VALUE_sempred = function(localctx, predIndex) {
|
SparkSqlLexer.prototype.DECIMAL_VALUE_sempred = function(localctx, predIndex) {
|
||||||
switch(predIndex) {
|
switch(predIndex) {
|
||||||
case 1:
|
case 1:
|
||||||
return isValidDecimal();
|
return isValidDecimal();
|
||||||
@ -2394,7 +2401,7 @@ SqlBaseLexer.prototype.DECIMAL_VALUE_sempred = function(localctx, predIndex) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SqlBaseLexer.prototype.FLOAT_LITERAL_sempred = function(localctx, predIndex) {
|
SparkSqlLexer.prototype.FLOAT_LITERAL_sempred = function(localctx, predIndex) {
|
||||||
switch(predIndex) {
|
switch(predIndex) {
|
||||||
case 2:
|
case 2:
|
||||||
return isValidDecimal();
|
return isValidDecimal();
|
||||||
@ -2403,7 +2410,7 @@ SqlBaseLexer.prototype.FLOAT_LITERAL_sempred = function(localctx, predIndex) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SqlBaseLexer.prototype.DOUBLE_LITERAL_sempred = function(localctx, predIndex) {
|
SparkSqlLexer.prototype.DOUBLE_LITERAL_sempred = function(localctx, predIndex) {
|
||||||
switch(predIndex) {
|
switch(predIndex) {
|
||||||
case 3:
|
case 3:
|
||||||
return isValidDecimal();
|
return isValidDecimal();
|
||||||
@ -2412,7 +2419,7 @@ SqlBaseLexer.prototype.DOUBLE_LITERAL_sempred = function(localctx, predIndex) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SqlBaseLexer.prototype.BIGDECIMAL_LITERAL_sempred = function(localctx, predIndex) {
|
SparkSqlLexer.prototype.BIGDECIMAL_LITERAL_sempred = function(localctx, predIndex) {
|
||||||
switch(predIndex) {
|
switch(predIndex) {
|
||||||
case 4:
|
case 4:
|
||||||
return isValidDecimal();
|
return isValidDecimal();
|
||||||
@ -2421,7 +2428,7 @@ SqlBaseLexer.prototype.BIGDECIMAL_LITERAL_sempred = function(localctx, predIndex
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SqlBaseLexer.prototype.BRACKETED_COMMENT_sempred = function(localctx, predIndex) {
|
SparkSqlLexer.prototype.BRACKETED_COMMENT_sempred = function(localctx, predIndex) {
|
||||||
switch(predIndex) {
|
switch(predIndex) {
|
||||||
case 5:
|
case 5:
|
||||||
return !isHint();
|
return !isHint();
|
||||||
@ -2432,5 +2439,5 @@ SqlBaseLexer.prototype.BRACKETED_COMMENT_sempred = function(localctx, predIndex)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
exports.SqlBaseLexer = SqlBaseLexer;
|
exports.SparkSqlLexer = SparkSqlLexer;
|
||||||
|
|
2445
src/lib/spark/SparkSqlListener.js
Normal file
2445
src/lib/spark/SparkSqlListener.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
1636
src/lib/spark/SparkSqlVisitor.js
Normal file
1636
src/lib/spark/SparkSqlVisitor.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,19 @@
|
|||||||
import { InputStream, CommonTokenStream, Lexer } from 'antlr4';
|
import { InputStream, CommonTokenStream, Lexer } from 'antlr4';
|
||||||
import { SqlBaseLexer } from '../lib/spark/SqlBaseLexer';
|
import { SparkSqlLexer } from '../lib/spark/SparkSqlLexer';
|
||||||
import { SqlBaseParser } from '../lib/spark/SqlBaseParser';
|
import { SparkSqlParser } from '../lib/spark/SparkSqlParser';
|
||||||
export * from '../lib/spark/SqlBaseVisitor';
|
export * from '../lib/spark/SparkSqlVisitor';
|
||||||
export * from '../lib/spark/SqlBaseListener';
|
export * from '../lib/spark/SparkSqlListener';
|
||||||
|
|
||||||
import BasicParser from './common/BasicParser';
|
import BasicParser from './common/BasicParser';
|
||||||
|
|
||||||
export default class SparkSQL extends BasicParser {
|
export default class SparkSQL extends BasicParser {
|
||||||
public createLexer(input: string): Lexer {
|
public createLexer(input: string): Lexer {
|
||||||
const chars = new InputStream(input.toUpperCase()); // Some Lexer only support uppercase token, So you need transform
|
const chars = new InputStream(input.toUpperCase()); // Some Lexer only support uppercase token, So you need transform
|
||||||
const lexer = <unknown> new SqlBaseLexer(chars) as Lexer;
|
const lexer = <unknown> new SparkSqlLexer(chars) as Lexer;
|
||||||
return lexer;
|
return lexer;
|
||||||
}
|
}
|
||||||
public createParserFromLexer(lexer: Lexer) {
|
public createParserFromLexer(lexer: Lexer) {
|
||||||
const tokenStream = new CommonTokenStream(lexer);
|
const tokenStream = new CommonTokenStream(lexer);
|
||||||
return new SqlBaseParser(tokenStream);
|
return new SparkSqlParser(tokenStream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import SQLParser, { SqlBaseListener } from '../../../src/parser/spark';
|
import SQLParser, { SparkSqlListener } from '../../../src/parser/spark';
|
||||||
|
|
||||||
describe('Spark SQL Listener Tests', () => {
|
describe('Spark SQL Listener Tests', () => {
|
||||||
const expectTableName = 'user1';
|
const expectTableName = 'user1';
|
||||||
@ -9,7 +9,7 @@ describe('Spark SQL Listener Tests', () => {
|
|||||||
|
|
||||||
test('Listener enterTableName', () => {
|
test('Listener enterTableName', () => {
|
||||||
let result = '';
|
let result = '';
|
||||||
class MyListener extends SqlBaseListener {
|
class MyListener extends SparkSqlListener {
|
||||||
enterTableName(ctx): void {
|
enterTableName(ctx): void {
|
||||||
result = ctx.getText().toLowerCase();
|
result = ctx.getText().toLowerCase();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
/* eslint-disable max-len */
|
/* eslint-disable max-len */
|
||||||
import SQLParser from '../../../src/parser/spark';
|
import SQLParser from '../../../src/parser/spark';
|
||||||
|
|
||||||
// const log = console.log.bind(console);
|
|
||||||
const error = console.log.bind(console, '***** error\n');
|
const error = console.log.bind(console, '***** error\n');
|
||||||
|
|
||||||
const validateTest = (sqls) => {
|
const validateTest = (sqls) => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import SQLParser, { SqlBaseVisitor } from '../../../src/parser/spark';
|
import SQLParser, { SparkSqlVisitor } from '../../../src/parser/spark';
|
||||||
|
|
||||||
describe('Spark SQL Visitor Tests', () => {
|
describe('Spark SQL Visitor Tests', () => {
|
||||||
const expectTableName = 'user1';
|
const expectTableName = 'user1';
|
||||||
@ -13,7 +13,7 @@ describe('Spark SQL Visitor Tests', () => {
|
|||||||
|
|
||||||
test('Visitor visitTableName', () => {
|
test('Visitor visitTableName', () => {
|
||||||
let result = '';
|
let result = '';
|
||||||
class MyVisitor extends SqlBaseVisitor {
|
class MyVisitor extends SparkSqlVisitor {
|
||||||
visitTableName(ctx): void {
|
visitTableName(ctx): void {
|
||||||
result = ctx.getText().toLowerCase();
|
result = ctx.getText().toLowerCase();
|
||||||
super.visitTableName(ctx);
|
super.visitTableName(ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user