@@ -11934,7 +11934,7 @@ export class SparkSqlParser extends SQLParserBase {
11934
11934
let localContext = new RelationPrimaryContext(this.context, this.state);
11935
11935
this.enterRule(localContext, 224, SparkSqlParser.RULE_relationPrimary);
11936
11936
try {
11937
- this.state = 2821 ;
11937
+ this.state = 2819 ;
11938
11938
this.errorHandler.sync(this);
11939
11939
switch (this.interpreter.adaptivePredict(this.tokenStream, 359, this.context) ) {
11940
11940
case 1:
@@ -11992,64 +11992,60 @@ export class SparkSqlParser extends SQLParserBase {
11992
11992
this.enterOuterAlt(localContext, 2);
11993
11993
{
11994
11994
this.state = 2801;
11995
- this.match(SparkSqlParser.LEFT_PAREN);
11996
- this.state = 2802;
11997
11995
this.atomSubQueryTableSource();
11998
11996
this.state = 2803;
11999
- this.match(SparkSqlParser.RIGHT_PAREN);
12000
- this.state = 2805;
12001
11997
this.errorHandler.sync(this);
12002
11998
switch (this.interpreter.adaptivePredict(this.tokenStream, 357, this.context) ) {
12003
11999
case 1:
12004
12000
{
12005
- this.state = 2804 ;
12001
+ this.state = 2802 ;
12006
12002
this.sample();
12007
12003
}
12008
12004
break;
12009
12005
}
12010
- this.state = 2807 ;
12006
+ this.state = 2805 ;
12011
12007
this.tableAlias();
12012
12008
}
12013
12009
break;
12014
12010
case 3:
12015
12011
localContext = new JoinTableSourceContext(localContext);
12016
12012
this.enterOuterAlt(localContext, 3);
12017
12013
{
12018
- this.state = 2809 ;
12014
+ this.state = 2807 ;
12019
12015
this.match(SparkSqlParser.LEFT_PAREN);
12020
- this.state = 2810 ;
12016
+ this.state = 2808 ;
12021
12017
this.relation();
12022
- this.state = 2811 ;
12018
+ this.state = 2809 ;
12023
12019
this.match(SparkSqlParser.RIGHT_PAREN);
12024
- this.state = 2813 ;
12020
+ this.state = 2811 ;
12025
12021
this.errorHandler.sync(this);
12026
12022
switch (this.interpreter.adaptivePredict(this.tokenStream, 358, this.context) ) {
12027
12023
case 1:
12028
12024
{
12029
- this.state = 2812 ;
12025
+ this.state = 2810 ;
12030
12026
this.sample();
12031
12027
}
12032
12028
break;
12033
12029
}
12034
- this.state = 2815 ;
12030
+ this.state = 2813 ;
12035
12031
this.tableAlias();
12036
12032
}
12037
12033
break;
12038
12034
case 4:
12039
12035
localContext = new InlineTableSourceContext(localContext);
12040
12036
this.enterOuterAlt(localContext, 4);
12041
12037
{
12042
- this.state = 2817 ;
12038
+ this.state = 2815 ;
12043
12039
this.inlineTable();
12044
- this.state = 2818 ;
12040
+ this.state = 2816 ;
12045
12041
this.tableAlias();
12046
12042
}
12047
12043
break;
12048
12044
case 5:
12049
12045
localContext = new FunctionTableSourceContext(localContext);
12050
12046
this.enterOuterAlt(localContext, 5);
12051
12047
{
12052
- this.state = 2820 ;
12048
+ this.state = 2818 ;
12053
12049
this.functionTable();
12054
12050
}
12055
12051
break;
@@ -12075,8 +12071,12 @@ export class SparkSqlParser extends SQLParserBase {
12075
12071
try {
12076
12072
this.enterOuterAlt(localContext, 1);
12077
12073
{
12078
- this.state = 2823;
12074
+ this.state = 2821;
12075
+ this.match(SparkSqlParser.LEFT_PAREN);
12076
+ this.state = 2822;
12079
12077
this.query();
12078
+ this.state = 2823;
12079
+ this.match(SparkSqlParser.RIGHT_PAREN);
12080
12080
}
12081
12081
}
12082
12082
catch (re) {
@@ -13842,7 +13842,7 @@ export class SparkSqlParser extends SQLParserBase {
13842
13842
case SparkSqlParser.BACKQUOTED_IDENTIFIER:
13843
13843
{
13844
13844
this.state = 3048;
13845
- localContext._name = this.errorCapturingIdentifier();
13845
+ localContext._alias = this.errorCapturingIdentifier();
13846
13846
}
13847
13847
break;
13848
13848
case SparkSqlParser.LEFT_PAREN:
@@ -19159,9 +19159,9 @@ export class SparkSqlParser extends SQLParserBase {
19159
19159
3,109,2772,8,109,1,110,1,110,1,110,1,110,5,110,2778,8,110,10,110,
19160
19160
12,110,2781,9,110,1,110,1,110,1,111,1,111,3,111,2787,8,111,1,112,
19161
19161
1,112,1,112,3,112,2792,8,112,1,112,3,112,2795,8,112,1,112,3,112,
19162
- 2798,8,112,1,112,1,112,1,112,1,112,1 ,112,1, 112,3 ,112,2806,8 ,112,
19163
- 1,112,1,112,1,112,1,112,1 ,112,1, 112,3 ,112,2814,8 ,112,1,112,1,112,
19164
- 1,112,1,112,1 ,112,1,112,3, 112,2822,8,112 ,1,113,1,113,1,114,1,114,
19162
+ 2798,8,112,1,112,1,112,1,112,1,112,3 ,112,2804,8, 112,1 ,112,1 ,112,
19163
+ 1,112,1,112,1,112,1,112,3 ,112,2812,8, 112,1 ,112,1 ,112,1,112,1,112,
19164
+ 1,112,1,112,3 ,112,2820,8, 112,1,113,1,113 ,1,113,1,113,1,114,1,114,
19165
19165
1,114,1,114,5,114,2830,8,114,10,114,12,114,2833,9,114,1,115,1,115,
19166
19166
1,115,3,115,2838,8,115,1,115,1,115,1,115,1,115,1,115,3,115,2845,
19167
19167
8,115,1,115,1,115,1,115,1,115,1,115,3,115,2852,8,115,3,115,2854,
@@ -19360,7 +19360,7 @@ export class SparkSqlParser extends SQLParserBase {
19360
19360
1,0,0,0,200,2655,1,0,0,0,202,2674,1,0,0,0,204,2700,1,0,0,0,206,2706,
19361
19361
1,0,0,0,208,2708,1,0,0,0,210,2744,1,0,0,0,212,2746,1,0,0,0,214,2750,
19362
19362
1,0,0,0,216,2758,1,0,0,0,218,2769,1,0,0,0,220,2773,1,0,0,0,222,2784,
19363
- 1,0,0,0,224,2821 ,1,0,0,0,226,2823 ,1,0,0,0,228,2825,1,0,0,0,230,2853,
19363
+ 1,0,0,0,224,2819 ,1,0,0,0,226,2821 ,1,0,0,0,228,2825,1,0,0,0,230,2853,
19364
19364
1,0,0,0,232,2874,1,0,0,0,234,2894,1,0,0,0,236,2900,1,0,0,0,238,2904,
19365
19365
1,0,0,0,240,2906,1,0,0,0,242,2909,1,0,0,0,244,2930,1,0,0,0,246,2981,
19366
19366
1,0,0,0,248,2983,1,0,0,0,250,2991,1,0,0,0,252,2999,1,0,0,0,254,3007,
@@ -20210,23 +20210,23 @@ export class SparkSqlParser extends SQLParserBase {
20210
20210
2790,1,0,0,0,2792,2794,1,0,0,0,2793,2795,3,150,75,0,2794,2793,1,
20211
20211
0,0,0,2794,2795,1,0,0,0,2795,2797,1,0,0,0,2796,2798,3,208,104,0,
20212
20212
2797,2796,1,0,0,0,2797,2798,1,0,0,0,2798,2799,1,0,0,0,2799,2800,
20213
- 3,244,122,0,2800,2822 ,1,0,0,0,2801,2802,5,2,0 ,0,2802,2803,3,226 ,
20214
- 113, 0,2803,2805,5,3 ,0,0,2804,2806,3,208,104,0,2805, 2804,1,0,0,0,
20215
- 2805,2806,1,0,0 ,0,2806,2807 ,1,0,0,0,2807,2808,3,244,122 ,0,2808,2822 ,
20216
- 1,0,0 ,0,2809,2810 ,5,2 ,0,0,2810,2811 ,3,198,99 ,0,2811,2813,5,3,0 ,0,
20217
- 2812,2814,3,208,104 ,0,2813, 2812,1,0,0,0,2813,2814,1,0,0 ,0,2814,2815 ,
20218
- 1,0,0,0,2815,2816,3,244,122 ,0,2816,2822,1,0,0 ,0,2817,2818,3,228 ,
20219
- 114 ,0,2818,2819 ,3,244,122 ,0,2819,2822 ,1,0,0,0,2820,2822,3,240,120 ,
20220
- 0,2821,2791 ,1,0,0,0,2821,2801 ,1,0,0,0,2821,2809 ,1,0,0,0,2821,2817 ,
20221
- 1,0,0,0,2821,2820,1,0 ,0,0,2822,225,1,0,0 ,0,2823,2824,3,26,13,0,2824 ,
20222
- 227,1,0,0,0,2825,2826,5,333,0,0,2826,2831,3,280,140,0,2827,2828 ,
20223
- 5,4,0,0,2828,2830,3,280,140,0,2829,2827,1,0,0,0,2830,2833,1,0,0 ,
20224
- 0,2831,2829,1,0,0,0,2831,2832,1,0,0,0,2832,229,1,0,0,0,2833,2831 ,
20225
- 1,0,0,0,2834,2835,5,293,0,0,2835,2837,3,86,43,0,2836,2838,3,232 ,
20226
- 116,0,2837,2836,1,0,0,0,2837,2838,1,0,0,0,2838,2854,1,0,0,0,2839 ,
20227
- 2840,5,293,0,0,2840,2841,5,2,0,0,2841,2842,3,86,43,0,2842,2844,5 ,
20228
- 3,0,0,2843,2845,3,232,116,0,2844,2843,1,0,0,0,2844,2845,1,0 ,0,0,
20229
- 2845,2854,1,0,0,0,2846,2847,5,293,0,0,2847,2848,5,2,0,0,2848,2849,
20213
+ 3,244,122,0,2800,2820 ,1,0,0,0,2801,2803,3,226,113 ,0,2802,2804,3 ,
20214
+ 208,104, 0,2803,2802,1,0 ,0,0,2803, 2804,1,0,0,0, 2804,2805 ,1,0,0,0,
20215
+ 2805,2806,3,244,122 ,0,2806,2820 ,1,0,0,0,2807,2808,5,2,0 ,0,2808,2809 ,
20216
+ 3,198,99 ,0,2809,2811 ,5,3 ,0,0,2810,2812 ,3,208,104 ,0,2811,2810,1 ,0,
20217
+ 0,0,2811,2812,1 ,0,0,0, 2812,2813, 1,0,0,0,2813,2814,3,244,122 ,0,2814,
20218
+ 2820, 1,0,0,0,2815,2816,3,228,114 ,0,2816,2817,3,244,122 ,0,2817,2820 ,
20219
+ 1 ,0,0,0, 2818,2820 ,3,240,120 ,0,2819,2791 ,1,0,0,0,2819,2801,1,0,0 ,
20220
+ 0,2819,2807 ,1,0,0,0,2819,2815 ,1,0,0,0,2819,2818 ,1,0,0,0,2820,225 ,
20221
+ 1,0,0,0,2821,2822,5,2 ,0,0,2822,2823,3,26,13 ,0,2823,2824,5,3,0,0 ,
20222
+ 2824, 227,1,0,0,0,2825,2826,5,333,0,0,2826,2831,3,280,140,0,2827,
20223
+ 2828, 5,4,0,0,2828,2830,3,280,140,0,2829,2827,1,0,0,0,2830,2833,1,
20224
+ 0,0,0, 2831,2829,1,0,0,0,2831,2832,1,0,0,0,2832,229,1,0,0,0,2833,
20225
+ 2831, 1,0,0,0,2834,2835,5,293,0,0,2835,2837,3,86,43,0,2836,2838,3,
20226
+ 232, 116,0,2837,2836,1,0,0,0,2837,2838,1,0,0,0,2838,2854,1,0,0,0,
20227
+ 2839, 2840,5,293,0,0,2840,2841,5,2,0,0,2841,2842,3,86,43,0,2842,2844,
20228
+ 5, 3,0,0,2843,2845,3,232,116,0,2844,2843,1,0,0,0,2844,2845,1,0,0,
20229
+ 0, 2845,2854,1,0,0,0,2846,2847,5,293,0,0,2847,2848,5,2,0,0,2848,2849,
20230
20230
3,26,13,0,2849,2851,5,3,0,0,2850,2852,3,232,116,0,2851,2850,1,0,
20231
20231
0,0,2851,2852,1,0,0,0,2852,2854,1,0,0,0,2853,2834,1,0,0,0,2853,2839,
20232
20232
1,0,0,0,2853,2846,1,0,0,0,2854,231,1,0,0,0,2855,2856,5,346,0,0,2856,
@@ -20668,7 +20668,7 @@ export class SparkSqlParser extends SQLParserBase {
20668
20668
2581,2589,2594,2608,2617,2620,2625,2632,2635,2641,2647,2650,2655,
20669
20669
2660,2664,2670,2674,2677,2682,2685,2690,2694,2697,2700,2706,2711,
20670
20670
2718,2721,2739,2741,2744,2755,2764,2771,2779,2786,2791,2794,2797,
20671
- 2805,2813,2821 ,2831,2837,2844,2851,2853,2866,2872,2874,2884,2890,
20671
+ 2803,2811,2819 ,2831,2837,2844,2851,2853,2866,2872,2874,2884,2890,
20672
20672
2892,2900,2904,2916,2919,2924,2928,2930,2939,2951,2953,2960,2967,
20673
20673
2973,2979,2981,2988,2996,3004,3010,3015,3022,3035,3043,3046,3050,
20674
20674
3052,3059,3070,3077,3087,3092,3096,3106,3113,3126,3128,3136,3138,
@@ -30424,15 +30424,9 @@ export class SubQueryTableSourceContext extends RelationPrimaryContext {
30424
30424
super(ctx.parent, ctx.invokingState);
30425
30425
super.copyFrom(ctx);
30426
30426
}
30427
- public LEFT_PAREN(): antlr.TerminalNode {
30428
- return this.getToken(SparkSqlParser.LEFT_PAREN, 0)!;
30429
- }
30430
30427
public atomSubQueryTableSource(): AtomSubQueryTableSourceContext {
30431
30428
return this.getRuleContext(0, AtomSubQueryTableSourceContext)!;
30432
30429
}
30433
- public RIGHT_PAREN(): antlr.TerminalNode {
30434
- return this.getToken(SparkSqlParser.RIGHT_PAREN, 0)!;
30435
- }
30436
30430
public tableAlias(): TableAliasContext {
30437
30431
return this.getRuleContext(0, TableAliasContext)!;
30438
30432
}
@@ -30597,9 +30591,15 @@ export class AtomSubQueryTableSourceContext extends antlr.ParserRuleContext {
30597
30591
public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) {
30598
30592
super(parent, invokingState);
30599
30593
}
30594
+ public LEFT_PAREN(): antlr.TerminalNode {
30595
+ return this.getToken(SparkSqlParser.LEFT_PAREN, 0)!;
30596
+ }
30600
30597
public query(): QueryContext {
30601
30598
return this.getRuleContext(0, QueryContext)!;
30602
30599
}
30600
+ public RIGHT_PAREN(): antlr.TerminalNode {
30601
+ return this.getToken(SparkSqlParser.RIGHT_PAREN, 0)!;
30602
+ }
30603
30603
public override get ruleIndex(): number {
30604
30604
return SparkSqlParser.RULE_atomSubQueryTableSource;
30605
30605
}
@@ -31523,7 +31523,7 @@ export class TableAllColumnsContext extends antlr.ParserRuleContext {
31523
31523
31524
31524
31525
31525
export class NamedExpressionContext extends antlr.ParserRuleContext {
31526
- public _name ?: ErrorCapturingIdentifierContext;
31526
+ public _alias ?: ErrorCapturingIdentifierContext;
31527
31527
public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) {
31528
31528
super(parent, invokingState);
31529
31529
}
0 commit comments