diff --git a/grammar/FuncTestCaseParser.g4 b/grammar/FuncTestCaseParser.g4 index 9333a2839..9e7e83b6a 100644 --- a/grammar/FuncTestCaseParser.g4 +++ b/grammar/FuncTestCaseParser.g4 @@ -27,7 +27,7 @@ testGroupDescription ; testCase - : functionName=identifier OParen arguments CParen ( OBracket func_options CBracket )? Eq result + : functionName=identifier OParen arguments CParen ( OBracket funcOptions CBracket )? Eq result ; testGroup @@ -57,16 +57,21 @@ argument | timestampTzArg | intervalYearArg | intervalDayArg + | fixedCharArg + | varCharArg + | fixedBinaryArg + | precisionTimestampArg + | precisionTimestampTZArg | listArg ; aggFuncTestCase - : aggFuncCall ( OBracket func_options CBracket )? Eq result + : aggFuncCall ( OBracket funcOptions CBracket )? Eq result ; aggFuncCall - : tableData funcName=identifier OParen qualifiedAggregateFuncArgs CParen #multiArgAggregateFuncCall - | tableRows functName=identifier OParen aggregateFuncArgs CParen #compactAggregateFuncCall + : tableData funcName=identifier OParen qualifiedAggregateFuncArgs? CParen #multiArgAggregateFuncCall + | tableRows functName=identifier OParen aggregateFuncArgs? CParen #compactAggregateFuncCall | functName=identifier OParen dataColumn CParen #singleArgAggregateFuncCall ; @@ -167,30 +172,32 @@ intervalDayArg : IntervalDayLiteral DoubleColon intervalDayType ; -listArg - : literalList DoubleColon listType +fixedCharArg + : StringLiteral DoubleColon fixedCharType ; -literalList - : OBracket (literal (Comma literal)*)? CBracket +varCharArg + : StringLiteral DoubleColon varCharType + ; + +fixedBinaryArg + : StringLiteral DoubleColon fixedBinaryType ; -intervalYearLiteral - : PeriodPrefix (years=IntegerLiteral YearPrefix) (months=IntegerLiteral MSuffix)? - | PeriodPrefix (months=IntegerLiteral MSuffix) +precisionTimestampArg + : TimestampLiteral DoubleColon precisionTimestampType ; -intervalDayLiteral - : PeriodPrefix (days=IntegerLiteral DaySuffix) (TimePrefix timeInterval)? - | PeriodPrefix TimePrefix timeInterval +precisionTimestampTZArg + : TimestampTzLiteral DoubleColon precisionTimestampTZType ; -timeInterval - : hours=IntegerLiteral HourSuffix (minutes=IntegerLiteral MSuffix)? (seconds=IntegerLiteral SecondSuffix)? - (fractionalSeconds=IntegerLiteral FractionalSecondSuffix)? - | minutes=IntegerLiteral MSuffix (seconds=IntegerLiteral SecondSuffix)? (fractionalSeconds=IntegerLiteral FractionalSecondSuffix)? - | seconds=IntegerLiteral SecondSuffix (fractionalSeconds=IntegerLiteral FractionalSecondSuffix)? - | fractionalSeconds=IntegerLiteral FractionalSecondSuffix +listArg + : literalList DoubleColon listType + ; + +literalList + : OBracket (literal (Comma literal)*)? CBracket ; dataType @@ -212,7 +219,6 @@ scalarType | timestampTZType #timestampTz | Date #date | Time #time - | intervalDayType #intervalDay | intervalYearType #intervalYear | UUID #uuid | UserDefined Identifier #userDefined @@ -243,34 +249,32 @@ intervalYearType ; intervalDayType - : (IDay | Interval_Day) + : (IDay | Interval_Day) isnull=QMark? (OAngleBracket len=numericParameter CAngleBracket)? ; fixedCharType - : (FChar | FixedChar) isnull=QMark? OAngleBracket len=numericParameter CAngleBracket #fixedChar + : (FChar | FixedChar) isnull=QMark? OAngleBracket len=numericParameter CAngleBracket ; varCharType - : (VChar | VarChar) isnull=QMark? OAngleBracket len=numericParameter CAngleBracket #varChar + : (VChar | VarChar) isnull=QMark? OAngleBracket len=numericParameter CAngleBracket ; fixedBinaryType - : (FBin | FixedBinary) isnull=QMark? OAngleBracket len=numericParameter CAngleBracket #fixedBinary + : (FBin | FixedBinary) isnull=QMark? OAngleBracket len=numericParameter CAngleBracket ; decimalType : (Dec | Decimal) isnull=QMark? - (OAngleBracket precision=numericParameter Comma scale=numericParameter CAngleBracket)? #decimal + (OAngleBracket precision=numericParameter Comma scale=numericParameter CAngleBracket)? ; precisionTimestampType - : (PTs | Precision_Timestamp) isnull=QMark? - OAngleBracket precision=numericParameter CAngleBracket #precisionTimestamp + : (PTs | Precision_Timestamp) isnull=QMark? OAngleBracket precision=numericParameter CAngleBracket ; precisionTimestampTZType - : (PTsTZ | Precision_Timestamp_TZ) isnull=QMark? - OAngleBracket precision=numericParameter CAngleBracket #precisionTimestampTZ + : (PTsTZ | Precision_Timestamp_TZ) isnull=QMark? OAngleBracket precision=numericParameter CAngleBracket ; listType @@ -282,6 +286,7 @@ parameterizedType | varCharType | fixedBinaryType | decimalType + | intervalDayType | precisionTimestampType | precisionTimestampTZType // TODO implement the rest of the parameterized types @@ -298,24 +303,24 @@ substraitError : ErrorResult | UndefineResult ; -func_option - : option_name Colon option_value +funcOption + : optionName Colon optionValue ; -option_name +optionName : Overflow | Rounding | NullHandling | SpacesOnly | Identifier ; -option_value +optionValue : Error | Saturate | Silent | TieToEven | NaN | Truncate | AcceptNulls | IgnoreNulls | BooleanLiteral | NullLiteral | Identifier ; -func_options - : func_option (Comma func_option)* +funcOptions + : funcOption (Comma funcOption)* ; nonReserved // IMPORTANT: this rule must only contain tokens diff --git a/grammar/Makefile b/grammar/Makefile index ba99957bb..f1920c053 100644 --- a/grammar/Makefile +++ b/grammar/Makefile @@ -13,3 +13,4 @@ generate_type_parser: clean: rm -rf $(TYPE_OUTPUT_DIR)/*.py $(TYPE_OUTPUT_DIR)/*.tokens $(TYPE_OUTPUT_DIR)/*.interp rm -rf $(TESTCASE_OUTPUT_DIR)/*.py $(TESTCASE_OUTPUT_DIR)/*.tokens $(TESTCASE_OUTPUT_DIR)/*.interp + rm -rf ./*.tokens diff --git a/tests/coverage/antlr_parser/FuncTestCaseParser.py b/tests/coverage/antlr_parser/FuncTestCaseParser.py index 7c2c46972..e0de3145b 100644 --- a/tests/coverage/antlr_parser/FuncTestCaseParser.py +++ b/tests/coverage/antlr_parser/FuncTestCaseParser.py @@ -16,7 +16,7 @@ def serializedATN(): 4, 1, 120, - 592, + 573, 2, 0, 7, @@ -277,20 +277,28 @@ def serializedATN(): 64, 7, 64, + 2, + 65, + 7, + 65, + 2, + 66, + 7, + 66, 1, 0, 1, 0, 4, 0, - 133, + 137, 8, 0, 11, 0, 12, 0, - 134, + 138, 1, 0, 1, @@ -325,14 +333,14 @@ def serializedATN(): 3, 5, 3, - 153, + 157, 8, 3, 10, 3, 12, 3, - 156, + 160, 9, 3, 1, @@ -357,7 +365,7 @@ def serializedATN(): 5, 3, 5, - 168, + 172, 8, 5, 1, @@ -372,31 +380,31 @@ def serializedATN(): 6, 4, 6, - 175, + 179, 8, 6, 11, 6, 12, 6, - 176, + 180, 1, 6, 1, 6, 4, 6, - 181, + 185, 8, 6, 11, 6, 12, 6, - 182, + 186, 3, 6, - 185, + 189, 8, 6, 1, @@ -407,14 +415,14 @@ def serializedATN(): 7, 5, 7, - 190, + 194, 8, 7, 10, 7, 12, 7, - 193, + 197, 9, 7, 1, @@ -423,7 +431,7 @@ def serializedATN(): 8, 3, 8, - 197, + 201, 8, 8, 1, @@ -452,9 +460,19 @@ def serializedATN(): 9, 1, 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, + 1, + 9, 3, 9, - 212, + 221, 8, 9, 1, @@ -469,7 +487,7 @@ def serializedATN(): 10, 3, 10, - 219, + 228, 8, 10, 1, @@ -486,6 +504,11 @@ def serializedATN(): 11, 1, 11, + 3, + 11, + 237, + 8, + 11, 1, 11, 1, @@ -498,6 +521,11 @@ def serializedATN(): 11, 1, 11, + 3, + 11, + 245, + 8, + 11, 1, 11, 1, @@ -514,7 +542,7 @@ def serializedATN(): 11, 3, 11, - 241, + 254, 8, 11, 1, @@ -531,14 +559,14 @@ def serializedATN(): 12, 5, 12, - 249, + 262, 8, 12, 10, 12, 12, 12, - 252, + 265, 9, 12, 1, @@ -559,19 +587,19 @@ def serializedATN(): 13, 5, 13, - 262, + 275, 8, 13, 10, 13, 12, 13, - 265, + 278, 9, 13, 3, 13, - 267, + 280, 8, 13, 1, @@ -596,19 +624,19 @@ def serializedATN(): 15, 5, 15, - 279, + 292, 8, 15, 10, 15, 12, 15, - 282, + 295, 9, 15, 3, 15, - 284, + 297, 8, 15, 1, @@ -637,7 +665,7 @@ def serializedATN(): 16, 3, 16, - 298, + 311, 8, 16, 1, @@ -648,14 +676,14 @@ def serializedATN(): 17, 5, 17, - 303, + 316, 8, 17, 10, 17, 12, 17, - 306, + 319, 9, 17, 1, @@ -666,14 +694,14 @@ def serializedATN(): 18, 5, 18, - 311, + 324, 8, 18, 10, 18, 12, 18, - 314, + 327, 9, 18, 1, @@ -686,7 +714,7 @@ def serializedATN(): 19, 3, 19, - 320, + 333, 8, 19, 1, @@ -699,7 +727,7 @@ def serializedATN(): 20, 3, 20, - 326, + 339, 8, 20, 1, @@ -710,7 +738,7 @@ def serializedATN(): 21, 3, 21, - 331, + 344, 8, 21, 1, @@ -829,166 +857,37 @@ def serializedATN(): 36, 1, 36, - 5, - 36, - 391, - 8, - 36, - 10, - 36, - 12, - 36, - 394, - 9, - 36, - 3, - 36, - 396, - 8, - 36, - 1, - 36, - 1, - 36, - 1, - 37, - 1, - 37, - 1, - 37, 1, 37, 1, 37, 1, 37, - 3, - 37, - 406, - 8, - 37, - 1, - 37, - 1, - 37, 1, 37, - 3, - 37, - 411, - 8, - 37, - 1, - 38, - 1, - 38, - 1, - 38, - 1, - 38, - 1, - 38, 1, 38, - 3, - 38, - 419, - 8, - 38, 1, 38, 1, 38, 1, 38, - 3, - 38, - 424, - 8, - 38, - 1, - 39, - 1, - 39, - 1, - 39, - 1, - 39, - 3, - 39, - 430, - 8, - 39, - 1, - 39, - 1, - 39, - 3, - 39, - 434, - 8, - 39, - 1, - 39, - 1, - 39, - 3, - 39, - 438, - 8, - 39, - 1, - 39, - 1, - 39, - 1, - 39, - 1, - 39, - 3, - 39, - 444, - 8, - 39, - 1, - 39, - 1, - 39, - 3, - 39, - 448, - 8, - 39, - 1, - 39, - 1, - 39, 1, 39, 1, 39, - 3, - 39, - 454, - 8, - 39, 1, 39, 1, 39, - 3, - 39, - 458, - 8, - 39, 1, 40, 1, 40, - 3, + 1, 40, - 462, - 8, + 1, 40, 1, 41, @@ -998,47 +897,75 @@ def serializedATN(): 41, 1, 41, - 1, + 5, 41, - 1, + 424, + 8, 41, - 1, + 10, 41, - 1, + 12, 41, - 1, + 427, + 9, 41, - 1, + 3, 41, - 1, + 429, + 8, 41, 1, 41, 1, 41, 1, - 41, + 42, 1, - 41, + 42, + 3, + 42, + 435, + 8, + 42, 1, - 41, + 43, 1, - 41, + 43, 1, - 41, - 3, - 41, - 482, - 8, - 41, + 43, 1, - 42, + 43, 1, - 42, + 43, + 1, + 43, + 1, + 43, + 1, + 43, + 1, + 43, + 1, + 43, + 1, + 43, + 1, + 43, + 1, + 43, + 1, + 43, + 1, + 43, 1, 43, 1, 43, + 3, + 43, + 454, + 8, + 43, 1, 44, 1, @@ -1063,26 +990,13 @@ def serializedATN(): 49, 1, 49, - 3, - 49, - 500, - 8, - 49, - 1, - 49, - 1, - 49, - 1, - 49, - 1, - 49, 1, 50, 1, 50, 3, 50, - 508, + 470, 8, 50, 1, @@ -1093,13 +1007,18 @@ def serializedATN(): 50, 1, 50, + 3, + 50, + 476, + 8, + 50, 1, 51, 1, 51, 3, 51, - 516, + 480, 8, 51, 1, @@ -1116,7 +1035,7 @@ def serializedATN(): 52, 3, 52, - 524, + 488, 8, 52, 1, @@ -1128,21 +1047,12 @@ def serializedATN(): 1, 52, 1, - 52, - 1, - 52, - 3, - 52, - 532, - 8, - 52, - 1, 53, 1, 53, 3, 53, - 536, + 496, 8, 53, 1, @@ -1159,7 +1069,7 @@ def serializedATN(): 54, 3, 54, - 544, + 504, 8, 54, 1, @@ -1171,12 +1081,21 @@ def serializedATN(): 1, 54, 1, + 54, + 1, + 54, + 3, + 54, + 512, + 8, + 54, + 1, 55, 1, 55, 3, 55, - 552, + 516, 8, 55, 1, @@ -1191,6 +1110,11 @@ def serializedATN(): 56, 1, 56, + 3, + 56, + 524, + 8, + 56, 1, 56, 1, @@ -1199,11 +1123,19 @@ def serializedATN(): 56, 1, 56, + 1, + 57, + 1, + 57, 3, - 56, - 564, + 57, + 532, 8, - 56, + 57, + 1, + 57, + 1, + 57, 1, 57, 1, @@ -1213,9 +1145,20 @@ def serializedATN(): 1, 58, 1, - 59, + 58, 1, - 59, + 58, + 1, + 58, + 1, + 58, + 1, + 58, + 3, + 58, + 545, + 8, + 58, 1, 59, 1, @@ -1229,22 +1172,12 @@ def serializedATN(): 1, 61, 1, - 62, + 61, 1, - 62, + 61, 1, 62, - 5, - 62, - 581, - 8, - 62, - 10, - 62, - 12, - 62, - 584, - 9, + 1, 62, 1, 63, @@ -1254,16 +1187,38 @@ def serializedATN(): 64, 1, 64, - 3, + 1, + 64, + 5, 64, - 590, + 562, 8, 64, - 1, + 10, + 64, + 12, + 64, + 565, + 9, 64, + 1, + 65, + 1, + 65, + 1, + 66, + 1, + 66, + 3, + 66, + 571, + 8, + 66, + 1, + 66, 0, 0, - 65, + 67, 0, 2, 4, @@ -1329,6 +1284,8 @@ def serializedATN(): 124, 126, 128, + 130, + 132, 0, 21, 1, @@ -1457,1086 +1414,1098 @@ def serializedATN(): 22, 115, 116, - 616, + 591, 0, - 130, + 134, 1, 0, 0, 0, 2, - 138, + 142, 1, 0, 0, 0, 4, - 141, + 145, 1, 0, 0, 0, 6, - 146, + 150, 1, 0, 0, 0, 8, - 157, + 161, 1, 0, 0, 0, 10, - 159, + 163, 1, 0, 0, 0, 12, - 184, + 188, 1, 0, 0, 0, 14, - 186, + 190, 1, 0, 0, 0, 16, - 196, + 200, 1, 0, 0, 0, 18, - 211, + 220, 1, 0, 0, 0, 20, - 213, + 222, 1, 0, 0, 0, 22, - 240, + 253, 1, 0, 0, 0, 24, - 242, + 255, 1, 0, 0, 0, 26, - 257, + 270, 1, 0, 0, 0, 28, - 270, + 283, 1, 0, 0, 0, 30, - 274, + 287, 1, 0, 0, 0, 32, - 297, + 310, 1, 0, 0, 0, 34, - 299, + 312, 1, 0, 0, 0, 36, - 307, + 320, 1, 0, 0, 0, 38, - 319, + 332, 1, 0, 0, 0, 40, - 325, + 338, 1, 0, 0, 0, 42, - 330, + 343, 1, 0, 0, 0, 44, - 332, + 345, 1, 0, 0, 0, 46, - 334, + 347, 1, 0, 0, 0, 48, - 338, + 351, 1, 0, 0, 0, 50, - 342, + 355, 1, 0, 0, 0, 52, - 346, + 359, 1, 0, 0, 0, 54, - 350, + 363, 1, 0, 0, 0, 56, - 354, + 367, 1, 0, 0, 0, 58, - 358, + 371, 1, 0, 0, 0, 60, - 362, + 375, 1, 0, 0, 0, 62, - 366, + 379, 1, 0, 0, 0, 64, - 370, + 383, 1, 0, 0, 0, 66, - 374, + 387, 1, 0, 0, 0, 68, - 378, + 391, 1, 0, 0, 0, 70, - 382, + 395, 1, 0, 0, 0, 72, - 386, + 399, 1, 0, 0, 0, 74, - 410, + 403, 1, 0, 0, 0, 76, - 423, + 407, 1, 0, 0, 0, 78, - 457, + 411, 1, 0, 0, 0, 80, - 461, + 415, 1, 0, 0, 0, 82, - 481, + 419, 1, 0, 0, 0, 84, - 483, + 434, 1, 0, 0, 0, 86, - 485, + 453, 1, 0, 0, 0, 88, - 487, + 455, 1, 0, 0, 0, 90, - 489, + 457, 1, 0, 0, 0, 92, - 491, + 459, 1, 0, 0, 0, 94, - 493, + 461, 1, 0, 0, 0, 96, - 495, + 463, 1, 0, 0, 0, 98, - 497, + 465, 1, 0, 0, 0, 100, - 505, + 467, 1, 0, 0, 0, 102, - 513, + 477, 1, 0, 0, 0, 104, - 521, + 485, 1, 0, 0, 0, 106, - 533, + 493, 1, 0, 0, 0, 108, - 541, + 501, 1, 0, 0, 0, 110, - 549, + 513, 1, 0, 0, 0, 112, - 563, + 521, 1, 0, 0, 0, 114, - 565, + 529, 1, 0, 0, 0, 116, - 567, + 544, 1, 0, 0, 0, 118, - 569, + 546, 1, 0, 0, 0, 120, - 573, + 548, 1, 0, 0, 0, 122, - 575, + 550, 1, 0, 0, 0, 124, - 577, + 554, 1, 0, 0, 0, 126, - 585, + 556, 1, 0, 0, 0, 128, - 589, + 558, 1, 0, 0, 0, 130, + 566, + 1, + 0, + 0, + 0, 132, + 570, + 1, + 0, + 0, + 0, + 134, + 136, 3, 2, 1, 0, - 131, - 133, + 135, + 137, 3, 12, 6, 0, - 132, - 131, + 136, + 135, 1, 0, 0, 0, - 133, - 134, + 137, + 138, 1, 0, 0, 0, - 134, - 132, + 138, + 136, 1, 0, 0, 0, - 134, - 135, + 138, + 139, 1, 0, 0, 0, - 135, - 136, + 139, + 140, 1, 0, 0, 0, - 136, - 137, + 140, + 141, 5, 0, 0, 1, - 137, + 141, 1, 1, 0, 0, 0, - 138, - 139, + 142, + 143, 3, 4, 2, 0, - 139, - 140, + 143, + 144, 3, 6, 3, 0, - 140, + 144, 3, 1, 0, 0, 0, - 141, - 142, + 145, + 146, 5, 2, 0, 0, - 142, - 143, + 146, + 147, 7, 0, 0, 0, - 143, - 144, + 147, + 148, 5, 111, 0, 0, - 144, - 145, + 148, + 149, 5, 6, 0, 0, - 145, + 149, 5, 1, 0, 0, 0, - 146, - 147, + 150, + 151, 5, 2, 0, 0, - 147, - 148, + 151, + 152, 5, 5, 0, 0, - 148, - 149, + 152, + 153, 5, 111, 0, 0, - 149, - 154, + 153, + 158, 5, 44, 0, 0, - 150, - 151, + 154, + 155, 5, 110, 0, 0, - 151, - 153, + 155, + 157, 5, 44, 0, 0, - 152, - 150, + 156, + 154, 1, 0, 0, 0, - 153, - 156, + 157, + 160, 1, 0, 0, 0, - 154, - 152, + 158, + 156, 1, 0, 0, 0, - 154, - 155, + 158, + 159, 1, 0, 0, 0, - 155, + 159, 7, 1, 0, 0, 0, - 156, - 154, + 160, + 158, 1, 0, 0, 0, - 157, - 158, + 161, + 162, 5, 7, 0, 0, - 158, + 162, 9, 1, 0, 0, 0, - 159, - 160, + 163, + 164, 3, - 128, - 64, + 132, + 66, 0, - 160, - 161, + 164, + 165, 5, 106, 0, 0, - 161, - 162, + 165, + 166, 3, 14, 7, 0, - 162, - 167, + 166, + 171, 5, 107, 0, 0, - 163, - 164, + 167, + 168, 5, 108, 0, 0, - 164, - 165, + 168, + 169, 3, - 124, - 62, + 128, + 64, 0, - 165, - 166, + 169, + 170, 5, 109, 0, 0, - 166, - 168, + 170, + 172, 1, 0, 0, 0, + 171, 167, - 163, 1, 0, 0, 0, - 167, - 168, + 171, + 172, 1, 0, 0, 0, - 168, - 169, + 172, + 173, 1, 0, 0, 0, - 169, - 170, + 173, + 174, 5, 99, 0, 0, - 170, - 171, + 174, + 175, 3, 16, 8, 0, - 171, + 175, 11, 1, 0, 0, 0, - 172, - 174, + 176, + 178, 3, 8, 4, 0, - 173, - 175, + 177, + 179, 3, 10, 5, 0, - 174, - 173, + 178, + 177, 1, 0, 0, 0, - 175, - 176, + 179, + 180, 1, 0, 0, 0, - 176, - 174, + 180, + 178, 1, 0, 0, 0, - 176, - 177, + 180, + 181, 1, 0, 0, 0, - 177, - 185, + 181, + 189, 1, 0, 0, 0, - 178, - 180, + 182, + 184, 3, 8, 4, 0, - 179, - 181, + 183, + 185, 3, 20, 10, 0, - 180, - 179, + 184, + 183, 1, 0, 0, 0, - 181, - 182, + 185, + 186, 1, 0, 0, 0, - 182, - 180, + 186, + 184, 1, 0, 0, 0, - 182, - 183, + 186, + 187, 1, 0, 0, 0, - 183, - 185, + 187, + 189, 1, 0, 0, 0, - 184, - 172, + 188, + 176, 1, 0, 0, 0, - 184, - 178, + 188, + 182, 1, 0, 0, 0, - 185, + 189, 13, 1, 0, 0, 0, - 186, - 191, + 190, + 195, 3, 18, 9, 0, - 187, - 188, + 191, + 192, 5, 110, 0, 0, - 188, - 190, + 192, + 194, 3, 18, 9, 0, - 189, - 187, + 193, + 191, 1, 0, 0, 0, - 190, - 193, + 194, + 197, 1, 0, 0, 0, - 191, - 189, + 195, + 193, 1, 0, 0, 0, - 191, - 192, + 195, + 196, 1, 0, 0, 0, - 192, + 196, 15, 1, 0, 0, 0, - 193, - 191, + 197, + 195, 1, 0, 0, 0, - 194, - 197, + 198, + 201, 3, 18, 9, 0, - 195, - 197, + 199, + 201, 3, - 116, - 58, + 120, + 60, 0, - 196, - 194, + 200, + 198, 1, 0, 0, 0, - 196, - 195, + 200, + 199, 1, 0, 0, 0, - 197, + 201, 17, 1, 0, 0, 0, - 198, - 212, + 202, + 221, 3, 46, 23, 0, - 199, - 212, + 203, + 221, 3, 48, 24, 0, - 200, - 212, + 204, + 221, 3, 50, 25, 0, - 201, - 212, + 205, + 221, 3, 54, 27, 0, - 202, - 212, + 206, + 221, 3, 56, 28, 0, - 203, - 212, + 207, + 221, 3, 52, 26, 0, - 204, - 212, + 208, + 221, 3, 58, 29, 0, - 205, - 212, + 209, + 221, 3, 60, 30, 0, - 206, - 212, + 210, + 221, 3, 62, 31, 0, - 207, - 212, + 211, + 221, 3, 64, 32, 0, - 208, 212, + 221, 3, 66, 33, 0, - 209, - 212, + 213, + 221, 3, 68, 34, 0, - 210, - 212, + 214, + 221, 3, 70, 35, 0, - 211, - 198, - 1, - 0, - 0, - 0, - 211, - 199, - 1, - 0, - 0, - 0, - 211, - 200, - 1, - 0, + 215, + 221, + 3, + 72, + 36, 0, + 216, + 221, + 3, + 74, + 37, 0, - 211, - 201, - 1, + 217, + 221, + 3, + 76, + 38, 0, + 218, + 221, + 3, + 78, + 39, 0, + 219, + 221, + 3, + 80, + 40, 0, - 211, + 220, 202, 1, 0, 0, 0, - 211, + 220, 203, 1, 0, 0, 0, - 211, + 220, 204, 1, 0, 0, 0, - 211, + 220, 205, 1, 0, 0, 0, - 211, + 220, 206, 1, 0, 0, 0, - 211, + 220, 207, 1, 0, 0, 0, - 211, + 220, 208, 1, 0, 0, 0, - 211, + 220, 209, 1, 0, 0, 0, - 211, + 220, 210, 1, 0, 0, 0, + 220, + 211, + 1, + 0, + 0, + 0, + 220, 212, - 19, 1, 0, 0, 0, + 220, 213, - 218, - 3, - 22, - 11, + 1, + 0, 0, + 0, + 220, 214, - 215, - 5, - 108, + 1, 0, 0, + 0, + 220, 215, - 216, - 3, - 124, - 62, + 1, 0, - 216, - 217, - 5, - 109, 0, 0, - 217, - 219, + 220, + 216, 1, 0, 0, 0, - 218, - 214, + 220, + 217, 1, 0, 0, 0, + 220, 218, - 219, 1, 0, 0, 0, - 219, 220, + 219, 1, 0, 0, 0, - 220, 221, - 5, - 99, + 19, + 1, 0, 0, - 221, - 222, - 3, - 16, - 8, 0, 222, - 21, - 1, - 0, - 0, + 227, + 3, + 22, + 11, 0, 223, 224, - 3, - 24, - 12, + 5, + 108, + 0, 0, 224, 225, @@ -2547,215 +2516,227 @@ def serializedATN(): 225, 226, 5, - 106, + 109, 0, 0, 226, + 228, + 1, + 0, + 0, + 0, 227, - 3, - 34, - 17, + 223, + 1, + 0, + 0, 0, 227, 228, - 5, - 107, + 1, + 0, 0, 0, 228, - 241, + 229, 1, 0, 0, 0, 229, 230, - 3, - 26, - 13, + 5, + 99, + 0, 0, 230, 231, 3, - 128, - 64, + 16, + 8, 0, 231, - 232, - 5, - 106, + 21, + 1, + 0, 0, 0, 232, 233, 3, - 36, - 18, + 24, + 12, 0, 233, 234, - 5, - 107, - 0, - 0, - 234, - 241, - 1, - 0, - 0, - 0, - 235, - 236, 3, - 128, - 64, + 132, + 66, 0, + 234, 236, - 237, 5, 106, 0, 0, + 235, 237, - 238, 3, - 28, - 14, - 0, - 238, - 239, - 5, - 107, - 0, + 34, + 17, 0, - 239, - 241, + 236, + 235, 1, 0, 0, 0, - 240, - 223, + 236, + 237, 1, 0, 0, 0, - 240, - 229, + 237, + 238, 1, 0, 0, 0, - 240, - 235, + 238, + 239, + 5, + 107, + 0, + 0, + 239, + 254, 1, 0, 0, 0, + 240, 241, - 23, - 1, - 0, + 3, + 26, + 13, 0, + 241, + 242, + 3, + 132, + 66, 0, 242, - 243, + 244, 5, - 8, + 106, 0, 0, 243, + 245, + 3, + 36, + 18, + 0, 244, - 5, - 119, + 243, + 1, + 0, 0, 0, 244, 245, - 5, - 106, + 1, + 0, 0, 0, 245, - 250, - 3, - 80, - 40, + 246, + 1, + 0, + 0, 0, 246, 247, 5, - 110, + 107, 0, 0, 247, - 249, - 3, - 80, - 40, - 0, - 248, - 246, + 254, 1, 0, 0, 0, + 248, 249, - 252, - 1, + 3, + 132, + 66, 0, + 249, + 250, + 5, + 106, 0, 0, 250, - 248, - 1, + 251, + 3, + 28, + 14, 0, + 251, + 252, + 5, + 107, 0, 0, - 250, - 251, + 252, + 254, 1, 0, 0, 0, - 251, 253, + 232, 1, 0, 0, 0, - 252, - 250, + 253, + 240, 1, 0, 0, 0, 253, - 254, - 5, - 107, + 248, + 1, + 0, 0, 0, 254, - 255, - 5, - 99, + 23, + 1, + 0, 0, 0, 255, 256, - 3, - 26, - 13, + 5, + 8, 0, - 256, - 25, - 1, 0, + 256, + 257, + 5, + 119, 0, 0, 257, - 266, + 258, 5, 106, 0, @@ -2763,8 +2744,8 @@ def serializedATN(): 258, 263, 3, - 30, - 15, + 84, + 42, 0, 259, 260, @@ -2775,8 +2756,8 @@ def serializedATN(): 260, 262, 3, - 30, - 15, + 84, + 42, 0, 261, 259, @@ -2803,7 +2784,7 @@ def serializedATN(): 0, 0, 264, - 267, + 266, 1, 0, 0, @@ -2815,82 +2796,82 @@ def serializedATN(): 0, 0, 266, - 258, - 1, - 0, - 0, - 0, - 266, 267, - 1, - 0, + 5, + 107, 0, 0, 267, 268, - 1, - 0, + 5, + 99, 0, 0, 268, 269, - 5, - 107, - 0, + 3, + 26, + 13, 0, 269, - 27, + 25, 1, 0, 0, 0, 270, + 279, + 5, + 106, + 0, + 0, 271, + 276, 3, 30, 15, 0, - 271, 272, + 273, 5, - 93, + 110, 0, 0, - 272, 273, + 275, 3, - 80, - 40, + 30, + 15, 0, - 273, - 29, + 274, + 272, 1, 0, 0, 0, - 274, - 283, - 5, - 106, + 275, + 278, + 1, + 0, + 0, + 0, + 276, + 274, + 1, 0, 0, - 275, - 280, - 3, - 32, - 16, 0, 276, 277, - 5, - 110, + 1, + 0, 0, 0, 277, - 279, - 3, - 32, - 16, + 280, + 1, + 0, + 0, 0, 278, 276, @@ -2899,13 +2880,13 @@ def serializedATN(): 0, 0, 279, - 282, + 271, 1, 0, 0, 0, + 279, 280, - 278, 1, 0, 0, @@ -2917,817 +2898,811 @@ def serializedATN(): 0, 0, 281, + 282, + 5, + 107, + 0, + 0, + 282, + 27, + 1, + 0, + 0, + 0, + 283, + 284, + 3, + 30, + 15, + 0, 284, + 285, + 5, + 93, + 0, + 0, + 285, + 286, + 3, + 84, + 42, + 0, + 286, + 29, 1, 0, 0, 0, - 282, - 280, + 287, + 296, + 5, + 106, + 0, + 0, + 288, + 293, + 3, + 32, + 16, + 0, + 289, + 290, + 5, + 110, + 0, + 0, + 290, + 292, + 3, + 32, + 16, + 0, + 291, + 289, 1, 0, 0, 0, - 283, - 275, + 292, + 295, 1, 0, 0, 0, - 283, - 284, + 293, + 291, 1, 0, 0, 0, - 284, - 285, + 293, + 294, 1, 0, 0, 0, - 285, - 286, + 294, + 297, + 1, + 0, + 0, + 0, + 295, + 293, + 1, + 0, + 0, + 0, + 296, + 288, + 1, + 0, + 0, + 0, + 296, + 297, + 1, + 0, + 0, + 0, + 297, + 298, + 1, + 0, + 0, + 0, + 298, + 299, 5, 107, 0, 0, - 286, + 299, 31, 1, 0, 0, 0, - 287, - 298, + 300, + 311, 5, 43, 0, 0, - 288, - 298, + 301, + 311, 3, 42, 21, 0, - 289, - 298, + 302, + 311, 5, 26, 0, 0, - 290, - 298, + 303, + 311, 5, 44, 0, 0, - 291, - 298, + 304, + 311, 5, 30, 0, 0, - 292, - 298, + 305, + 311, 5, 29, 0, 0, - 293, - 298, + 306, + 311, 5, 28, 0, 0, - 294, - 298, + 307, + 311, 5, 27, 0, 0, - 295, - 298, + 308, + 311, 5, 41, 0, 0, - 296, - 298, + 309, + 311, 5, 42, 0, 0, - 297, - 287, + 310, + 300, 1, 0, 0, 0, - 297, - 288, + 310, + 301, 1, 0, 0, 0, - 297, - 289, + 310, + 302, 1, 0, 0, 0, - 297, - 290, + 310, + 303, 1, 0, 0, 0, - 297, - 291, + 310, + 304, 1, 0, 0, 0, - 297, - 292, + 310, + 305, 1, 0, 0, 0, - 297, - 293, + 310, + 306, 1, 0, 0, 0, - 297, - 294, + 310, + 307, 1, 0, 0, 0, - 297, - 295, + 310, + 308, 1, 0, 0, 0, - 297, - 296, + 310, + 309, 1, 0, 0, 0, - 298, + 311, 33, 1, 0, 0, 0, - 299, - 304, + 312, + 317, 3, 38, 19, 0, - 300, - 301, + 313, + 314, 5, 110, 0, 0, - 301, - 303, + 314, + 316, 3, 38, 19, 0, - 302, - 300, + 315, + 313, 1, 0, 0, 0, - 303, - 306, + 316, + 319, 1, 0, 0, 0, - 304, - 302, + 317, + 315, 1, 0, 0, 0, - 304, - 305, + 317, + 318, 1, 0, 0, 0, - 305, + 318, 35, 1, 0, 0, 0, - 306, - 304, + 319, + 317, 1, 0, 0, 0, - 307, - 312, - 3, + 320, + 325, + 3, 40, 20, 0, - 308, - 309, + 321, + 322, 5, 110, 0, 0, - 309, - 311, + 322, + 324, 3, 40, 20, 0, - 310, - 308, + 323, + 321, 1, 0, 0, 0, - 311, - 314, + 324, + 327, 1, 0, 0, 0, - 312, - 310, + 325, + 323, 1, 0, 0, 0, - 312, - 313, + 325, + 326, 1, 0, 0, 0, - 313, + 326, 37, 1, 0, 0, 0, - 314, - 312, + 327, + 325, 1, 0, 0, 0, - 315, - 316, + 328, + 329, 5, 119, 0, 0, - 316, - 317, + 329, + 330, 5, 114, 0, 0, - 317, - 320, + 330, + 333, 5, 45, 0, 0, - 318, - 320, + 331, + 333, 3, 18, 9, 0, - 319, - 315, + 332, + 328, 1, 0, 0, 0, - 319, - 318, + 332, + 331, 1, 0, 0, 0, - 320, + 333, 39, 1, 0, 0, 0, - 321, - 322, + 334, + 335, 5, 45, 0, 0, - 322, - 323, + 335, + 336, 5, 93, 0, 0, - 323, - 326, + 336, + 339, 3, - 80, - 40, + 84, + 42, 0, - 324, - 326, + 337, + 339, 3, 18, 9, 0, - 325, - 321, + 338, + 334, 1, 0, 0, 0, - 325, - 324, + 338, + 337, 1, 0, 0, 0, - 326, + 339, 41, 1, 0, 0, 0, - 327, - 331, + 340, + 344, 5, 24, 0, 0, - 328, - 331, + 341, + 344, 5, 23, 0, 0, - 329, - 331, + 342, + 344, 3, 44, 22, 0, - 330, - 327, + 343, + 340, 1, 0, 0, 0, - 330, - 328, + 343, + 341, 1, 0, 0, 0, - 330, - 329, + 343, + 342, 1, 0, 0, 0, - 331, + 344, 43, 1, 0, 0, 0, - 332, - 333, + 345, + 346, 7, 1, 0, 0, - 333, + 346, 45, 1, 0, 0, 0, - 334, - 335, + 347, + 348, 5, 43, 0, 0, - 335, - 336, + 348, + 349, 5, 93, 0, 0, - 336, - 337, + 349, + 350, 3, - 80, - 40, + 84, + 42, 0, - 337, + 350, 47, 1, 0, 0, 0, - 338, - 339, + 351, + 352, 5, 23, 0, 0, - 339, - 340, + 352, + 353, 5, 93, 0, 0, - 340, - 341, + 353, + 354, 7, 2, 0, 0, - 341, + 354, 49, 1, 0, 0, 0, - 342, - 343, + 355, + 356, 3, 42, 21, 0, - 343, - 344, + 356, + 357, 5, 93, 0, 0, - 344, - 345, + 357, + 358, 7, 3, 0, 0, - 345, + 358, 51, 1, 0, 0, 0, - 346, - 347, + 359, + 360, 3, 42, 21, 0, - 347, - 348, + 360, + 361, 5, 93, 0, 0, - 348, - 349, + 361, + 362, 3, - 104, - 52, + 108, + 54, 0, - 349, + 362, 53, 1, 0, 0, 0, - 350, - 351, + 363, + 364, 5, 26, 0, 0, - 351, - 352, + 364, + 365, 5, 93, 0, 0, - 352, - 353, + 365, + 366, 3, - 84, - 42, + 88, + 44, 0, - 353, + 366, 55, 1, 0, 0, 0, - 354, - 355, + 367, + 368, 5, 44, 0, 0, - 355, - 356, + 368, + 369, 5, 93, 0, 0, - 356, - 357, + 369, + 370, 3, - 86, - 43, + 90, + 45, 0, - 357, + 370, 57, 1, 0, 0, 0, - 358, - 359, + 371, + 372, 5, 30, 0, 0, - 359, - 360, + 372, + 373, 5, 93, 0, 0, - 360, - 361, + 373, + 374, 5, 62, 0, 0, - 361, + 374, 59, 1, 0, 0, 0, - 362, - 363, + 375, + 376, 5, 29, 0, 0, - 363, - 364, + 376, + 377, 5, 93, 0, 0, - 364, - 365, + 377, + 378, 5, 63, 0, 0, - 365, + 378, 61, 1, 0, 0, 0, - 366, - 367, + 379, + 380, 5, 28, 0, 0, - 367, - 368, - 5, - 93, - 0, - 0, - 368, - 369, - 3, - 90, - 45, - 0, - 369, - 63, - 1, - 0, - 0, - 0, - 370, - 371, - 5, - 27, - 0, - 0, - 371, - 372, - 5, - 93, - 0, - 0, - 372, - 373, - 3, - 92, - 46, - 0, - 373, - 65, - 1, - 0, - 0, - 0, - 374, - 375, - 5, - 41, - 0, - 0, - 375, - 376, + 380, + 381, 5, 93, 0, 0, - 376, - 377, + 381, + 382, 3, 94, 47, 0, - 377, - 67, + 382, + 63, 1, 0, 0, 0, - 378, - 379, - 5, - 42, - 0, - 0, - 379, - 380, + 383, + 384, 5, - 93, - 0, - 0, - 380, - 381, - 3, - 96, - 48, - 0, - 381, - 69, - 1, - 0, - 0, + 27, 0, - 382, - 383, - 3, - 72, - 36, 0, - 383, 384, + 385, 5, 93, 0, 0, - 384, 385, + 386, 3, - 110, - 55, + 96, + 48, 0, - 385, - 71, + 386, + 65, 1, 0, 0, 0, - 386, - 395, + 387, + 388, 5, - 108, - 0, + 41, 0, - 387, - 392, - 3, - 32, - 16, 0, 388, 389, 5, - 110, + 93, 0, 0, 389, - 391, + 390, 3, - 32, - 16, + 98, + 49, 0, 390, - 388, + 67, 1, 0, 0, 0, 391, - 394, - 1, - 0, - 0, - 0, 392, - 390, - 1, - 0, + 5, + 42, 0, 0, 392, 393, - 1, - 0, + 5, + 93, 0, 0, 393, - 396, - 1, - 0, - 0, - 0, 394, - 392, - 1, - 0, - 0, + 3, + 100, + 50, 0, - 395, - 387, + 394, + 69, 1, 0, 0, 0, 395, 396, - 1, - 0, + 5, + 44, 0, 0, 396, 397, - 1, - 0, + 5, + 93, 0, 0, 397, 398, - 5, - 109, - 0, + 3, + 102, + 51, 0, 398, - 73, + 71, 1, 0, 0, @@ -3735,23 +3710,23 @@ def serializedATN(): 399, 400, 5, - 31, + 44, 0, 0, 400, 401, 5, - 23, + 93, 0, 0, 401, 402, - 5, - 33, - 0, + 3, + 104, + 52, 0, 402, - 405, + 73, 1, 0, 0, @@ -3759,29 +3734,23 @@ def serializedATN(): 403, 404, 5, - 23, + 44, 0, 0, 404, - 406, - 5, - 34, - 0, - 0, 405, - 403, - 1, - 0, + 5, + 93, 0, 0, 405, 406, - 1, - 0, - 0, + 3, + 106, + 53, 0, 406, - 411, + 75, 1, 0, 0, @@ -3789,1420 +3758,1251 @@ def serializedATN(): 407, 408, 5, - 31, + 28, 0, 0, 408, 409, 5, - 23, + 93, 0, 0, 409, - 411, - 5, - 34, - 0, - 0, 410, - 399, - 1, - 0, - 0, + 3, + 110, + 55, 0, 410, - 407, + 77, 1, 0, 0, 0, 411, - 75, - 1, - 0, + 412, + 5, + 27, 0, 0, 412, 413, 5, - 31, + 93, 0, 0, 413, 414, - 5, - 23, - 0, + 3, + 112, + 56, 0, 414, - 415, - 5, - 35, - 0, - 0, - 415, - 418, + 79, 1, 0, 0, 0, + 415, + 416, + 3, + 82, + 41, + 0, 416, 417, 5, - 32, + 93, 0, 0, 417, - 419, + 418, 3, - 78, - 39, + 114, + 57, 0, 418, - 416, + 81, 1, 0, 0, 0, - 418, 419, - 1, - 0, - 0, - 0, - 419, - 424, - 1, - 0, + 428, + 5, + 108, 0, 0, 420, - 421, - 5, - 31, - 0, + 425, + 3, + 32, + 16, 0, 421, 422, 5, - 32, + 110, 0, 0, 422, 424, 3, - 78, - 39, + 32, + 16, 0, 423, - 412, + 421, 1, 0, 0, 0, - 423, - 420, + 424, + 427, 1, 0, 0, 0, - 424, - 77, + 425, + 423, 1, 0, 0, 0, 425, 426, - 5, - 23, + 1, + 0, 0, 0, 426, 429, - 5, - 36, + 1, 0, 0, - 427, - 428, - 5, - 23, 0, + 427, + 425, + 1, 0, - 428, - 430, - 5, - 34, 0, 0, - 429, - 427, + 428, + 420, 1, 0, 0, 0, + 428, 429, - 430, 1, 0, 0, 0, + 429, 430, - 433, 1, 0, 0, 0, + 430, 431, - 432, - 5, - 23, - 0, - 0, - 432, - 434, 5, - 37, + 109, 0, 0, - 433, 431, + 83, 1, 0, 0, 0, - 433, - 434, - 1, - 0, - 0, - 0, - 434, - 437, - 1, - 0, - 0, - 0, - 435, - 436, - 5, - 23, - 0, - 0, - 436, - 438, - 5, - 38, - 0, - 0, - 437, + 432, 435, - 1, - 0, - 0, - 0, - 437, - 438, - 1, - 0, - 0, - 0, - 438, - 458, - 1, - 0, - 0, - 0, - 439, - 440, - 5, - 23, - 0, - 0, - 440, - 443, - 5, - 34, - 0, - 0, - 441, - 442, - 5, - 23, - 0, - 0, - 442, - 444, - 5, - 37, - 0, - 0, - 443, - 441, - 1, - 0, - 0, - 0, - 443, - 444, - 1, - 0, - 0, - 0, - 444, - 447, - 1, - 0, - 0, - 0, - 445, - 446, - 5, - 23, - 0, - 0, - 446, - 448, - 5, - 38, - 0, - 0, - 447, - 445, - 1, - 0, - 0, - 0, - 447, - 448, - 1, - 0, - 0, - 0, - 448, - 458, - 1, - 0, - 0, - 0, - 449, - 450, - 5, - 23, - 0, - 0, - 450, - 453, - 5, - 37, - 0, - 0, - 451, - 452, - 5, - 23, - 0, - 0, - 452, - 454, - 5, - 38, - 0, - 0, - 453, - 451, - 1, - 0, - 0, - 0, - 453, - 454, - 1, - 0, - 0, - 0, - 454, - 458, - 1, - 0, - 0, - 0, - 455, - 456, - 5, - 23, - 0, - 0, - 456, - 458, - 5, - 38, - 0, - 0, - 457, - 425, - 1, - 0, - 0, - 0, - 457, - 439, - 1, - 0, - 0, - 0, - 457, - 449, - 1, - 0, - 0, - 0, - 457, - 455, - 1, - 0, - 0, - 0, - 458, - 79, - 1, - 0, - 0, - 0, - 459, - 462, 3, - 82, - 41, + 86, + 43, 0, - 460, - 462, + 433, + 435, 3, - 112, - 56, + 116, + 58, 0, - 461, - 459, + 434, + 432, 1, 0, 0, 0, - 461, - 460, + 434, + 433, 1, 0, 0, 0, - 462, - 81, + 435, + 85, 1, 0, 0, 0, - 463, - 482, + 436, + 454, 3, - 84, - 42, + 88, + 44, 0, - 464, - 482, + 437, + 454, 5, 52, 0, 0, - 465, - 482, + 438, + 454, 5, 53, 0, 0, - 466, - 482, + 439, + 454, 5, 54, 0, 0, - 467, - 482, + 440, + 454, 5, 55, 0, 0, - 468, - 482, + 441, + 454, 5, 56, 0, 0, - 469, - 482, + 442, + 454, 5, 57, 0, 0, - 470, - 482, - 3, - 86, - 43, - 0, - 471, - 482, - 3, - 88, - 44, - 0, - 472, - 482, + 443, + 454, 3, 90, 45, 0, - 473, - 482, + 444, + 454, 3, 92, 46, 0, - 474, - 482, + 445, + 454, + 3, + 94, + 47, + 0, + 446, + 454, + 3, + 96, + 48, + 0, + 447, + 454, 5, 62, 0, 0, - 475, - 482, + 448, + 454, 5, 63, 0, 0, - 476, - 482, - 3, - 96, - 48, - 0, - 477, - 482, + 449, + 454, 3, - 94, - 47, + 98, + 49, 0, - 478, - 482, + 450, + 454, 5, 66, 0, 0, - 479, - 480, + 451, + 452, 5, 77, 0, 0, - 480, - 482, + 452, + 454, 5, 119, 0, 0, - 481, - 463, - 1, - 0, - 0, - 0, - 481, - 464, + 453, + 436, 1, 0, 0, 0, - 481, - 465, + 453, + 437, 1, 0, 0, 0, - 481, - 466, + 453, + 438, 1, 0, 0, 0, - 481, - 467, + 453, + 439, 1, 0, 0, 0, - 481, - 468, + 453, + 440, 1, 0, 0, 0, - 481, - 469, + 453, + 441, 1, 0, 0, 0, - 481, - 470, + 453, + 442, 1, 0, 0, 0, - 481, - 471, + 453, + 443, 1, 0, 0, 0, - 481, - 472, + 453, + 444, 1, 0, 0, 0, - 481, - 473, + 453, + 445, 1, 0, 0, 0, - 481, - 474, + 453, + 446, 1, 0, 0, 0, - 481, - 475, + 453, + 447, 1, 0, 0, 0, - 481, - 476, + 453, + 448, 1, 0, 0, 0, - 481, - 477, + 453, + 449, 1, 0, 0, 0, - 481, - 478, + 453, + 450, 1, 0, 0, 0, - 481, - 479, + 453, + 451, 1, 0, 0, 0, - 482, - 83, + 454, + 87, 1, 0, 0, 0, - 483, - 484, + 455, + 456, 7, 4, 0, 0, - 484, - 85, + 456, + 89, 1, 0, 0, 0, - 485, - 486, + 457, + 458, 7, 5, 0, 0, - 486, - 87, + 458, + 91, 1, 0, 0, 0, - 487, - 488, + 459, + 460, 7, 6, 0, 0, - 488, - 89, + 460, + 93, 1, 0, 0, 0, - 489, - 490, + 461, + 462, 7, 7, 0, 0, - 490, - 91, + 462, + 95, 1, 0, 0, 0, - 491, - 492, + 463, + 464, 7, 8, 0, 0, - 492, - 93, + 464, + 97, 1, 0, 0, 0, - 493, - 494, + 465, + 466, 7, 9, 0, 0, - 494, - 95, + 466, + 99, 1, 0, 0, 0, - 495, - 496, + 467, + 469, 7, 10, 0, 0, - 496, - 97, + 468, + 470, + 5, + 112, + 0, + 0, + 469, + 468, 1, 0, 0, 0, - 497, - 499, + 469, + 470, + 1, + 0, + 0, + 0, + 470, + 475, + 1, + 0, + 0, + 0, + 471, + 472, + 5, + 39, + 0, + 0, + 472, + 473, + 3, + 118, + 59, + 0, + 473, + 474, + 5, + 40, + 0, + 0, + 474, + 476, + 1, + 0, + 0, + 0, + 475, + 471, + 1, + 0, + 0, + 0, + 475, + 476, + 1, + 0, + 0, + 0, + 476, + 101, + 1, + 0, + 0, + 0, + 477, + 479, 7, 11, 0, 0, - 498, - 500, + 478, + 480, 5, 112, 0, 0, - 499, - 498, + 479, + 478, 1, 0, 0, 0, - 499, - 500, + 479, + 480, 1, 0, 0, 0, - 500, - 501, + 480, + 481, 1, 0, 0, 0, - 501, - 502, + 481, + 482, 5, 39, 0, 0, - 502, - 503, + 482, + 483, 3, - 114, - 57, + 118, + 59, 0, - 503, - 504, + 483, + 484, 5, 40, 0, 0, - 504, - 99, + 484, + 103, 1, 0, 0, 0, - 505, - 507, + 485, + 487, 7, 12, 0, 0, - 506, - 508, + 486, + 488, 5, 112, 0, 0, - 507, - 506, + 487, + 486, 1, 0, 0, 0, - 507, - 508, + 487, + 488, 1, 0, 0, 0, - 508, - 509, + 488, + 489, 1, 0, 0, 0, - 509, - 510, + 489, + 490, 5, 39, 0, 0, - 510, - 511, + 490, + 491, 3, - 114, - 57, + 118, + 59, 0, - 511, - 512, + 491, + 492, 5, 40, 0, 0, - 512, - 101, + 492, + 105, 1, 0, 0, 0, - 513, - 515, + 493, + 495, 7, 13, 0, 0, - 514, - 516, + 494, + 496, 5, 112, 0, 0, - 515, - 514, + 495, + 494, 1, 0, 0, 0, - 515, - 516, + 495, + 496, 1, 0, 0, 0, - 516, - 517, + 496, + 497, 1, 0, 0, 0, - 517, - 518, + 497, + 498, 5, 39, 0, 0, - 518, - 519, + 498, + 499, 3, - 114, - 57, + 118, + 59, 0, - 519, - 520, + 499, + 500, 5, 40, 0, 0, - 520, - 103, + 500, + 107, 1, 0, 0, 0, - 521, - 523, + 501, + 503, 7, 14, 0, 0, - 522, - 524, + 502, + 504, 5, 112, 0, 0, - 523, - 522, + 503, + 502, 1, 0, 0, 0, - 523, - 524, + 503, + 504, 1, 0, 0, 0, - 524, - 531, + 504, + 511, 1, 0, 0, 0, - 525, - 526, + 505, + 506, 5, 39, 0, 0, - 526, - 527, + 506, + 507, 3, - 114, - 57, + 118, + 59, 0, - 527, - 528, + 507, + 508, 5, 110, 0, 0, - 528, - 529, + 508, + 509, 3, - 114, - 57, + 118, + 59, 0, - 529, - 530, + 509, + 510, 5, 40, 0, 0, - 530, - 532, + 510, + 512, 1, 0, 0, 0, - 531, - 525, + 511, + 505, 1, 0, 0, 0, - 531, - 532, + 511, + 512, 1, 0, 0, 0, - 532, - 105, + 512, + 109, 1, 0, 0, 0, - 533, - 535, + 513, + 515, 7, 15, 0, 0, - 534, - 536, + 514, + 516, 5, 112, 0, 0, - 535, - 534, + 515, + 514, 1, 0, 0, 0, - 535, - 536, + 515, + 516, 1, 0, 0, 0, - 536, - 537, + 516, + 517, 1, 0, 0, 0, - 537, - 538, + 517, + 518, 5, 39, 0, 0, - 538, - 539, + 518, + 519, 3, - 114, - 57, + 118, + 59, 0, - 539, - 540, + 519, + 520, 5, 40, 0, 0, - 540, - 107, + 520, + 111, 1, 0, 0, 0, - 541, - 543, + 521, + 523, 7, 16, 0, 0, - 542, - 544, + 522, + 524, 5, 112, 0, 0, - 543, - 542, + 523, + 522, 1, 0, 0, 0, - 543, - 544, + 523, + 524, 1, 0, 0, 0, - 544, - 545, + 524, + 525, 1, 0, 0, 0, - 545, - 546, + 525, + 526, 5, 39, 0, 0, - 546, - 547, + 526, + 527, 3, - 114, - 57, + 118, + 59, 0, - 547, - 548, + 527, + 528, 5, 40, 0, 0, - 548, - 109, + 528, + 113, 1, 0, 0, 0, - 549, - 551, + 529, + 531, 5, 75, 0, 0, - 550, - 552, + 530, + 532, 5, 112, 0, 0, - 551, - 550, + 531, + 530, 1, 0, 0, 0, - 551, - 552, + 531, + 532, 1, 0, 0, 0, - 552, - 553, + 532, + 533, 1, 0, 0, 0, - 553, - 554, + 533, + 534, 5, 39, 0, 0, - 554, - 555, + 534, + 535, 3, - 80, - 40, + 84, + 42, 0, - 555, - 556, + 535, + 536, 5, 40, 0, 0, - 556, - 111, + 536, + 115, 1, 0, 0, 0, - 557, - 564, - 3, - 98, - 49, - 0, - 558, - 564, - 3, - 100, - 50, - 0, - 559, - 564, + 537, + 545, 3, 102, 51, 0, - 560, - 564, + 538, + 545, 3, 104, 52, 0, - 561, - 564, + 539, + 545, 3, 106, 53, 0, - 562, - 564, + 540, + 545, + 3, + 108, + 54, + 0, + 541, + 545, + 3, + 100, + 50, + 0, + 542, + 545, + 3, + 110, + 55, + 0, + 543, + 545, 3, - 108, - 54, + 112, + 56, 0, - 563, - 557, + 544, + 537, 1, 0, 0, 0, - 563, - 558, + 544, + 538, 1, 0, 0, 0, - 563, - 559, + 544, + 539, 1, 0, 0, 0, - 563, - 560, + 544, + 540, 1, 0, 0, 0, - 563, - 561, + 544, + 541, 1, 0, 0, 0, - 563, - 562, + 544, + 542, 1, 0, 0, 0, - 564, - 113, + 544, + 543, 1, 0, 0, 0, - 565, - 566, + 545, + 117, + 1, + 0, + 0, + 0, + 546, + 547, 5, 23, 0, 0, - 566, - 115, + 547, + 119, 1, 0, 0, 0, - 567, - 568, + 548, + 549, 7, 17, 0, 0, - 568, - 117, + 549, + 121, 1, 0, 0, 0, - 569, - 570, + 550, + 551, 3, - 120, - 60, + 124, + 62, 0, - 570, - 571, + 551, + 552, 5, 111, 0, 0, - 571, - 572, + 552, + 553, 3, - 122, - 61, + 126, + 63, 0, - 572, - 119, + 553, + 123, 1, 0, 0, 0, - 573, - 574, + 554, + 555, 7, 18, 0, 0, - 574, - 121, + 555, + 125, 1, 0, 0, 0, - 575, - 576, + 556, + 557, 7, 19, 0, 0, - 576, - 123, + 557, + 127, 1, 0, 0, 0, - 577, - 582, + 558, + 563, 3, - 118, - 59, + 122, + 61, 0, - 578, - 579, + 559, + 560, 5, 110, 0, 0, - 579, - 581, + 560, + 562, 3, - 118, - 59, + 122, + 61, 0, - 580, - 578, + 561, + 559, 1, 0, 0, 0, - 581, - 584, + 562, + 565, 1, 0, 0, 0, - 582, - 580, + 563, + 561, 1, 0, 0, 0, - 582, - 583, + 563, + 564, 1, 0, 0, 0, - 583, - 125, + 564, + 129, 1, 0, 0, 0, - 584, - 582, + 565, + 563, 1, 0, 0, 0, - 585, - 586, + 566, + 567, 7, 20, 0, 0, - 586, - 127, + 567, + 131, 1, 0, 0, 0, - 587, - 590, + 568, + 571, 3, - 126, - 63, + 130, + 65, 0, - 588, - 590, + 569, + 571, 5, 119, 0, 0, - 589, - 587, + 570, + 568, 1, 0, 0, 0, - 589, - 588, + 570, + 569, 1, 0, 0, 0, - 590, - 129, + 571, + 133, 1, 0, 0, 0, - 48, - 134, - 154, - 167, - 176, - 182, - 184, - 191, - 196, - 211, - 218, - 240, - 250, + 41, + 138, + 158, + 171, + 180, + 186, + 188, + 195, + 200, + 220, + 227, + 236, + 244, + 253, 263, - 266, - 280, - 283, - 297, - 304, - 312, - 319, + 276, + 279, + 293, + 296, + 310, + 317, 325, - 330, - 392, - 395, - 405, - 410, - 418, - 423, - 429, - 433, - 437, - 443, - 447, + 332, + 338, + 343, + 425, + 428, + 434, 453, - 457, - 461, - 481, - 499, - 507, + 469, + 475, + 479, + 487, + 495, + 503, + 511, 515, 523, 531, - 535, - 543, - 551, + 544, 563, - 582, - 589, + 570, ] @@ -5495,36 +5295,38 @@ class FuncTestCaseParser(Parser): RULE_timestampTzArg = 32 RULE_intervalYearArg = 33 RULE_intervalDayArg = 34 - RULE_listArg = 35 - RULE_literalList = 36 - RULE_intervalYearLiteral = 37 - RULE_intervalDayLiteral = 38 - RULE_timeInterval = 39 - RULE_dataType = 40 - RULE_scalarType = 41 - RULE_booleanType = 42 - RULE_stringType = 43 - RULE_binaryType = 44 - RULE_timestampType = 45 - RULE_timestampTZType = 46 - RULE_intervalYearType = 47 - RULE_intervalDayType = 48 - RULE_fixedCharType = 49 - RULE_varCharType = 50 - RULE_fixedBinaryType = 51 - RULE_decimalType = 52 - RULE_precisionTimestampType = 53 - RULE_precisionTimestampTZType = 54 - RULE_listType = 55 - RULE_parameterizedType = 56 - RULE_numericParameter = 57 - RULE_substraitError = 58 - RULE_func_option = 59 - RULE_option_name = 60 - RULE_option_value = 61 - RULE_func_options = 62 - RULE_nonReserved = 63 - RULE_identifier = 64 + RULE_fixedCharArg = 35 + RULE_varCharArg = 36 + RULE_fixedBinaryArg = 37 + RULE_precisionTimestampArg = 38 + RULE_precisionTimestampTZArg = 39 + RULE_listArg = 40 + RULE_literalList = 41 + RULE_dataType = 42 + RULE_scalarType = 43 + RULE_booleanType = 44 + RULE_stringType = 45 + RULE_binaryType = 46 + RULE_timestampType = 47 + RULE_timestampTZType = 48 + RULE_intervalYearType = 49 + RULE_intervalDayType = 50 + RULE_fixedCharType = 51 + RULE_varCharType = 52 + RULE_fixedBinaryType = 53 + RULE_decimalType = 54 + RULE_precisionTimestampType = 55 + RULE_precisionTimestampTZType = 56 + RULE_listType = 57 + RULE_parameterizedType = 58 + RULE_numericParameter = 59 + RULE_substraitError = 60 + RULE_funcOption = 61 + RULE_optionName = 62 + RULE_optionValue = 63 + RULE_funcOptions = 64 + RULE_nonReserved = 65 + RULE_identifier = 66 ruleNames = [ "doc", @@ -5562,11 +5364,13 @@ class FuncTestCaseParser(Parser): "timestampTzArg", "intervalYearArg", "intervalDayArg", + "fixedCharArg", + "varCharArg", + "fixedBinaryArg", + "precisionTimestampArg", + "precisionTimestampTZArg", "listArg", "literalList", - "intervalYearLiteral", - "intervalDayLiteral", - "timeInterval", "dataType", "scalarType", "booleanType", @@ -5586,10 +5390,10 @@ class FuncTestCaseParser(Parser): "parameterizedType", "numericParameter", "substraitError", - "func_option", - "option_name", - "option_value", - "func_options", + "funcOption", + "optionName", + "optionValue", + "funcOptions", "nonReserved", "identifier", ] @@ -5768,21 +5572,21 @@ def doc(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 130 + self.state = 134 self.header() - self.state = 132 + self.state = 136 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 131 + self.state = 135 self.testGroup() - self.state = 134 + self.state = 138 self._errHandler.sync(self) _la = self._input.LA(1) if not (_la == 7): break - self.state = 136 + self.state = 140 self.match(FuncTestCaseParser.EOF) except RecognitionException as re: localctx.exception = re @@ -5829,9 +5633,9 @@ def header(self): self.enterRule(localctx, 2, self.RULE_header) try: self.enterOuterAlt(localctx, 1) - self.state = 138 + self.state = 142 self.version() - self.state = 139 + self.state = 143 self.include() except RecognitionException as re: localctx.exception = re @@ -5888,18 +5692,18 @@ def version(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 141 + self.state = 145 self.match(FuncTestCaseParser.TripleHash) - self.state = 142 + self.state = 146 _la = self._input.LA(1) if not (_la == 3 or _la == 4): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 143 + self.state = 147 self.match(FuncTestCaseParser.Colon) - self.state = 144 + self.state = 148 self.match(FuncTestCaseParser.FormatVersion) except RecognitionException as re: localctx.exception = re @@ -5962,23 +5766,23 @@ def include(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 146 + self.state = 150 self.match(FuncTestCaseParser.TripleHash) - self.state = 147 + self.state = 151 self.match(FuncTestCaseParser.SubstraitInclude) - self.state = 148 + self.state = 152 self.match(FuncTestCaseParser.Colon) - self.state = 149 + self.state = 153 self.match(FuncTestCaseParser.StringLiteral) - self.state = 154 + self.state = 158 self._errHandler.sync(self) _la = self._input.LA(1) while _la == 110: - self.state = 150 + self.state = 154 self.match(FuncTestCaseParser.Comma) - self.state = 151 + self.state = 155 self.match(FuncTestCaseParser.StringLiteral) - self.state = 156 + self.state = 160 self._errHandler.sync(self) _la = self._input.LA(1) @@ -6026,7 +5830,7 @@ def testGroupDescription(self): self.enterRule(localctx, 8, self.RULE_testGroupDescription) try: self.enterOuterAlt(localctx, 1) - self.state = 157 + self.state = 161 self.match(FuncTestCaseParser.DescriptionLine) except RecognitionException as re: localctx.exception = re @@ -6067,8 +5871,8 @@ def identifier(self): def OBracket(self): return self.getToken(FuncTestCaseParser.OBracket, 0) - def func_options(self): - return self.getTypedRuleContext(FuncTestCaseParser.Func_optionsContext, 0) + def funcOptions(self): + return self.getTypedRuleContext(FuncTestCaseParser.FuncOptionsContext, 0) def CBracket(self): return self.getToken(FuncTestCaseParser.CBracket, 0) @@ -6096,28 +5900,28 @@ def testCase(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 159 + self.state = 163 localctx.functionName = self.identifier() - self.state = 160 + self.state = 164 self.match(FuncTestCaseParser.OParen) - self.state = 161 + self.state = 165 self.arguments() - self.state = 162 + self.state = 166 self.match(FuncTestCaseParser.CParen) - self.state = 167 + self.state = 171 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 108: - self.state = 163 + self.state = 167 self.match(FuncTestCaseParser.OBracket) - self.state = 164 - self.func_options() - self.state = 165 + self.state = 168 + self.funcOptions() + self.state = 169 self.match(FuncTestCaseParser.CBracket) - self.state = 169 + self.state = 173 self.match(FuncTestCaseParser.Eq) - self.state = 170 + self.state = 174 self.result() except RecognitionException as re: localctx.exception = re @@ -6215,21 +6019,21 @@ def testGroup(self): self.enterRule(localctx, 12, self.RULE_testGroup) self._la = 0 # Token type try: - self.state = 184 + self.state = 188 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input, 5, self._ctx) if la_ == 1: localctx = FuncTestCaseParser.ScalarFuncTestGroupContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 172 + self.state = 176 self.testGroupDescription() - self.state = 174 + self.state = 178 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 173 + self.state = 177 self.testCase() - self.state = 176 + self.state = 180 self._errHandler.sync(self) _la = self._input.LA(1) if not ( @@ -6248,15 +6052,15 @@ def testGroup(self): self, localctx ) self.enterOuterAlt(localctx, 2) - self.state = 178 + self.state = 182 self.testGroupDescription() - self.state = 180 + self.state = 184 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 179 + self.state = 183 self.aggFuncTestCase() - self.state = 182 + self.state = 186 self._errHandler.sync(self) _la = self._input.LA(1) if not ( @@ -6323,17 +6127,17 @@ def arguments(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 186 + self.state = 190 self.argument() - self.state = 191 + self.state = 195 self._errHandler.sync(self) _la = self._input.LA(1) while _la == 110: - self.state = 187 + self.state = 191 self.match(FuncTestCaseParser.Comma) - self.state = 188 + self.state = 192 self.argument() - self.state = 193 + self.state = 197 self._errHandler.sync(self) _la = self._input.LA(1) @@ -6381,17 +6185,17 @@ def result(self): localctx = FuncTestCaseParser.ResultContext(self, self._ctx, self.state) self.enterRule(localctx, 16, self.RULE_result) try: - self.state = 196 + self.state = 200 self._errHandler.sync(self) token = self._input.LA(1) if token in [17, 23, 24, 25, 26, 27, 28, 29, 30, 41, 42, 43, 44, 108]: self.enterOuterAlt(localctx, 1) - self.state = 194 + self.state = 198 self.argument() pass elif token in [9, 10]: self.enterOuterAlt(localctx, 2) - self.state = 195 + self.state = 199 self.substraitError() pass else: @@ -6452,6 +6256,25 @@ def intervalYearArg(self): def intervalDayArg(self): return self.getTypedRuleContext(FuncTestCaseParser.IntervalDayArgContext, 0) + def fixedCharArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.FixedCharArgContext, 0) + + def varCharArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.VarCharArgContext, 0) + + def fixedBinaryArg(self): + return self.getTypedRuleContext(FuncTestCaseParser.FixedBinaryArgContext, 0) + + def precisionTimestampArg(self): + return self.getTypedRuleContext( + FuncTestCaseParser.PrecisionTimestampArgContext, 0 + ) + + def precisionTimestampTZArg(self): + return self.getTypedRuleContext( + FuncTestCaseParser.PrecisionTimestampTZArgContext, 0 + ) + def listArg(self): return self.getTypedRuleContext(FuncTestCaseParser.ListArgContext, 0) @@ -6476,84 +6299,114 @@ def argument(self): localctx = FuncTestCaseParser.ArgumentContext(self, self._ctx, self.state) self.enterRule(localctx, 18, self.RULE_argument) try: - self.state = 211 + self.state = 220 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input, 8, self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 198 + self.state = 202 self.nullArg() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 199 + self.state = 203 self.intArg() pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 200 + self.state = 204 self.floatArg() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 201 + self.state = 205 self.booleanArg() pass elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 202 + self.state = 206 self.stringArg() pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 203 + self.state = 207 self.decimalArg() pass elif la_ == 7: self.enterOuterAlt(localctx, 7) - self.state = 204 + self.state = 208 self.dateArg() pass elif la_ == 8: self.enterOuterAlt(localctx, 8) - self.state = 205 + self.state = 209 self.timeArg() pass elif la_ == 9: self.enterOuterAlt(localctx, 9) - self.state = 206 + self.state = 210 self.timestampArg() pass elif la_ == 10: self.enterOuterAlt(localctx, 10) - self.state = 207 + self.state = 211 self.timestampTzArg() pass elif la_ == 11: self.enterOuterAlt(localctx, 11) - self.state = 208 + self.state = 212 self.intervalYearArg() pass elif la_ == 12: self.enterOuterAlt(localctx, 12) - self.state = 209 + self.state = 213 self.intervalDayArg() pass elif la_ == 13: self.enterOuterAlt(localctx, 13) - self.state = 210 + self.state = 214 + self.fixedCharArg() + pass + + elif la_ == 14: + self.enterOuterAlt(localctx, 14) + self.state = 215 + self.varCharArg() + pass + + elif la_ == 15: + self.enterOuterAlt(localctx, 15) + self.state = 216 + self.fixedBinaryArg() + pass + + elif la_ == 16: + self.enterOuterAlt(localctx, 16) + self.state = 217 + self.precisionTimestampArg() + pass + + elif la_ == 17: + self.enterOuterAlt(localctx, 17) + self.state = 218 + self.precisionTimestampTZArg() + pass + + elif la_ == 18: + self.enterOuterAlt(localctx, 18) + self.state = 219 self.listArg() pass @@ -6586,8 +6439,8 @@ def result(self): def OBracket(self): return self.getToken(FuncTestCaseParser.OBracket, 0) - def func_options(self): - return self.getTypedRuleContext(FuncTestCaseParser.Func_optionsContext, 0) + def funcOptions(self): + return self.getTypedRuleContext(FuncTestCaseParser.FuncOptionsContext, 0) def CBracket(self): return self.getToken(FuncTestCaseParser.CBracket, 0) @@ -6617,22 +6470,22 @@ def aggFuncTestCase(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 213 + self.state = 222 self.aggFuncCall() - self.state = 218 + self.state = 227 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 108: - self.state = 214 + self.state = 223 self.match(FuncTestCaseParser.OBracket) - self.state = 215 - self.func_options() - self.state = 216 + self.state = 224 + self.funcOptions() + self.state = 225 self.match(FuncTestCaseParser.CBracket) - self.state = 220 + self.state = 229 self.match(FuncTestCaseParser.Eq) - self.state = 221 + self.state = 230 self.result() except RecognitionException as re: localctx.exception = re @@ -6705,17 +6558,17 @@ def tableData(self): def OParen(self): return self.getToken(FuncTestCaseParser.OParen, 0) - def qualifiedAggregateFuncArgs(self): - return self.getTypedRuleContext( - FuncTestCaseParser.QualifiedAggregateFuncArgsContext, 0 - ) - def CParen(self): return self.getToken(FuncTestCaseParser.CParen, 0) def identifier(self): return self.getTypedRuleContext(FuncTestCaseParser.IdentifierContext, 0) + def qualifiedAggregateFuncArgs(self): + return self.getTypedRuleContext( + FuncTestCaseParser.QualifiedAggregateFuncArgsContext, 0 + ) + def enterRule(self, listener: ParseTreeListener): if hasattr(listener, "enterMultiArgAggregateFuncCall"): listener.enterMultiArgAggregateFuncCall(self) @@ -6744,17 +6597,17 @@ def tableRows(self): def OParen(self): return self.getToken(FuncTestCaseParser.OParen, 0) - def aggregateFuncArgs(self): - return self.getTypedRuleContext( - FuncTestCaseParser.AggregateFuncArgsContext, 0 - ) - def CParen(self): return self.getToken(FuncTestCaseParser.CParen, 0) def identifier(self): return self.getTypedRuleContext(FuncTestCaseParser.IdentifierContext, 0) + def aggregateFuncArgs(self): + return self.getTypedRuleContext( + FuncTestCaseParser.AggregateFuncArgsContext, 0 + ) + def enterRule(self, listener: ParseTreeListener): if hasattr(listener, "enterCompactAggregateFuncCall"): listener.enterCompactAggregateFuncCall(self) @@ -6772,8 +6625,9 @@ def accept(self, visitor: ParseTreeVisitor): def aggFuncCall(self): localctx = FuncTestCaseParser.AggFuncCallContext(self, self._ctx, self.state) self.enterRule(localctx, 22, self.RULE_aggFuncCall) + self._la = 0 # Token type try: - self.state = 240 + self.state = 253 self._errHandler.sync(self) token = self._input.LA(1) if token in [8]: @@ -6781,15 +6635,24 @@ def aggFuncCall(self): self, localctx ) self.enterOuterAlt(localctx, 1) - self.state = 223 + self.state = 232 self.tableData() - self.state = 224 + self.state = 233 localctx.funcName = self.identifier() - self.state = 225 + self.state = 234 self.match(FuncTestCaseParser.OParen) - self.state = 226 - self.qualifiedAggregateFuncArgs() - self.state = 227 + self.state = 236 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ( + (((_la) & ~0x3F) == 0 and ((1 << _la) & 32987488059392) != 0) + or _la == 108 + or _la == 119 + ): + self.state = 235 + self.qualifiedAggregateFuncArgs() + + self.state = 238 self.match(FuncTestCaseParser.CParen) pass elif token in [106]: @@ -6797,15 +6660,22 @@ def aggFuncCall(self): self, localctx ) self.enterOuterAlt(localctx, 2) - self.state = 229 + self.state = 240 self.tableRows() - self.state = 230 + self.state = 241 localctx.functName = self.identifier() - self.state = 231 + self.state = 242 self.match(FuncTestCaseParser.OParen) - self.state = 232 - self.aggregateFuncArgs() - self.state = 233 + self.state = 244 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ( + ((_la) & ~0x3F) == 0 and ((1 << _la) & 68171860148224) != 0 + ) or _la == 108: + self.state = 243 + self.aggregateFuncArgs() + + self.state = 246 self.match(FuncTestCaseParser.CParen) pass elif token in [22, 115, 116, 119]: @@ -6813,13 +6683,13 @@ def aggFuncCall(self): self, localctx ) self.enterOuterAlt(localctx, 3) - self.state = 235 + self.state = 248 localctx.functName = self.identifier() - self.state = 236 + self.state = 249 self.match(FuncTestCaseParser.OParen) - self.state = 237 + self.state = 250 self.dataColumn() - self.state = 238 + self.state = 251 self.match(FuncTestCaseParser.CParen) pass else: @@ -6896,31 +6766,31 @@ def tableData(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 242 + self.state = 255 self.match(FuncTestCaseParser.Define) - self.state = 243 + self.state = 256 localctx.tableName = self.match(FuncTestCaseParser.Identifier) - self.state = 244 + self.state = 257 self.match(FuncTestCaseParser.OParen) - self.state = 245 + self.state = 258 self.dataType() - self.state = 250 + self.state = 263 self._errHandler.sync(self) _la = self._input.LA(1) while _la == 110: - self.state = 246 + self.state = 259 self.match(FuncTestCaseParser.Comma) - self.state = 247 + self.state = 260 self.dataType() - self.state = 252 + self.state = 265 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 253 + self.state = 266 self.match(FuncTestCaseParser.CParen) - self.state = 254 + self.state = 267 self.match(FuncTestCaseParser.Eq) - self.state = 255 + self.state = 268 self.tableRows() except RecognitionException as re: localctx.exception = re @@ -6982,27 +6852,27 @@ def tableRows(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 257 + self.state = 270 self.match(FuncTestCaseParser.OParen) - self.state = 266 + self.state = 279 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 106: - self.state = 258 + self.state = 271 self.columnValues() - self.state = 263 + self.state = 276 self._errHandler.sync(self) _la = self._input.LA(1) while _la == 110: - self.state = 259 + self.state = 272 self.match(FuncTestCaseParser.Comma) - self.state = 260 + self.state = 273 self.columnValues() - self.state = 265 + self.state = 278 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 268 + self.state = 281 self.match(FuncTestCaseParser.CParen) except RecognitionException as re: localctx.exception = re @@ -7052,11 +6922,11 @@ def dataColumn(self): self.enterRule(localctx, 28, self.RULE_dataColumn) try: self.enterOuterAlt(localctx, 1) - self.state = 270 + self.state = 283 self.columnValues() - self.state = 271 + self.state = 284 self.match(FuncTestCaseParser.DoubleColon) - self.state = 272 + self.state = 285 self.dataType() except RecognitionException as re: localctx.exception = re @@ -7116,27 +6986,27 @@ def columnValues(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 274 + self.state = 287 self.match(FuncTestCaseParser.OParen) - self.state = 283 + self.state = 296 self._errHandler.sync(self) _la = self._input.LA(1) if ((_la) & ~0x3F) == 0 and ((1 << _la) & 32987488059392) != 0: - self.state = 275 + self.state = 288 self.literal() - self.state = 280 + self.state = 293 self._errHandler.sync(self) _la = self._input.LA(1) while _la == 110: - self.state = 276 + self.state = 289 self.match(FuncTestCaseParser.Comma) - self.state = 277 + self.state = 290 self.literal() - self.state = 282 + self.state = 295 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 285 + self.state = 298 self.match(FuncTestCaseParser.CParen) except RecognitionException as re: localctx.exception = re @@ -7206,57 +7076,57 @@ def literal(self): localctx = FuncTestCaseParser.LiteralContext(self, self._ctx, self.state) self.enterRule(localctx, 32, self.RULE_literal) try: - self.state = 297 + self.state = 310 self._errHandler.sync(self) token = self._input.LA(1) if token in [43]: self.enterOuterAlt(localctx, 1) - self.state = 287 + self.state = 300 self.match(FuncTestCaseParser.NullLiteral) pass elif token in [17, 23, 24, 25]: self.enterOuterAlt(localctx, 2) - self.state = 288 + self.state = 301 self.numericLiteral() pass elif token in [26]: self.enterOuterAlt(localctx, 3) - self.state = 289 + self.state = 302 self.match(FuncTestCaseParser.BooleanLiteral) pass elif token in [44]: self.enterOuterAlt(localctx, 4) - self.state = 290 + self.state = 303 self.match(FuncTestCaseParser.StringLiteral) pass elif token in [30]: self.enterOuterAlt(localctx, 5) - self.state = 291 + self.state = 304 self.match(FuncTestCaseParser.DateLiteral) pass elif token in [29]: self.enterOuterAlt(localctx, 6) - self.state = 292 + self.state = 305 self.match(FuncTestCaseParser.TimeLiteral) pass elif token in [28]: self.enterOuterAlt(localctx, 7) - self.state = 293 + self.state = 306 self.match(FuncTestCaseParser.TimestampLiteral) pass elif token in [27]: self.enterOuterAlt(localctx, 8) - self.state = 294 + self.state = 307 self.match(FuncTestCaseParser.TimestampTzLiteral) pass elif token in [41]: self.enterOuterAlt(localctx, 9) - self.state = 295 + self.state = 308 self.match(FuncTestCaseParser.IntervalYearLiteral) pass elif token in [42]: self.enterOuterAlt(localctx, 10) - self.state = 296 + self.state = 309 self.match(FuncTestCaseParser.IntervalDayLiteral) pass else: @@ -7320,17 +7190,17 @@ def qualifiedAggregateFuncArgs(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 299 + self.state = 312 self.qualifiedAggregateFuncArg() - self.state = 304 + self.state = 317 self._errHandler.sync(self) _la = self._input.LA(1) while _la == 110: - self.state = 300 + self.state = 313 self.match(FuncTestCaseParser.Comma) - self.state = 301 + self.state = 314 self.qualifiedAggregateFuncArg() - self.state = 306 + self.state = 319 self._errHandler.sync(self) _la = self._input.LA(1) @@ -7392,17 +7262,17 @@ def aggregateFuncArgs(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 307 + self.state = 320 self.aggregateFuncArg() - self.state = 312 + self.state = 325 self._errHandler.sync(self) _la = self._input.LA(1) while _la == 110: - self.state = 308 + self.state = 321 self.match(FuncTestCaseParser.Comma) - self.state = 309 + self.state = 322 self.aggregateFuncArg() - self.state = 314 + self.state = 327 self._errHandler.sync(self) _la = self._input.LA(1) @@ -7459,21 +7329,21 @@ def qualifiedAggregateFuncArg(self): ) self.enterRule(localctx, 38, self.RULE_qualifiedAggregateFuncArg) try: - self.state = 319 + self.state = 332 self._errHandler.sync(self) token = self._input.LA(1) if token in [119]: self.enterOuterAlt(localctx, 1) - self.state = 315 + self.state = 328 localctx.tableName = self.match(FuncTestCaseParser.Identifier) - self.state = 316 + self.state = 329 self.match(FuncTestCaseParser.Dot) - self.state = 317 + self.state = 330 self.match(FuncTestCaseParser.ColumnName) pass elif token in [17, 23, 24, 25, 26, 27, 28, 29, 30, 41, 42, 43, 44, 108]: self.enterOuterAlt(localctx, 2) - self.state = 318 + self.state = 331 self.argument() pass else: @@ -7531,21 +7401,21 @@ def aggregateFuncArg(self): ) self.enterRule(localctx, 40, self.RULE_aggregateFuncArg) try: - self.state = 325 + self.state = 338 self._errHandler.sync(self) token = self._input.LA(1) if token in [45]: self.enterOuterAlt(localctx, 1) - self.state = 321 + self.state = 334 self.match(FuncTestCaseParser.ColumnName) - self.state = 322 + self.state = 335 self.match(FuncTestCaseParser.DoubleColon) - self.state = 323 + self.state = 336 self.dataType() pass elif token in [17, 23, 24, 25, 26, 27, 28, 29, 30, 41, 42, 43, 44, 108]: self.enterOuterAlt(localctx, 2) - self.state = 324 + self.state = 337 self.argument() pass else: @@ -7598,22 +7468,22 @@ def numericLiteral(self): localctx = FuncTestCaseParser.NumericLiteralContext(self, self._ctx, self.state) self.enterRule(localctx, 42, self.RULE_numericLiteral) try: - self.state = 330 + self.state = 343 self._errHandler.sync(self) token = self._input.LA(1) if token in [24]: self.enterOuterAlt(localctx, 1) - self.state = 327 + self.state = 340 self.match(FuncTestCaseParser.DecimalLiteral) pass elif token in [23]: self.enterOuterAlt(localctx, 2) - self.state = 328 + self.state = 341 self.match(FuncTestCaseParser.IntegerLiteral) pass elif token in [17, 25]: self.enterOuterAlt(localctx, 3) - self.state = 329 + self.state = 342 self.floatLiteral() pass else: @@ -7665,7 +7535,7 @@ def floatLiteral(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 332 + self.state = 345 _la = self._input.LA(1) if not (_la == 17 or _la == 25): self._errHandler.recoverInline(self) @@ -7720,11 +7590,11 @@ def nullArg(self): self.enterRule(localctx, 46, self.RULE_nullArg) try: self.enterOuterAlt(localctx, 1) - self.state = 334 + self.state = 347 self.match(FuncTestCaseParser.NullLiteral) - self.state = 335 + self.state = 348 self.match(FuncTestCaseParser.DoubleColon) - self.state = 336 + self.state = 349 self.dataType() except RecognitionException as re: localctx.exception = re @@ -7784,11 +7654,11 @@ def intArg(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 338 + self.state = 351 self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 339 + self.state = 352 self.match(FuncTestCaseParser.DoubleColon) - self.state = 340 + self.state = 353 _la = self._input.LA(1) if not ((((_la) & ~0x3F) == 0 and ((1 << _la) & 67553994410557440) != 0)): self._errHandler.recoverInline(self) @@ -7847,11 +7717,11 @@ def floatArg(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 342 + self.state = 355 self.numericLiteral() - self.state = 343 + self.state = 356 self.match(FuncTestCaseParser.DoubleColon) - self.state = 344 + self.state = 357 _la = self._input.LA(1) if not (_la == 56 or _la == 57): self._errHandler.recoverInline(self) @@ -7906,11 +7776,11 @@ def decimalArg(self): self.enterRule(localctx, 52, self.RULE_decimalArg) try: self.enterOuterAlt(localctx, 1) - self.state = 346 + self.state = 359 self.numericLiteral() - self.state = 347 + self.state = 360 self.match(FuncTestCaseParser.DoubleColon) - self.state = 348 + self.state = 361 self.decimalType() except RecognitionException as re: localctx.exception = re @@ -7960,11 +7830,11 @@ def booleanArg(self): self.enterRule(localctx, 54, self.RULE_booleanArg) try: self.enterOuterAlt(localctx, 1) - self.state = 350 + self.state = 363 self.match(FuncTestCaseParser.BooleanLiteral) - self.state = 351 + self.state = 364 self.match(FuncTestCaseParser.DoubleColon) - self.state = 352 + self.state = 365 self.booleanType() except RecognitionException as re: localctx.exception = re @@ -8014,11 +7884,11 @@ def stringArg(self): self.enterRule(localctx, 56, self.RULE_stringArg) try: self.enterOuterAlt(localctx, 1) - self.state = 354 + self.state = 367 self.match(FuncTestCaseParser.StringLiteral) - self.state = 355 + self.state = 368 self.match(FuncTestCaseParser.DoubleColon) - self.state = 356 + self.state = 369 self.stringType() except RecognitionException as re: localctx.exception = re @@ -8068,11 +7938,11 @@ def dateArg(self): self.enterRule(localctx, 58, self.RULE_dateArg) try: self.enterOuterAlt(localctx, 1) - self.state = 358 + self.state = 371 self.match(FuncTestCaseParser.DateLiteral) - self.state = 359 + self.state = 372 self.match(FuncTestCaseParser.DoubleColon) - self.state = 360 + self.state = 373 self.match(FuncTestCaseParser.Date) except RecognitionException as re: localctx.exception = re @@ -8122,11 +7992,11 @@ def timeArg(self): self.enterRule(localctx, 60, self.RULE_timeArg) try: self.enterOuterAlt(localctx, 1) - self.state = 362 + self.state = 375 self.match(FuncTestCaseParser.TimeLiteral) - self.state = 363 + self.state = 376 self.match(FuncTestCaseParser.DoubleColon) - self.state = 364 + self.state = 377 self.match(FuncTestCaseParser.Time) except RecognitionException as re: localctx.exception = re @@ -8176,11 +8046,11 @@ def timestampArg(self): self.enterRule(localctx, 62, self.RULE_timestampArg) try: self.enterOuterAlt(localctx, 1) - self.state = 366 + self.state = 379 self.match(FuncTestCaseParser.TimestampLiteral) - self.state = 367 + self.state = 380 self.match(FuncTestCaseParser.DoubleColon) - self.state = 368 + self.state = 381 self.timestampType() except RecognitionException as re: localctx.exception = re @@ -8232,11 +8102,11 @@ def timestampTzArg(self): self.enterRule(localctx, 64, self.RULE_timestampTzArg) try: self.enterOuterAlt(localctx, 1) - self.state = 370 + self.state = 383 self.match(FuncTestCaseParser.TimestampTzLiteral) - self.state = 371 + self.state = 384 self.match(FuncTestCaseParser.DoubleColon) - self.state = 372 + self.state = 385 self.timestampTZType() except RecognitionException as re: localctx.exception = re @@ -8283,19 +8153,129 @@ def accept(self, visitor: ParseTreeVisitor): else: return visitor.visitChildren(self) - def intervalYearArg(self): - localctx = FuncTestCaseParser.IntervalYearArgContext( - self, self._ctx, self.state - ) - self.enterRule(localctx, 66, self.RULE_intervalYearArg) + def intervalYearArg(self): + localctx = FuncTestCaseParser.IntervalYearArgContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 66, self.RULE_intervalYearArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 387 + self.match(FuncTestCaseParser.IntervalYearLiteral) + self.state = 388 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 389 + self.intervalYearType() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class IntervalDayArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def IntervalDayLiteral(self): + return self.getToken(FuncTestCaseParser.IntervalDayLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def intervalDayType(self): + return self.getTypedRuleContext( + FuncTestCaseParser.IntervalDayTypeContext, 0 + ) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_intervalDayArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterIntervalDayArg"): + listener.enterIntervalDayArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitIntervalDayArg"): + listener.exitIntervalDayArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitIntervalDayArg"): + return visitor.visitIntervalDayArg(self) + else: + return visitor.visitChildren(self) + + def intervalDayArg(self): + localctx = FuncTestCaseParser.IntervalDayArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 68, self.RULE_intervalDayArg) + try: + self.enterOuterAlt(localctx, 1) + self.state = 391 + self.match(FuncTestCaseParser.IntervalDayLiteral) + self.state = 392 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 393 + self.intervalDayType() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class FixedCharArgContext(ParserRuleContext): + __slots__ = "parser" + + def __init__( + self, parser, parent: ParserRuleContext = None, invokingState: int = -1 + ): + super().__init__(parent, invokingState) + self.parser = parser + + def StringLiteral(self): + return self.getToken(FuncTestCaseParser.StringLiteral, 0) + + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def fixedCharType(self): + return self.getTypedRuleContext(FuncTestCaseParser.FixedCharTypeContext, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_fixedCharArg + + def enterRule(self, listener: ParseTreeListener): + if hasattr(listener, "enterFixedCharArg"): + listener.enterFixedCharArg(self) + + def exitRule(self, listener: ParseTreeListener): + if hasattr(listener, "exitFixedCharArg"): + listener.exitFixedCharArg(self) + + def accept(self, visitor: ParseTreeVisitor): + if hasattr(visitor, "visitFixedCharArg"): + return visitor.visitFixedCharArg(self) + else: + return visitor.visitChildren(self) + + def fixedCharArg(self): + localctx = FuncTestCaseParser.FixedCharArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 70, self.RULE_fixedCharArg) try: self.enterOuterAlt(localctx, 1) - self.state = 374 - self.match(FuncTestCaseParser.IntervalYearLiteral) - self.state = 375 + self.state = 395 + self.match(FuncTestCaseParser.StringLiteral) + self.state = 396 self.match(FuncTestCaseParser.DoubleColon) - self.state = 376 - self.intervalYearType() + self.state = 397 + self.fixedCharType() except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -8304,7 +8284,7 @@ def intervalYearArg(self): self.exitRule() return localctx - class IntervalDayArgContext(ParserRuleContext): + class VarCharArgContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -8313,45 +8293,43 @@ def __init__( super().__init__(parent, invokingState) self.parser = parser - def IntervalDayLiteral(self): - return self.getToken(FuncTestCaseParser.IntervalDayLiteral, 0) + def StringLiteral(self): + return self.getToken(FuncTestCaseParser.StringLiteral, 0) def DoubleColon(self): return self.getToken(FuncTestCaseParser.DoubleColon, 0) - def intervalDayType(self): - return self.getTypedRuleContext( - FuncTestCaseParser.IntervalDayTypeContext, 0 - ) + def varCharType(self): + return self.getTypedRuleContext(FuncTestCaseParser.VarCharTypeContext, 0) def getRuleIndex(self): - return FuncTestCaseParser.RULE_intervalDayArg + return FuncTestCaseParser.RULE_varCharArg def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterIntervalDayArg"): - listener.enterIntervalDayArg(self) + if hasattr(listener, "enterVarCharArg"): + listener.enterVarCharArg(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitIntervalDayArg"): - listener.exitIntervalDayArg(self) + if hasattr(listener, "exitVarCharArg"): + listener.exitVarCharArg(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitIntervalDayArg"): - return visitor.visitIntervalDayArg(self) + if hasattr(visitor, "visitVarCharArg"): + return visitor.visitVarCharArg(self) else: return visitor.visitChildren(self) - def intervalDayArg(self): - localctx = FuncTestCaseParser.IntervalDayArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 68, self.RULE_intervalDayArg) + def varCharArg(self): + localctx = FuncTestCaseParser.VarCharArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 72, self.RULE_varCharArg) try: self.enterOuterAlt(localctx, 1) - self.state = 378 - self.match(FuncTestCaseParser.IntervalDayLiteral) - self.state = 379 + self.state = 399 + self.match(FuncTestCaseParser.StringLiteral) + self.state = 400 self.match(FuncTestCaseParser.DoubleColon) - self.state = 380 - self.intervalDayType() + self.state = 401 + self.varCharType() except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -8360,7 +8338,7 @@ def intervalDayArg(self): self.exitRule() return localctx - class ListArgContext(ParserRuleContext): + class FixedBinaryArgContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -8369,43 +8347,45 @@ def __init__( super().__init__(parent, invokingState) self.parser = parser - def literalList(self): - return self.getTypedRuleContext(FuncTestCaseParser.LiteralListContext, 0) + def StringLiteral(self): + return self.getToken(FuncTestCaseParser.StringLiteral, 0) def DoubleColon(self): return self.getToken(FuncTestCaseParser.DoubleColon, 0) - def listType(self): - return self.getTypedRuleContext(FuncTestCaseParser.ListTypeContext, 0) + def fixedBinaryType(self): + return self.getTypedRuleContext( + FuncTestCaseParser.FixedBinaryTypeContext, 0 + ) def getRuleIndex(self): - return FuncTestCaseParser.RULE_listArg + return FuncTestCaseParser.RULE_fixedBinaryArg def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterListArg"): - listener.enterListArg(self) + if hasattr(listener, "enterFixedBinaryArg"): + listener.enterFixedBinaryArg(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitListArg"): - listener.exitListArg(self) + if hasattr(listener, "exitFixedBinaryArg"): + listener.exitFixedBinaryArg(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitListArg"): - return visitor.visitListArg(self) + if hasattr(visitor, "visitFixedBinaryArg"): + return visitor.visitFixedBinaryArg(self) else: return visitor.visitChildren(self) - def listArg(self): - localctx = FuncTestCaseParser.ListArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 70, self.RULE_listArg) + def fixedBinaryArg(self): + localctx = FuncTestCaseParser.FixedBinaryArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 74, self.RULE_fixedBinaryArg) try: self.enterOuterAlt(localctx, 1) - self.state = 382 - self.literalList() - self.state = 383 + self.state = 403 + self.match(FuncTestCaseParser.StringLiteral) + self.state = 404 self.match(FuncTestCaseParser.DoubleColon) - self.state = 384 - self.listType() + self.state = 405 + self.fixedBinaryType() except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -8414,7 +8394,7 @@ def listArg(self): self.exitRule() return localctx - class LiteralListContext(ParserRuleContext): + class PrecisionTimestampArgContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -8423,69 +8403,47 @@ def __init__( super().__init__(parent, invokingState) self.parser = parser - def OBracket(self): - return self.getToken(FuncTestCaseParser.OBracket, 0) - - def CBracket(self): - return self.getToken(FuncTestCaseParser.CBracket, 0) + def TimestampLiteral(self): + return self.getToken(FuncTestCaseParser.TimestampLiteral, 0) - def literal(self, i: int = None): - if i is None: - return self.getTypedRuleContexts(FuncTestCaseParser.LiteralContext) - else: - return self.getTypedRuleContext(FuncTestCaseParser.LiteralContext, i) + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) - def Comma(self, i: int = None): - if i is None: - return self.getTokens(FuncTestCaseParser.Comma) - else: - return self.getToken(FuncTestCaseParser.Comma, i) + def precisionTimestampType(self): + return self.getTypedRuleContext( + FuncTestCaseParser.PrecisionTimestampTypeContext, 0 + ) def getRuleIndex(self): - return FuncTestCaseParser.RULE_literalList + return FuncTestCaseParser.RULE_precisionTimestampArg def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterLiteralList"): - listener.enterLiteralList(self) + if hasattr(listener, "enterPrecisionTimestampArg"): + listener.enterPrecisionTimestampArg(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitLiteralList"): - listener.exitLiteralList(self) + if hasattr(listener, "exitPrecisionTimestampArg"): + listener.exitPrecisionTimestampArg(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitLiteralList"): - return visitor.visitLiteralList(self) + if hasattr(visitor, "visitPrecisionTimestampArg"): + return visitor.visitPrecisionTimestampArg(self) else: return visitor.visitChildren(self) - def literalList(self): - localctx = FuncTestCaseParser.LiteralListContext(self, self._ctx, self.state) - self.enterRule(localctx, 72, self.RULE_literalList) - self._la = 0 # Token type + def precisionTimestampArg(self): + localctx = FuncTestCaseParser.PrecisionTimestampArgContext( + self, self._ctx, self.state + ) + self.enterRule(localctx, 76, self.RULE_precisionTimestampArg) try: self.enterOuterAlt(localctx, 1) - self.state = 386 - self.match(FuncTestCaseParser.OBracket) - self.state = 395 - self._errHandler.sync(self) - _la = self._input.LA(1) - if ((_la) & ~0x3F) == 0 and ((1 << _la) & 32987488059392) != 0: - self.state = 387 - self.literal() - self.state = 392 - self._errHandler.sync(self) - _la = self._input.LA(1) - while _la == 110: - self.state = 388 - self.match(FuncTestCaseParser.Comma) - self.state = 389 - self.literal() - self.state = 394 - self._errHandler.sync(self) - _la = self._input.LA(1) - - self.state = 397 - self.match(FuncTestCaseParser.CBracket) + self.state = 407 + self.match(FuncTestCaseParser.TimestampLiteral) + self.state = 408 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 409 + self.precisionTimestampType() except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -8494,7 +8452,7 @@ def literalList(self): self.exitRule() return localctx - class IntervalYearLiteralContext(ParserRuleContext): + class PrecisionTimestampTZArgContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -8502,82 +8460,48 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser - self.years = None # Token - self.months = None # Token - - def PeriodPrefix(self): - return self.getToken(FuncTestCaseParser.PeriodPrefix, 0) - def YearPrefix(self): - return self.getToken(FuncTestCaseParser.YearPrefix, 0) + def TimestampTzLiteral(self): + return self.getToken(FuncTestCaseParser.TimestampTzLiteral, 0) - def IntegerLiteral(self, i: int = None): - if i is None: - return self.getTokens(FuncTestCaseParser.IntegerLiteral) - else: - return self.getToken(FuncTestCaseParser.IntegerLiteral, i) + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) - def MSuffix(self): - return self.getToken(FuncTestCaseParser.MSuffix, 0) + def precisionTimestampTZType(self): + return self.getTypedRuleContext( + FuncTestCaseParser.PrecisionTimestampTZTypeContext, 0 + ) def getRuleIndex(self): - return FuncTestCaseParser.RULE_intervalYearLiteral + return FuncTestCaseParser.RULE_precisionTimestampTZArg def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterIntervalYearLiteral"): - listener.enterIntervalYearLiteral(self) + if hasattr(listener, "enterPrecisionTimestampTZArg"): + listener.enterPrecisionTimestampTZArg(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitIntervalYearLiteral"): - listener.exitIntervalYearLiteral(self) + if hasattr(listener, "exitPrecisionTimestampTZArg"): + listener.exitPrecisionTimestampTZArg(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitIntervalYearLiteral"): - return visitor.visitIntervalYearLiteral(self) + if hasattr(visitor, "visitPrecisionTimestampTZArg"): + return visitor.visitPrecisionTimestampTZArg(self) else: return visitor.visitChildren(self) - def intervalYearLiteral(self): - localctx = FuncTestCaseParser.IntervalYearLiteralContext( + def precisionTimestampTZArg(self): + localctx = FuncTestCaseParser.PrecisionTimestampTZArgContext( self, self._ctx, self.state ) - self.enterRule(localctx, 74, self.RULE_intervalYearLiteral) - self._la = 0 # Token type + self.enterRule(localctx, 78, self.RULE_precisionTimestampTZArg) try: - self.state = 410 - self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 25, self._ctx) - if la_ == 1: - self.enterOuterAlt(localctx, 1) - self.state = 399 - self.match(FuncTestCaseParser.PeriodPrefix) - - self.state = 400 - localctx.years = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 401 - self.match(FuncTestCaseParser.YearPrefix) - self.state = 405 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la == 23: - self.state = 403 - localctx.months = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 404 - self.match(FuncTestCaseParser.MSuffix) - - pass - - elif la_ == 2: - self.enterOuterAlt(localctx, 2) - self.state = 407 - self.match(FuncTestCaseParser.PeriodPrefix) - - self.state = 408 - localctx.months = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 409 - self.match(FuncTestCaseParser.MSuffix) - pass - + self.enterOuterAlt(localctx, 1) + self.state = 411 + self.match(FuncTestCaseParser.TimestampTzLiteral) + self.state = 412 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 413 + self.precisionTimestampTZType() except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -8586,7 +8510,7 @@ def intervalYearLiteral(self): self.exitRule() return localctx - class IntervalDayLiteralContext(ParserRuleContext): + class ListArgContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -8594,80 +8518,44 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser - self.days = None # Token - - def PeriodPrefix(self): - return self.getToken(FuncTestCaseParser.PeriodPrefix, 0) - - def DaySuffix(self): - return self.getToken(FuncTestCaseParser.DaySuffix, 0) - def IntegerLiteral(self): - return self.getToken(FuncTestCaseParser.IntegerLiteral, 0) + def literalList(self): + return self.getTypedRuleContext(FuncTestCaseParser.LiteralListContext, 0) - def TimePrefix(self): - return self.getToken(FuncTestCaseParser.TimePrefix, 0) + def DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) - def timeInterval(self): - return self.getTypedRuleContext(FuncTestCaseParser.TimeIntervalContext, 0) + def listType(self): + return self.getTypedRuleContext(FuncTestCaseParser.ListTypeContext, 0) def getRuleIndex(self): - return FuncTestCaseParser.RULE_intervalDayLiteral + return FuncTestCaseParser.RULE_listArg def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterIntervalDayLiteral"): - listener.enterIntervalDayLiteral(self) + if hasattr(listener, "enterListArg"): + listener.enterListArg(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitIntervalDayLiteral"): - listener.exitIntervalDayLiteral(self) + if hasattr(listener, "exitListArg"): + listener.exitListArg(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitIntervalDayLiteral"): - return visitor.visitIntervalDayLiteral(self) + if hasattr(visitor, "visitListArg"): + return visitor.visitListArg(self) else: return visitor.visitChildren(self) - def intervalDayLiteral(self): - localctx = FuncTestCaseParser.IntervalDayLiteralContext( - self, self._ctx, self.state - ) - self.enterRule(localctx, 76, self.RULE_intervalDayLiteral) - self._la = 0 # Token type + def listArg(self): + localctx = FuncTestCaseParser.ListArgContext(self, self._ctx, self.state) + self.enterRule(localctx, 80, self.RULE_listArg) try: - self.state = 423 - self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 27, self._ctx) - if la_ == 1: - self.enterOuterAlt(localctx, 1) - self.state = 412 - self.match(FuncTestCaseParser.PeriodPrefix) - - self.state = 413 - localctx.days = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 414 - self.match(FuncTestCaseParser.DaySuffix) - self.state = 418 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la == 32: - self.state = 416 - self.match(FuncTestCaseParser.TimePrefix) - self.state = 417 - self.timeInterval() - - pass - - elif la_ == 2: - self.enterOuterAlt(localctx, 2) - self.state = 420 - self.match(FuncTestCaseParser.PeriodPrefix) - self.state = 421 - self.match(FuncTestCaseParser.TimePrefix) - self.state = 422 - self.timeInterval() - pass - + self.enterOuterAlt(localctx, 1) + self.state = 415 + self.literalList() + self.state = 416 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 417 + self.listType() except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -8676,7 +8564,7 @@ def intervalDayLiteral(self): self.exitRule() return localctx - class TimeIntervalContext(ParserRuleContext): + class LiteralListContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -8684,148 +8572,70 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser - self.hours = None # Token - self.minutes = None # Token - self.seconds = None # Token - self.fractionalSeconds = None # Token - def HourSuffix(self): - return self.getToken(FuncTestCaseParser.HourSuffix, 0) + def OBracket(self): + return self.getToken(FuncTestCaseParser.OBracket, 0) + + def CBracket(self): + return self.getToken(FuncTestCaseParser.CBracket, 0) - def IntegerLiteral(self, i: int = None): + def literal(self, i: int = None): if i is None: - return self.getTokens(FuncTestCaseParser.IntegerLiteral) + return self.getTypedRuleContexts(FuncTestCaseParser.LiteralContext) else: - return self.getToken(FuncTestCaseParser.IntegerLiteral, i) - - def MSuffix(self): - return self.getToken(FuncTestCaseParser.MSuffix, 0) - - def SecondSuffix(self): - return self.getToken(FuncTestCaseParser.SecondSuffix, 0) + return self.getTypedRuleContext(FuncTestCaseParser.LiteralContext, i) - def FractionalSecondSuffix(self): - return self.getToken(FuncTestCaseParser.FractionalSecondSuffix, 0) + def Comma(self, i: int = None): + if i is None: + return self.getTokens(FuncTestCaseParser.Comma) + else: + return self.getToken(FuncTestCaseParser.Comma, i) def getRuleIndex(self): - return FuncTestCaseParser.RULE_timeInterval + return FuncTestCaseParser.RULE_literalList def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterTimeInterval"): - listener.enterTimeInterval(self) + if hasattr(listener, "enterLiteralList"): + listener.enterLiteralList(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitTimeInterval"): - listener.exitTimeInterval(self) + if hasattr(listener, "exitLiteralList"): + listener.exitLiteralList(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitTimeInterval"): - return visitor.visitTimeInterval(self) + if hasattr(visitor, "visitLiteralList"): + return visitor.visitLiteralList(self) else: return visitor.visitChildren(self) - def timeInterval(self): - localctx = FuncTestCaseParser.TimeIntervalContext(self, self._ctx, self.state) - self.enterRule(localctx, 78, self.RULE_timeInterval) + def literalList(self): + localctx = FuncTestCaseParser.LiteralListContext(self, self._ctx, self.state) + self.enterRule(localctx, 82, self.RULE_literalList) self._la = 0 # Token type try: - self.state = 457 + self.enterOuterAlt(localctx, 1) + self.state = 419 + self.match(FuncTestCaseParser.OBracket) + self.state = 428 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 34, self._ctx) - if la_ == 1: - self.enterOuterAlt(localctx, 1) - self.state = 425 - localctx.hours = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 426 - self.match(FuncTestCaseParser.HourSuffix) - self.state = 429 - self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 28, self._ctx) - if la_ == 1: - self.state = 427 - localctx.minutes = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 428 - self.match(FuncTestCaseParser.MSuffix) - - self.state = 433 - self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 29, self._ctx) - if la_ == 1: - self.state = 431 - localctx.seconds = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 432 - self.match(FuncTestCaseParser.SecondSuffix) - - self.state = 437 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la == 23: - self.state = 435 - localctx.fractionalSeconds = self.match( - FuncTestCaseParser.IntegerLiteral - ) - self.state = 436 - self.match(FuncTestCaseParser.FractionalSecondSuffix) - - pass - - elif la_ == 2: - self.enterOuterAlt(localctx, 2) - self.state = 439 - localctx.minutes = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 440 - self.match(FuncTestCaseParser.MSuffix) - self.state = 443 - self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 31, self._ctx) - if la_ == 1: - self.state = 441 - localctx.seconds = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 442 - self.match(FuncTestCaseParser.SecondSuffix) - - self.state = 447 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la == 23: - self.state = 445 - localctx.fractionalSeconds = self.match( - FuncTestCaseParser.IntegerLiteral - ) - self.state = 446 - self.match(FuncTestCaseParser.FractionalSecondSuffix) - - pass - - elif la_ == 3: - self.enterOuterAlt(localctx, 3) - self.state = 449 - localctx.seconds = self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 450 - self.match(FuncTestCaseParser.SecondSuffix) - self.state = 453 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la == 23: - self.state = 451 - localctx.fractionalSeconds = self.match( - FuncTestCaseParser.IntegerLiteral - ) - self.state = 452 - self.match(FuncTestCaseParser.FractionalSecondSuffix) - - pass - - elif la_ == 4: - self.enterOuterAlt(localctx, 4) - self.state = 455 - localctx.fractionalSeconds = self.match( - FuncTestCaseParser.IntegerLiteral - ) - self.state = 456 - self.match(FuncTestCaseParser.FractionalSecondSuffix) - pass + _la = self._input.LA(1) + if ((_la) & ~0x3F) == 0 and ((1 << _la) & 32987488059392) != 0: + self.state = 420 + self.literal() + self.state = 425 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la == 110: + self.state = 421 + self.match(FuncTestCaseParser.Comma) + self.state = 422 + self.literal() + self.state = 427 + self._errHandler.sync(self) + _la = self._input.LA(1) + self.state = 430 + self.match(FuncTestCaseParser.CBracket) except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -8870,9 +8680,9 @@ def accept(self, visitor: ParseTreeVisitor): def dataType(self): localctx = FuncTestCaseParser.DataTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 80, self.RULE_dataType) + self.enterRule(localctx, 84, self.RULE_dataType) try: - self.state = 461 + self.state = 434 self._errHandler.sync(self) token = self._input.LA(1) if token in [ @@ -8890,7 +8700,6 @@ def dataType(self): 62, 63, 64, - 65, 66, 77, 78, @@ -8899,15 +8708,14 @@ def dataType(self): 81, 82, 83, - 84, ]: self.enterOuterAlt(localctx, 1) - self.state = 459 + self.state = 432 self.scalarType() pass - elif token in [67, 68, 69, 70, 71, 72, 85, 86, 87, 88, 89, 90]: + elif token in [65, 67, 68, 69, 70, 71, 72, 84, 85, 86, 87, 88, 89, 90]: self.enterOuterAlt(localctx, 2) - self.state = 460 + self.state = 433 self.parameterizedType() pass else: @@ -9205,32 +9013,6 @@ def accept(self, visitor: ParseTreeVisitor): else: return visitor.visitChildren(self) - class IntervalDayContext(ScalarTypeContext): - def __init__( - self, parser, ctx: ParserRuleContext - ): # actually a FuncTestCaseParser.ScalarTypeContext - super().__init__(parser) - self.copyFrom(ctx) - - def intervalDayType(self): - return self.getTypedRuleContext( - FuncTestCaseParser.IntervalDayTypeContext, 0 - ) - - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterIntervalDay"): - listener.enterIntervalDay(self) - - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitIntervalDay"): - listener.exitIntervalDay(self) - - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitIntervalDay"): - return visitor.visitIntervalDay(self) - else: - return visitor.visitChildren(self) - class Fp64Context(ScalarTypeContext): def __init__( self, parser, ctx: ParserRuleContext @@ -9355,113 +9137,107 @@ def accept(self, visitor: ParseTreeVisitor): def scalarType(self): localctx = FuncTestCaseParser.ScalarTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 82, self.RULE_scalarType) + self.enterRule(localctx, 86, self.RULE_scalarType) try: - self.state = 481 + self.state = 453 self._errHandler.sync(self) token = self._input.LA(1) if token in [51, 78]: localctx = FuncTestCaseParser.BooleanContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 463 + self.state = 436 self.booleanType() pass elif token in [52]: localctx = FuncTestCaseParser.I8Context(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 464 + self.state = 437 self.match(FuncTestCaseParser.I8) pass elif token in [53]: localctx = FuncTestCaseParser.I16Context(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 465 + self.state = 438 self.match(FuncTestCaseParser.I16) pass elif token in [54]: localctx = FuncTestCaseParser.I32Context(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 466 + self.state = 439 self.match(FuncTestCaseParser.I32) pass elif token in [55]: localctx = FuncTestCaseParser.I64Context(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 467 + self.state = 440 self.match(FuncTestCaseParser.I64) pass elif token in [56]: localctx = FuncTestCaseParser.Fp32Context(self, localctx) self.enterOuterAlt(localctx, 6) - self.state = 468 + self.state = 441 self.match(FuncTestCaseParser.FP32) pass elif token in [57]: localctx = FuncTestCaseParser.Fp64Context(self, localctx) self.enterOuterAlt(localctx, 7) - self.state = 469 + self.state = 442 self.match(FuncTestCaseParser.FP64) pass elif token in [58, 79]: localctx = FuncTestCaseParser.StringContext(self, localctx) self.enterOuterAlt(localctx, 8) - self.state = 470 + self.state = 443 self.stringType() pass elif token in [59, 80]: localctx = FuncTestCaseParser.BinaryContext(self, localctx) self.enterOuterAlt(localctx, 9) - self.state = 471 + self.state = 444 self.binaryType() pass elif token in [60, 81]: localctx = FuncTestCaseParser.TimestampContext(self, localctx) self.enterOuterAlt(localctx, 10) - self.state = 472 + self.state = 445 self.timestampType() pass elif token in [61, 82]: localctx = FuncTestCaseParser.TimestampTzContext(self, localctx) self.enterOuterAlt(localctx, 11) - self.state = 473 + self.state = 446 self.timestampTZType() pass elif token in [62]: localctx = FuncTestCaseParser.DateContext(self, localctx) self.enterOuterAlt(localctx, 12) - self.state = 474 + self.state = 447 self.match(FuncTestCaseParser.Date) pass elif token in [63]: localctx = FuncTestCaseParser.TimeContext(self, localctx) self.enterOuterAlt(localctx, 13) - self.state = 475 + self.state = 448 self.match(FuncTestCaseParser.Time) pass - elif token in [65, 84]: - localctx = FuncTestCaseParser.IntervalDayContext(self, localctx) - self.enterOuterAlt(localctx, 14) - self.state = 476 - self.intervalDayType() - pass elif token in [64, 83]: localctx = FuncTestCaseParser.IntervalYearContext(self, localctx) - self.enterOuterAlt(localctx, 15) - self.state = 477 + self.enterOuterAlt(localctx, 14) + self.state = 449 self.intervalYearType() pass elif token in [66]: localctx = FuncTestCaseParser.UuidContext(self, localctx) - self.enterOuterAlt(localctx, 16) - self.state = 478 + self.enterOuterAlt(localctx, 15) + self.state = 450 self.match(FuncTestCaseParser.UUID) pass elif token in [77]: localctx = FuncTestCaseParser.UserDefinedContext(self, localctx) - self.enterOuterAlt(localctx, 17) - self.state = 479 + self.enterOuterAlt(localctx, 16) + self.state = 451 self.match(FuncTestCaseParser.UserDefined) - self.state = 480 + self.state = 452 self.match(FuncTestCaseParser.Identifier) pass else: @@ -9509,11 +9285,11 @@ def accept(self, visitor: ParseTreeVisitor): def booleanType(self): localctx = FuncTestCaseParser.BooleanTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 84, self.RULE_booleanType) + self.enterRule(localctx, 88, self.RULE_booleanType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 483 + self.state = 455 _la = self._input.LA(1) if not (_la == 51 or _la == 78): self._errHandler.recoverInline(self) @@ -9562,11 +9338,11 @@ def accept(self, visitor: ParseTreeVisitor): def stringType(self): localctx = FuncTestCaseParser.StringTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 86, self.RULE_stringType) + self.enterRule(localctx, 90, self.RULE_stringType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 485 + self.state = 457 _la = self._input.LA(1) if not (_la == 58 or _la == 79): self._errHandler.recoverInline(self) @@ -9615,11 +9391,11 @@ def accept(self, visitor: ParseTreeVisitor): def binaryType(self): localctx = FuncTestCaseParser.BinaryTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 88, self.RULE_binaryType) + self.enterRule(localctx, 92, self.RULE_binaryType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 487 + self.state = 459 _la = self._input.LA(1) if not (_la == 59 or _la == 80): self._errHandler.recoverInline(self) @@ -9668,11 +9444,11 @@ def accept(self, visitor: ParseTreeVisitor): def timestampType(self): localctx = FuncTestCaseParser.TimestampTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 90, self.RULE_timestampType) + self.enterRule(localctx, 94, self.RULE_timestampType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 489 + self.state = 461 _la = self._input.LA(1) if not (_la == 60 or _la == 81): self._errHandler.recoverInline(self) @@ -9723,11 +9499,11 @@ def timestampTZType(self): localctx = FuncTestCaseParser.TimestampTZTypeContext( self, self._ctx, self.state ) - self.enterRule(localctx, 92, self.RULE_timestampTZType) + self.enterRule(localctx, 96, self.RULE_timestampTZType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 491 + self.state = 463 _la = self._input.LA(1) if not (_la == 61 or _la == 82): self._errHandler.recoverInline(self) @@ -9778,11 +9554,11 @@ def intervalYearType(self): localctx = FuncTestCaseParser.IntervalYearTypeContext( self, self._ctx, self.state ) - self.enterRule(localctx, 94, self.RULE_intervalYearType) + self.enterRule(localctx, 98, self.RULE_intervalYearType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 493 + self.state = 465 _la = self._input.LA(1) if not (_la == 64 or _la == 83): self._errHandler.recoverInline(self) @@ -9805,6 +9581,8 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser + self.isnull = None # Token + self.len_ = None # NumericParameterContext def IDay(self): return self.getToken(FuncTestCaseParser.IDay, 0) @@ -9812,6 +9590,20 @@ def IDay(self): def Interval_Day(self): return self.getToken(FuncTestCaseParser.Interval_Day, 0) + def OAngleBracket(self): + return self.getToken(FuncTestCaseParser.OAngleBracket, 0) + + def CAngleBracket(self): + return self.getToken(FuncTestCaseParser.CAngleBracket, 0) + + def QMark(self): + return self.getToken(FuncTestCaseParser.QMark, 0) + + def numericParameter(self): + return self.getTypedRuleContext( + FuncTestCaseParser.NumericParameterContext, 0 + ) + def getRuleIndex(self): return FuncTestCaseParser.RULE_intervalDayType @@ -9833,17 +9625,35 @@ def intervalDayType(self): localctx = FuncTestCaseParser.IntervalDayTypeContext( self, self._ctx, self.state ) - self.enterRule(localctx, 96, self.RULE_intervalDayType) + self.enterRule(localctx, 100, self.RULE_intervalDayType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 495 + self.state = 467 _la = self._input.LA(1) if not (_la == 65 or _la == 84): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() + self.state = 469 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 112: + self.state = 468 + localctx.isnull = self.match(FuncTestCaseParser.QMark) + + self.state = 475 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la == 39: + self.state = 471 + self.match(FuncTestCaseParser.OAngleBracket) + self.state = 472 + localctx.len_ = self.numericParameter() + self.state = 473 + self.match(FuncTestCaseParser.CAngleBracket) + except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -9860,21 +9670,8 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser - - def getRuleIndex(self): - return FuncTestCaseParser.RULE_fixedCharType - - def copyFrom(self, ctx: ParserRuleContext): - super().copyFrom(ctx) - - class FixedCharContext(FixedCharTypeContext): - def __init__( - self, parser, ctx: ParserRuleContext - ): # actually a FuncTestCaseParser.FixedCharTypeContext - super().__init__(parser) self.isnull = None # Token self.len_ = None # NumericParameterContext - self.copyFrom(ctx) def OAngleBracket(self): return self.getToken(FuncTestCaseParser.OAngleBracket, 0) @@ -9896,46 +9693,48 @@ def numericParameter(self): def QMark(self): return self.getToken(FuncTestCaseParser.QMark, 0) + def getRuleIndex(self): + return FuncTestCaseParser.RULE_fixedCharType + def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFixedChar"): - listener.enterFixedChar(self) + if hasattr(listener, "enterFixedCharType"): + listener.enterFixedCharType(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFixedChar"): - listener.exitFixedChar(self) + if hasattr(listener, "exitFixedCharType"): + listener.exitFixedCharType(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFixedChar"): - return visitor.visitFixedChar(self) + if hasattr(visitor, "visitFixedCharType"): + return visitor.visitFixedCharType(self) else: return visitor.visitChildren(self) def fixedCharType(self): localctx = FuncTestCaseParser.FixedCharTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 98, self.RULE_fixedCharType) + self.enterRule(localctx, 102, self.RULE_fixedCharType) self._la = 0 # Token type try: - localctx = FuncTestCaseParser.FixedCharContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 497 + self.state = 477 _la = self._input.LA(1) if not (_la == 70 or _la == 88): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 499 + self.state = 479 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 112: - self.state = 498 + self.state = 478 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 501 + self.state = 481 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 502 + self.state = 482 localctx.len_ = self.numericParameter() - self.state = 503 + self.state = 483 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -9953,21 +9752,8 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser - - def getRuleIndex(self): - return FuncTestCaseParser.RULE_varCharType - - def copyFrom(self, ctx: ParserRuleContext): - super().copyFrom(ctx) - - class VarCharContext(VarCharTypeContext): - def __init__( - self, parser, ctx: ParserRuleContext - ): # actually a FuncTestCaseParser.VarCharTypeContext - super().__init__(parser) self.isnull = None # Token self.len_ = None # NumericParameterContext - self.copyFrom(ctx) def OAngleBracket(self): return self.getToken(FuncTestCaseParser.OAngleBracket, 0) @@ -9989,46 +9775,48 @@ def numericParameter(self): def QMark(self): return self.getToken(FuncTestCaseParser.QMark, 0) + def getRuleIndex(self): + return FuncTestCaseParser.RULE_varCharType + def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterVarChar"): - listener.enterVarChar(self) + if hasattr(listener, "enterVarCharType"): + listener.enterVarCharType(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitVarChar"): - listener.exitVarChar(self) + if hasattr(listener, "exitVarCharType"): + listener.exitVarCharType(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitVarChar"): - return visitor.visitVarChar(self) + if hasattr(visitor, "visitVarCharType"): + return visitor.visitVarCharType(self) else: return visitor.visitChildren(self) def varCharType(self): localctx = FuncTestCaseParser.VarCharTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 100, self.RULE_varCharType) + self.enterRule(localctx, 104, self.RULE_varCharType) self._la = 0 # Token type try: - localctx = FuncTestCaseParser.VarCharContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 505 + self.state = 485 _la = self._input.LA(1) if not (_la == 71 or _la == 89): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 507 + self.state = 487 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 112: - self.state = 506 + self.state = 486 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 509 + self.state = 489 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 510 + self.state = 490 localctx.len_ = self.numericParameter() - self.state = 511 + self.state = 491 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -10046,21 +9834,8 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser - - def getRuleIndex(self): - return FuncTestCaseParser.RULE_fixedBinaryType - - def copyFrom(self, ctx: ParserRuleContext): - super().copyFrom(ctx) - - class FixedBinaryContext(FixedBinaryTypeContext): - def __init__( - self, parser, ctx: ParserRuleContext - ): # actually a FuncTestCaseParser.FixedBinaryTypeContext - super().__init__(parser) self.isnull = None # Token self.len_ = None # NumericParameterContext - self.copyFrom(ctx) def OAngleBracket(self): return self.getToken(FuncTestCaseParser.OAngleBracket, 0) @@ -10082,17 +9857,20 @@ def numericParameter(self): def QMark(self): return self.getToken(FuncTestCaseParser.QMark, 0) + def getRuleIndex(self): + return FuncTestCaseParser.RULE_fixedBinaryType + def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFixedBinary"): - listener.enterFixedBinary(self) + if hasattr(listener, "enterFixedBinaryType"): + listener.enterFixedBinaryType(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFixedBinary"): - listener.exitFixedBinary(self) + if hasattr(listener, "exitFixedBinaryType"): + listener.exitFixedBinaryType(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFixedBinary"): - return visitor.visitFixedBinary(self) + if hasattr(visitor, "visitFixedBinaryType"): + return visitor.visitFixedBinaryType(self) else: return visitor.visitChildren(self) @@ -10100,30 +9878,29 @@ def fixedBinaryType(self): localctx = FuncTestCaseParser.FixedBinaryTypeContext( self, self._ctx, self.state ) - self.enterRule(localctx, 102, self.RULE_fixedBinaryType) + self.enterRule(localctx, 106, self.RULE_fixedBinaryType) self._la = 0 # Token type try: - localctx = FuncTestCaseParser.FixedBinaryContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 513 + self.state = 493 _la = self._input.LA(1) if not (_la == 72 or _la == 90): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 515 + self.state = 495 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 112: - self.state = 514 + self.state = 494 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 517 + self.state = 497 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 518 + self.state = 498 localctx.len_ = self.numericParameter() - self.state = 519 + self.state = 499 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -10141,22 +9918,9 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser - - def getRuleIndex(self): - return FuncTestCaseParser.RULE_decimalType - - def copyFrom(self, ctx: ParserRuleContext): - super().copyFrom(ctx) - - class DecimalContext(DecimalTypeContext): - def __init__( - self, parser, ctx: ParserRuleContext - ): # actually a FuncTestCaseParser.DecimalTypeContext - super().__init__(parser) self.isnull = None # Token self.precision = None # NumericParameterContext self.scale = None # NumericParameterContext - self.copyFrom(ctx) def Dec(self): return self.getToken(FuncTestCaseParser.Dec, 0) @@ -10186,54 +9950,56 @@ def numericParameter(self, i: int = None): FuncTestCaseParser.NumericParameterContext, i ) + def getRuleIndex(self): + return FuncTestCaseParser.RULE_decimalType + def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterDecimal"): - listener.enterDecimal(self) + if hasattr(listener, "enterDecimalType"): + listener.enterDecimalType(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitDecimal"): - listener.exitDecimal(self) + if hasattr(listener, "exitDecimalType"): + listener.exitDecimalType(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitDecimal"): - return visitor.visitDecimal(self) + if hasattr(visitor, "visitDecimalType"): + return visitor.visitDecimalType(self) else: return visitor.visitChildren(self) def decimalType(self): localctx = FuncTestCaseParser.DecimalTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 104, self.RULE_decimalType) + self.enterRule(localctx, 108, self.RULE_decimalType) self._la = 0 # Token type try: - localctx = FuncTestCaseParser.DecimalContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 521 + self.state = 501 _la = self._input.LA(1) if not (_la == 67 or _la == 85): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 523 + self.state = 503 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 112: - self.state = 522 + self.state = 502 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 531 + self.state = 511 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 39: - self.state = 525 + self.state = 505 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 526 + self.state = 506 localctx.precision = self.numericParameter() - self.state = 527 + self.state = 507 self.match(FuncTestCaseParser.Comma) - self.state = 528 + self.state = 508 localctx.scale = self.numericParameter() - self.state = 529 + self.state = 509 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: @@ -10252,21 +10018,8 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser - - def getRuleIndex(self): - return FuncTestCaseParser.RULE_precisionTimestampType - - def copyFrom(self, ctx: ParserRuleContext): - super().copyFrom(ctx) - - class PrecisionTimestampContext(PrecisionTimestampTypeContext): - def __init__( - self, parser, ctx: ParserRuleContext - ): # actually a FuncTestCaseParser.PrecisionTimestampTypeContext - super().__init__(parser) self.isnull = None # Token self.precision = None # NumericParameterContext - self.copyFrom(ctx) def OAngleBracket(self): return self.getToken(FuncTestCaseParser.OAngleBracket, 0) @@ -10288,17 +10041,20 @@ def numericParameter(self): def QMark(self): return self.getToken(FuncTestCaseParser.QMark, 0) + def getRuleIndex(self): + return FuncTestCaseParser.RULE_precisionTimestampType + def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterPrecisionTimestamp"): - listener.enterPrecisionTimestamp(self) + if hasattr(listener, "enterPrecisionTimestampType"): + listener.enterPrecisionTimestampType(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitPrecisionTimestamp"): - listener.exitPrecisionTimestamp(self) + if hasattr(listener, "exitPrecisionTimestampType"): + listener.exitPrecisionTimestampType(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitPrecisionTimestamp"): - return visitor.visitPrecisionTimestamp(self) + if hasattr(visitor, "visitPrecisionTimestampType"): + return visitor.visitPrecisionTimestampType(self) else: return visitor.visitChildren(self) @@ -10306,30 +10062,29 @@ def precisionTimestampType(self): localctx = FuncTestCaseParser.PrecisionTimestampTypeContext( self, self._ctx, self.state ) - self.enterRule(localctx, 106, self.RULE_precisionTimestampType) + self.enterRule(localctx, 110, self.RULE_precisionTimestampType) self._la = 0 # Token type try: - localctx = FuncTestCaseParser.PrecisionTimestampContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 533 + self.state = 513 _la = self._input.LA(1) if not (_la == 68 or _la == 86): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 535 + self.state = 515 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 112: - self.state = 534 + self.state = 514 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 537 + self.state = 517 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 538 + self.state = 518 localctx.precision = self.numericParameter() - self.state = 539 + self.state = 519 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -10347,21 +10102,8 @@ def __init__( ): super().__init__(parent, invokingState) self.parser = parser - - def getRuleIndex(self): - return FuncTestCaseParser.RULE_precisionTimestampTZType - - def copyFrom(self, ctx: ParserRuleContext): - super().copyFrom(ctx) - - class PrecisionTimestampTZContext(PrecisionTimestampTZTypeContext): - def __init__( - self, parser, ctx: ParserRuleContext - ): # actually a FuncTestCaseParser.PrecisionTimestampTZTypeContext - super().__init__(parser) self.isnull = None # Token self.precision = None # NumericParameterContext - self.copyFrom(ctx) def OAngleBracket(self): return self.getToken(FuncTestCaseParser.OAngleBracket, 0) @@ -10383,17 +10125,20 @@ def numericParameter(self): def QMark(self): return self.getToken(FuncTestCaseParser.QMark, 0) + def getRuleIndex(self): + return FuncTestCaseParser.RULE_precisionTimestampTZType + def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterPrecisionTimestampTZ"): - listener.enterPrecisionTimestampTZ(self) + if hasattr(listener, "enterPrecisionTimestampTZType"): + listener.enterPrecisionTimestampTZType(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitPrecisionTimestampTZ"): - listener.exitPrecisionTimestampTZ(self) + if hasattr(listener, "exitPrecisionTimestampTZType"): + listener.exitPrecisionTimestampTZType(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitPrecisionTimestampTZ"): - return visitor.visitPrecisionTimestampTZ(self) + if hasattr(visitor, "visitPrecisionTimestampTZType"): + return visitor.visitPrecisionTimestampTZType(self) else: return visitor.visitChildren(self) @@ -10401,30 +10146,29 @@ def precisionTimestampTZType(self): localctx = FuncTestCaseParser.PrecisionTimestampTZTypeContext( self, self._ctx, self.state ) - self.enterRule(localctx, 108, self.RULE_precisionTimestampTZType) + self.enterRule(localctx, 112, self.RULE_precisionTimestampTZType) self._la = 0 # Token type try: - localctx = FuncTestCaseParser.PrecisionTimestampTZContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 541 + self.state = 521 _la = self._input.LA(1) if not (_la == 69 or _la == 87): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 543 + self.state = 523 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 112: - self.state = 542 + self.state = 522 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 545 + self.state = 525 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 546 + self.state = 526 localctx.precision = self.numericParameter() - self.state = 547 + self.state = 527 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -10489,25 +10233,25 @@ def accept(self, visitor: ParseTreeVisitor): def listType(self): localctx = FuncTestCaseParser.ListTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 110, self.RULE_listType) + self.enterRule(localctx, 114, self.RULE_listType) self._la = 0 # Token type try: localctx = FuncTestCaseParser.ListContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 549 + self.state = 529 self.match(FuncTestCaseParser.List) - self.state = 551 + self.state = 531 self._errHandler.sync(self) _la = self._input.LA(1) if _la == 112: - self.state = 550 + self.state = 530 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 553 + self.state = 533 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 554 + self.state = 534 localctx.elemType = self.dataType() - self.state = 555 + self.state = 535 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -10540,6 +10284,11 @@ def fixedBinaryType(self): def decimalType(self): return self.getTypedRuleContext(FuncTestCaseParser.DecimalTypeContext, 0) + def intervalDayType(self): + return self.getTypedRuleContext( + FuncTestCaseParser.IntervalDayTypeContext, 0 + ) + def precisionTimestampType(self): return self.getTypedRuleContext( FuncTestCaseParser.PrecisionTimestampTypeContext, 0 @@ -10571,39 +10320,44 @@ def parameterizedType(self): localctx = FuncTestCaseParser.ParameterizedTypeContext( self, self._ctx, self.state ) - self.enterRule(localctx, 112, self.RULE_parameterizedType) + self.enterRule(localctx, 116, self.RULE_parameterizedType) try: - self.state = 563 + self.state = 544 self._errHandler.sync(self) token = self._input.LA(1) if token in [70, 88]: self.enterOuterAlt(localctx, 1) - self.state = 557 + self.state = 537 self.fixedCharType() pass elif token in [71, 89]: self.enterOuterAlt(localctx, 2) - self.state = 558 + self.state = 538 self.varCharType() pass elif token in [72, 90]: self.enterOuterAlt(localctx, 3) - self.state = 559 + self.state = 539 self.fixedBinaryType() pass elif token in [67, 85]: self.enterOuterAlt(localctx, 4) - self.state = 560 + self.state = 540 self.decimalType() pass - elif token in [68, 86]: + elif token in [65, 84]: self.enterOuterAlt(localctx, 5) - self.state = 561 + self.state = 541 + self.intervalDayType() + pass + elif token in [68, 86]: + self.enterOuterAlt(localctx, 6) + self.state = 542 self.precisionTimestampType() pass elif token in [69, 87]: - self.enterOuterAlt(localctx, 6) - self.state = 562 + self.enterOuterAlt(localctx, 7) + self.state = 543 self.precisionTimestampTZType() pass else: @@ -10660,11 +10414,11 @@ def numericParameter(self): localctx = FuncTestCaseParser.NumericParameterContext( self, self._ctx, self.state ) - self.enterRule(localctx, 114, self.RULE_numericParameter) + self.enterRule(localctx, 118, self.RULE_numericParameter) try: localctx = FuncTestCaseParser.IntegerLiteralContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 565 + self.state = 546 self.match(FuncTestCaseParser.IntegerLiteral) except RecognitionException as re: localctx.exception = re @@ -10708,11 +10462,11 @@ def accept(self, visitor: ParseTreeVisitor): def substraitError(self): localctx = FuncTestCaseParser.SubstraitErrorContext(self, self._ctx, self.state) - self.enterRule(localctx, 116, self.RULE_substraitError) + self.enterRule(localctx, 120, self.RULE_substraitError) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 567 + self.state = 548 _la = self._input.LA(1) if not (_la == 9 or _la == 10): self._errHandler.recoverInline(self) @@ -10727,7 +10481,7 @@ def substraitError(self): self.exitRule() return localctx - class Func_optionContext(ParserRuleContext): + class FuncOptionContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -10736,43 +10490,43 @@ def __init__( super().__init__(parent, invokingState) self.parser = parser - def option_name(self): - return self.getTypedRuleContext(FuncTestCaseParser.Option_nameContext, 0) + def optionName(self): + return self.getTypedRuleContext(FuncTestCaseParser.OptionNameContext, 0) def Colon(self): return self.getToken(FuncTestCaseParser.Colon, 0) - def option_value(self): - return self.getTypedRuleContext(FuncTestCaseParser.Option_valueContext, 0) + def optionValue(self): + return self.getTypedRuleContext(FuncTestCaseParser.OptionValueContext, 0) def getRuleIndex(self): - return FuncTestCaseParser.RULE_func_option + return FuncTestCaseParser.RULE_funcOption def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFunc_option"): - listener.enterFunc_option(self) + if hasattr(listener, "enterFuncOption"): + listener.enterFuncOption(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFunc_option"): - listener.exitFunc_option(self) + if hasattr(listener, "exitFuncOption"): + listener.exitFuncOption(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFunc_option"): - return visitor.visitFunc_option(self) + if hasattr(visitor, "visitFuncOption"): + return visitor.visitFuncOption(self) else: return visitor.visitChildren(self) - def func_option(self): - localctx = FuncTestCaseParser.Func_optionContext(self, self._ctx, self.state) - self.enterRule(localctx, 118, self.RULE_func_option) + def funcOption(self): + localctx = FuncTestCaseParser.FuncOptionContext(self, self._ctx, self.state) + self.enterRule(localctx, 122, self.RULE_funcOption) try: self.enterOuterAlt(localctx, 1) - self.state = 569 - self.option_name() - self.state = 570 + self.state = 550 + self.optionName() + self.state = 551 self.match(FuncTestCaseParser.Colon) - self.state = 571 - self.option_value() + self.state = 552 + self.optionValue() except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -10781,7 +10535,7 @@ def func_option(self): self.exitRule() return localctx - class Option_nameContext(ParserRuleContext): + class OptionNameContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -10806,29 +10560,29 @@ def Identifier(self): return self.getToken(FuncTestCaseParser.Identifier, 0) def getRuleIndex(self): - return FuncTestCaseParser.RULE_option_name + return FuncTestCaseParser.RULE_optionName def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterOption_name"): - listener.enterOption_name(self) + if hasattr(listener, "enterOptionName"): + listener.enterOptionName(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitOption_name"): - listener.exitOption_name(self) + if hasattr(listener, "exitOptionName"): + listener.exitOptionName(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitOption_name"): - return visitor.visitOption_name(self) + if hasattr(visitor, "visitOptionName"): + return visitor.visitOptionName(self) else: return visitor.visitChildren(self) - def option_name(self): - localctx = FuncTestCaseParser.Option_nameContext(self, self._ctx, self.state) - self.enterRule(localctx, 120, self.RULE_option_name) + def optionName(self): + localctx = FuncTestCaseParser.OptionNameContext(self, self._ctx, self.state) + self.enterRule(localctx, 124, self.RULE_optionName) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 573 + self.state = 554 _la = self._input.LA(1) if not ( (((_la) & ~0x3F) == 0 and ((1 << _la) & 3151872) != 0) or _la == 119 @@ -10845,7 +10599,7 @@ def option_name(self): self.exitRule() return localctx - class Option_valueContext(ParserRuleContext): + class OptionValueContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -10888,29 +10642,29 @@ def Identifier(self): return self.getToken(FuncTestCaseParser.Identifier, 0) def getRuleIndex(self): - return FuncTestCaseParser.RULE_option_value + return FuncTestCaseParser.RULE_optionValue def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterOption_value"): - listener.enterOption_value(self) + if hasattr(listener, "enterOptionValue"): + listener.enterOptionValue(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitOption_value"): - listener.exitOption_value(self) + if hasattr(listener, "exitOptionValue"): + listener.exitOptionValue(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitOption_value"): - return visitor.visitOption_value(self) + if hasattr(visitor, "visitOptionValue"): + return visitor.visitOptionValue(self) else: return visitor.visitChildren(self) - def option_value(self): - localctx = FuncTestCaseParser.Option_valueContext(self, self._ctx, self.state) - self.enterRule(localctx, 122, self.RULE_option_value) + def optionValue(self): + localctx = FuncTestCaseParser.OptionValueContext(self, self._ctx, self.state) + self.enterRule(localctx, 126, self.RULE_optionValue) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 575 + self.state = 556 _la = self._input.LA(1) if not ( (((_la) & ~0x3F) == 0 and ((1 << _la) & 8796165365760) != 0) @@ -10928,7 +10682,7 @@ def option_value(self): self.exitRule() return localctx - class Func_optionsContext(ParserRuleContext): + class FuncOptionsContext(ParserRuleContext): __slots__ = "parser" def __init__( @@ -10937,13 +10691,11 @@ def __init__( super().__init__(parent, invokingState) self.parser = parser - def func_option(self, i: int = None): + def funcOption(self, i: int = None): if i is None: - return self.getTypedRuleContexts(FuncTestCaseParser.Func_optionContext) + return self.getTypedRuleContexts(FuncTestCaseParser.FuncOptionContext) else: - return self.getTypedRuleContext( - FuncTestCaseParser.Func_optionContext, i - ) + return self.getTypedRuleContext(FuncTestCaseParser.FuncOptionContext, i) def Comma(self, i: int = None): if i is None: @@ -10952,39 +10704,39 @@ def Comma(self, i: int = None): return self.getToken(FuncTestCaseParser.Comma, i) def getRuleIndex(self): - return FuncTestCaseParser.RULE_func_options + return FuncTestCaseParser.RULE_funcOptions def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFunc_options"): - listener.enterFunc_options(self) + if hasattr(listener, "enterFuncOptions"): + listener.enterFuncOptions(self) def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFunc_options"): - listener.exitFunc_options(self) + if hasattr(listener, "exitFuncOptions"): + listener.exitFuncOptions(self) def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFunc_options"): - return visitor.visitFunc_options(self) + if hasattr(visitor, "visitFuncOptions"): + return visitor.visitFuncOptions(self) else: return visitor.visitChildren(self) - def func_options(self): - localctx = FuncTestCaseParser.Func_optionsContext(self, self._ctx, self.state) - self.enterRule(localctx, 124, self.RULE_func_options) + def funcOptions(self): + localctx = FuncTestCaseParser.FuncOptionsContext(self, self._ctx, self.state) + self.enterRule(localctx, 128, self.RULE_funcOptions) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 577 - self.func_option() - self.state = 582 + self.state = 558 + self.funcOption() + self.state = 563 self._errHandler.sync(self) _la = self._input.LA(1) while _la == 110: - self.state = 578 + self.state = 559 self.match(FuncTestCaseParser.Comma) - self.state = 579 - self.func_option() - self.state = 584 + self.state = 560 + self.funcOption() + self.state = 565 self._errHandler.sync(self) _la = self._input.LA(1) @@ -11033,11 +10785,11 @@ def accept(self, visitor: ParseTreeVisitor): def nonReserved(self): localctx = FuncTestCaseParser.NonReservedContext(self, self._ctx, self.state) - self.enterRule(localctx, 126, self.RULE_nonReserved) + self.enterRule(localctx, 130, self.RULE_nonReserved) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 585 + self.state = 566 _la = self._input.LA(1) if not (_la == 22 or _la == 115 or _la == 116): self._errHandler.recoverInline(self) @@ -11086,19 +10838,19 @@ def accept(self, visitor: ParseTreeVisitor): def identifier(self): localctx = FuncTestCaseParser.IdentifierContext(self, self._ctx, self.state) - self.enterRule(localctx, 128, self.RULE_identifier) + self.enterRule(localctx, 132, self.RULE_identifier) try: - self.state = 589 + self.state = 570 self._errHandler.sync(self) token = self._input.LA(1) if token in [22, 115, 116]: self.enterOuterAlt(localctx, 1) - self.state = 587 + self.state = 568 self.nonReserved() pass elif token in [119]: self.enterOuterAlt(localctx, 2) - self.state = 588 + self.state = 569 self.match(FuncTestCaseParser.Identifier) pass else: diff --git a/tests/coverage/antlr_parser/FuncTestCaseParserListener.py b/tests/coverage/antlr_parser/FuncTestCaseParserListener.py index b35606155..63edfa4c4 100644 --- a/tests/coverage/antlr_parser/FuncTestCaseParserListener.py +++ b/tests/coverage/antlr_parser/FuncTestCaseParserListener.py @@ -346,50 +346,68 @@ def enterIntervalDayArg(self, ctx: FuncTestCaseParser.IntervalDayArgContext): def exitIntervalDayArg(self, ctx: FuncTestCaseParser.IntervalDayArgContext): pass - # Enter a parse tree produced by FuncTestCaseParser#listArg. - def enterListArg(self, ctx: FuncTestCaseParser.ListArgContext): + # Enter a parse tree produced by FuncTestCaseParser#fixedCharArg. + def enterFixedCharArg(self, ctx: FuncTestCaseParser.FixedCharArgContext): pass - # Exit a parse tree produced by FuncTestCaseParser#listArg. - def exitListArg(self, ctx: FuncTestCaseParser.ListArgContext): + # Exit a parse tree produced by FuncTestCaseParser#fixedCharArg. + def exitFixedCharArg(self, ctx: FuncTestCaseParser.FixedCharArgContext): pass - # Enter a parse tree produced by FuncTestCaseParser#literalList. - def enterLiteralList(self, ctx: FuncTestCaseParser.LiteralListContext): + # Enter a parse tree produced by FuncTestCaseParser#varCharArg. + def enterVarCharArg(self, ctx: FuncTestCaseParser.VarCharArgContext): pass - # Exit a parse tree produced by FuncTestCaseParser#literalList. - def exitLiteralList(self, ctx: FuncTestCaseParser.LiteralListContext): + # Exit a parse tree produced by FuncTestCaseParser#varCharArg. + def exitVarCharArg(self, ctx: FuncTestCaseParser.VarCharArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#fixedBinaryArg. + def enterFixedBinaryArg(self, ctx: FuncTestCaseParser.FixedBinaryArgContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#fixedBinaryArg. + def exitFixedBinaryArg(self, ctx: FuncTestCaseParser.FixedBinaryArgContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#precisionTimestampArg. + def enterPrecisionTimestampArg( + self, ctx: FuncTestCaseParser.PrecisionTimestampArgContext + ): pass - # Enter a parse tree produced by FuncTestCaseParser#intervalYearLiteral. - def enterIntervalYearLiteral( - self, ctx: FuncTestCaseParser.IntervalYearLiteralContext + # Exit a parse tree produced by FuncTestCaseParser#precisionTimestampArg. + def exitPrecisionTimestampArg( + self, ctx: FuncTestCaseParser.PrecisionTimestampArgContext ): pass - # Exit a parse tree produced by FuncTestCaseParser#intervalYearLiteral. - def exitIntervalYearLiteral( - self, ctx: FuncTestCaseParser.IntervalYearLiteralContext + # Enter a parse tree produced by FuncTestCaseParser#precisionTimestampTZArg. + def enterPrecisionTimestampTZArg( + self, ctx: FuncTestCaseParser.PrecisionTimestampTZArgContext ): pass - # Enter a parse tree produced by FuncTestCaseParser#intervalDayLiteral. - def enterIntervalDayLiteral( - self, ctx: FuncTestCaseParser.IntervalDayLiteralContext + # Exit a parse tree produced by FuncTestCaseParser#precisionTimestampTZArg. + def exitPrecisionTimestampTZArg( + self, ctx: FuncTestCaseParser.PrecisionTimestampTZArgContext ): pass - # Exit a parse tree produced by FuncTestCaseParser#intervalDayLiteral. - def exitIntervalDayLiteral(self, ctx: FuncTestCaseParser.IntervalDayLiteralContext): + # Enter a parse tree produced by FuncTestCaseParser#listArg. + def enterListArg(self, ctx: FuncTestCaseParser.ListArgContext): pass - # Enter a parse tree produced by FuncTestCaseParser#timeInterval. - def enterTimeInterval(self, ctx: FuncTestCaseParser.TimeIntervalContext): + # Exit a parse tree produced by FuncTestCaseParser#listArg. + def exitListArg(self, ctx: FuncTestCaseParser.ListArgContext): pass - # Exit a parse tree produced by FuncTestCaseParser#timeInterval. - def exitTimeInterval(self, ctx: FuncTestCaseParser.TimeIntervalContext): + # Enter a parse tree produced by FuncTestCaseParser#literalList. + def enterLiteralList(self, ctx: FuncTestCaseParser.LiteralListContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#literalList. + def exitLiteralList(self, ctx: FuncTestCaseParser.LiteralListContext): pass # Enter a parse tree produced by FuncTestCaseParser#dataType. @@ -504,14 +522,6 @@ def enterTime(self, ctx: FuncTestCaseParser.TimeContext): def exitTime(self, ctx: FuncTestCaseParser.TimeContext): pass - # Enter a parse tree produced by FuncTestCaseParser#intervalDay. - def enterIntervalDay(self, ctx: FuncTestCaseParser.IntervalDayContext): - pass - - # Exit a parse tree produced by FuncTestCaseParser#intervalDay. - def exitIntervalDay(self, ctx: FuncTestCaseParser.IntervalDayContext): - pass - # Enter a parse tree produced by FuncTestCaseParser#intervalYear. def enterIntervalYear(self, ctx: FuncTestCaseParser.IntervalYearContext): pass @@ -592,57 +602,59 @@ def enterIntervalDayType(self, ctx: FuncTestCaseParser.IntervalDayTypeContext): def exitIntervalDayType(self, ctx: FuncTestCaseParser.IntervalDayTypeContext): pass - # Enter a parse tree produced by FuncTestCaseParser#fixedChar. - def enterFixedChar(self, ctx: FuncTestCaseParser.FixedCharContext): + # Enter a parse tree produced by FuncTestCaseParser#fixedCharType. + def enterFixedCharType(self, ctx: FuncTestCaseParser.FixedCharTypeContext): pass - # Exit a parse tree produced by FuncTestCaseParser#fixedChar. - def exitFixedChar(self, ctx: FuncTestCaseParser.FixedCharContext): + # Exit a parse tree produced by FuncTestCaseParser#fixedCharType. + def exitFixedCharType(self, ctx: FuncTestCaseParser.FixedCharTypeContext): pass - # Enter a parse tree produced by FuncTestCaseParser#varChar. - def enterVarChar(self, ctx: FuncTestCaseParser.VarCharContext): + # Enter a parse tree produced by FuncTestCaseParser#varCharType. + def enterVarCharType(self, ctx: FuncTestCaseParser.VarCharTypeContext): pass - # Exit a parse tree produced by FuncTestCaseParser#varChar. - def exitVarChar(self, ctx: FuncTestCaseParser.VarCharContext): + # Exit a parse tree produced by FuncTestCaseParser#varCharType. + def exitVarCharType(self, ctx: FuncTestCaseParser.VarCharTypeContext): pass - # Enter a parse tree produced by FuncTestCaseParser#fixedBinary. - def enterFixedBinary(self, ctx: FuncTestCaseParser.FixedBinaryContext): + # Enter a parse tree produced by FuncTestCaseParser#fixedBinaryType. + def enterFixedBinaryType(self, ctx: FuncTestCaseParser.FixedBinaryTypeContext): pass - # Exit a parse tree produced by FuncTestCaseParser#fixedBinary. - def exitFixedBinary(self, ctx: FuncTestCaseParser.FixedBinaryContext): + # Exit a parse tree produced by FuncTestCaseParser#fixedBinaryType. + def exitFixedBinaryType(self, ctx: FuncTestCaseParser.FixedBinaryTypeContext): pass - # Enter a parse tree produced by FuncTestCaseParser#decimal. - def enterDecimal(self, ctx: FuncTestCaseParser.DecimalContext): + # Enter a parse tree produced by FuncTestCaseParser#decimalType. + def enterDecimalType(self, ctx: FuncTestCaseParser.DecimalTypeContext): pass - # Exit a parse tree produced by FuncTestCaseParser#decimal. - def exitDecimal(self, ctx: FuncTestCaseParser.DecimalContext): + # Exit a parse tree produced by FuncTestCaseParser#decimalType. + def exitDecimalType(self, ctx: FuncTestCaseParser.DecimalTypeContext): pass - # Enter a parse tree produced by FuncTestCaseParser#precisionTimestamp. - def enterPrecisionTimestamp( - self, ctx: FuncTestCaseParser.PrecisionTimestampContext + # Enter a parse tree produced by FuncTestCaseParser#precisionTimestampType. + def enterPrecisionTimestampType( + self, ctx: FuncTestCaseParser.PrecisionTimestampTypeContext ): pass - # Exit a parse tree produced by FuncTestCaseParser#precisionTimestamp. - def exitPrecisionTimestamp(self, ctx: FuncTestCaseParser.PrecisionTimestampContext): + # Exit a parse tree produced by FuncTestCaseParser#precisionTimestampType. + def exitPrecisionTimestampType( + self, ctx: FuncTestCaseParser.PrecisionTimestampTypeContext + ): pass - # Enter a parse tree produced by FuncTestCaseParser#precisionTimestampTZ. - def enterPrecisionTimestampTZ( - self, ctx: FuncTestCaseParser.PrecisionTimestampTZContext + # Enter a parse tree produced by FuncTestCaseParser#precisionTimestampTZType. + def enterPrecisionTimestampTZType( + self, ctx: FuncTestCaseParser.PrecisionTimestampTZTypeContext ): pass - # Exit a parse tree produced by FuncTestCaseParser#precisionTimestampTZ. - def exitPrecisionTimestampTZ( - self, ctx: FuncTestCaseParser.PrecisionTimestampTZContext + # Exit a parse tree produced by FuncTestCaseParser#precisionTimestampTZType. + def exitPrecisionTimestampTZType( + self, ctx: FuncTestCaseParser.PrecisionTimestampTZTypeContext ): pass @@ -678,36 +690,36 @@ def enterSubstraitError(self, ctx: FuncTestCaseParser.SubstraitErrorContext): def exitSubstraitError(self, ctx: FuncTestCaseParser.SubstraitErrorContext): pass - # Enter a parse tree produced by FuncTestCaseParser#func_option. - def enterFunc_option(self, ctx: FuncTestCaseParser.Func_optionContext): + # Enter a parse tree produced by FuncTestCaseParser#funcOption. + def enterFuncOption(self, ctx: FuncTestCaseParser.FuncOptionContext): pass - # Exit a parse tree produced by FuncTestCaseParser#func_option. - def exitFunc_option(self, ctx: FuncTestCaseParser.Func_optionContext): + # Exit a parse tree produced by FuncTestCaseParser#funcOption. + def exitFuncOption(self, ctx: FuncTestCaseParser.FuncOptionContext): pass - # Enter a parse tree produced by FuncTestCaseParser#option_name. - def enterOption_name(self, ctx: FuncTestCaseParser.Option_nameContext): + # Enter a parse tree produced by FuncTestCaseParser#optionName. + def enterOptionName(self, ctx: FuncTestCaseParser.OptionNameContext): pass - # Exit a parse tree produced by FuncTestCaseParser#option_name. - def exitOption_name(self, ctx: FuncTestCaseParser.Option_nameContext): + # Exit a parse tree produced by FuncTestCaseParser#optionName. + def exitOptionName(self, ctx: FuncTestCaseParser.OptionNameContext): pass - # Enter a parse tree produced by FuncTestCaseParser#option_value. - def enterOption_value(self, ctx: FuncTestCaseParser.Option_valueContext): + # Enter a parse tree produced by FuncTestCaseParser#optionValue. + def enterOptionValue(self, ctx: FuncTestCaseParser.OptionValueContext): pass - # Exit a parse tree produced by FuncTestCaseParser#option_value. - def exitOption_value(self, ctx: FuncTestCaseParser.Option_valueContext): + # Exit a parse tree produced by FuncTestCaseParser#optionValue. + def exitOptionValue(self, ctx: FuncTestCaseParser.OptionValueContext): pass - # Enter a parse tree produced by FuncTestCaseParser#func_options. - def enterFunc_options(self, ctx: FuncTestCaseParser.Func_optionsContext): + # Enter a parse tree produced by FuncTestCaseParser#funcOptions. + def enterFuncOptions(self, ctx: FuncTestCaseParser.FuncOptionsContext): pass - # Exit a parse tree produced by FuncTestCaseParser#func_options. - def exitFunc_options(self, ctx: FuncTestCaseParser.Func_optionsContext): + # Exit a parse tree produced by FuncTestCaseParser#funcOptions. + def exitFuncOptions(self, ctx: FuncTestCaseParser.FuncOptionsContext): pass # Enter a parse tree produced by FuncTestCaseParser#nonReserved. diff --git a/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py b/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py index 019e89b57..6ab04af07 100644 --- a/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py +++ b/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py @@ -179,28 +179,36 @@ def visitIntervalYearArg(self, ctx: FuncTestCaseParser.IntervalYearArgContext): def visitIntervalDayArg(self, ctx: FuncTestCaseParser.IntervalDayArgContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#listArg. - def visitListArg(self, ctx: FuncTestCaseParser.ListArgContext): + # Visit a parse tree produced by FuncTestCaseParser#fixedCharArg. + def visitFixedCharArg(self, ctx: FuncTestCaseParser.FixedCharArgContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#literalList. - def visitLiteralList(self, ctx: FuncTestCaseParser.LiteralListContext): + # Visit a parse tree produced by FuncTestCaseParser#varCharArg. + def visitVarCharArg(self, ctx: FuncTestCaseParser.VarCharArgContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#intervalYearLiteral. - def visitIntervalYearLiteral( - self, ctx: FuncTestCaseParser.IntervalYearLiteralContext + # Visit a parse tree produced by FuncTestCaseParser#fixedBinaryArg. + def visitFixedBinaryArg(self, ctx: FuncTestCaseParser.FixedBinaryArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#precisionTimestampArg. + def visitPrecisionTimestampArg( + self, ctx: FuncTestCaseParser.PrecisionTimestampArgContext ): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#intervalDayLiteral. - def visitIntervalDayLiteral( - self, ctx: FuncTestCaseParser.IntervalDayLiteralContext + # Visit a parse tree produced by FuncTestCaseParser#precisionTimestampTZArg. + def visitPrecisionTimestampTZArg( + self, ctx: FuncTestCaseParser.PrecisionTimestampTZArgContext ): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#timeInterval. - def visitTimeInterval(self, ctx: FuncTestCaseParser.TimeIntervalContext): + # Visit a parse tree produced by FuncTestCaseParser#listArg. + def visitListArg(self, ctx: FuncTestCaseParser.ListArgContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#literalList. + def visitLiteralList(self, ctx: FuncTestCaseParser.LiteralListContext): return self.visitChildren(ctx) # Visit a parse tree produced by FuncTestCaseParser#dataType. @@ -259,10 +267,6 @@ def visitDate(self, ctx: FuncTestCaseParser.DateContext): def visitTime(self, ctx: FuncTestCaseParser.TimeContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#intervalDay. - def visitIntervalDay(self, ctx: FuncTestCaseParser.IntervalDayContext): - return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#intervalYear. def visitIntervalYear(self, ctx: FuncTestCaseParser.IntervalYearContext): return self.visitChildren(ctx) @@ -303,31 +307,31 @@ def visitIntervalYearType(self, ctx: FuncTestCaseParser.IntervalYearTypeContext) def visitIntervalDayType(self, ctx: FuncTestCaseParser.IntervalDayTypeContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#fixedChar. - def visitFixedChar(self, ctx: FuncTestCaseParser.FixedCharContext): + # Visit a parse tree produced by FuncTestCaseParser#fixedCharType. + def visitFixedCharType(self, ctx: FuncTestCaseParser.FixedCharTypeContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#varChar. - def visitVarChar(self, ctx: FuncTestCaseParser.VarCharContext): + # Visit a parse tree produced by FuncTestCaseParser#varCharType. + def visitVarCharType(self, ctx: FuncTestCaseParser.VarCharTypeContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#fixedBinary. - def visitFixedBinary(self, ctx: FuncTestCaseParser.FixedBinaryContext): + # Visit a parse tree produced by FuncTestCaseParser#fixedBinaryType. + def visitFixedBinaryType(self, ctx: FuncTestCaseParser.FixedBinaryTypeContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#decimal. - def visitDecimal(self, ctx: FuncTestCaseParser.DecimalContext): + # Visit a parse tree produced by FuncTestCaseParser#decimalType. + def visitDecimalType(self, ctx: FuncTestCaseParser.DecimalTypeContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#precisionTimestamp. - def visitPrecisionTimestamp( - self, ctx: FuncTestCaseParser.PrecisionTimestampContext + # Visit a parse tree produced by FuncTestCaseParser#precisionTimestampType. + def visitPrecisionTimestampType( + self, ctx: FuncTestCaseParser.PrecisionTimestampTypeContext ): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#precisionTimestampTZ. - def visitPrecisionTimestampTZ( - self, ctx: FuncTestCaseParser.PrecisionTimestampTZContext + # Visit a parse tree produced by FuncTestCaseParser#precisionTimestampTZType. + def visitPrecisionTimestampTZType( + self, ctx: FuncTestCaseParser.PrecisionTimestampTZTypeContext ): return self.visitChildren(ctx) @@ -347,20 +351,20 @@ def visitIntegerLiteral(self, ctx: FuncTestCaseParser.IntegerLiteralContext): def visitSubstraitError(self, ctx: FuncTestCaseParser.SubstraitErrorContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#func_option. - def visitFunc_option(self, ctx: FuncTestCaseParser.Func_optionContext): + # Visit a parse tree produced by FuncTestCaseParser#funcOption. + def visitFuncOption(self, ctx: FuncTestCaseParser.FuncOptionContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#option_name. - def visitOption_name(self, ctx: FuncTestCaseParser.Option_nameContext): + # Visit a parse tree produced by FuncTestCaseParser#optionName. + def visitOptionName(self, ctx: FuncTestCaseParser.OptionNameContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#option_value. - def visitOption_value(self, ctx: FuncTestCaseParser.Option_valueContext): + # Visit a parse tree produced by FuncTestCaseParser#optionValue. + def visitOptionValue(self, ctx: FuncTestCaseParser.OptionValueContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#func_options. - def visitFunc_options(self, ctx: FuncTestCaseParser.Func_optionsContext): + # Visit a parse tree produced by FuncTestCaseParser#funcOptions. + def visitFuncOptions(self, ctx: FuncTestCaseParser.FuncOptionsContext): return self.visitChildren(ctx) # Visit a parse tree produced by FuncTestCaseParser#nonReserved. diff --git a/tests/coverage/coverage.py b/tests/coverage/coverage.py index 689a280f6..ebea43273 100755 --- a/tests/coverage/coverage.py +++ b/tests/coverage/coverage.py @@ -62,12 +62,14 @@ def to_dict(self): class TestCoverage: file_coverage: dict[str, FileTestCoverage] test_count: int + num_tests_with_no_matching_function: int num_covered_function_variants: int total_function_variants: int def __init__(self, ext_uris): self.file_coverage = dict() self.test_count = 0 + self.num_tests_with_no_matching_function = 0 self.num_covered_function_variants = 0 self.total_function_variants = 0 for ext_uri in ext_uris: @@ -93,6 +95,7 @@ def to_dict(self): file_coverage.to_dict() for file_coverage in self.file_coverage.values() ], "test_count": self.test_count, + "num_tests_with_no_matching_function": self.num_tests_with_no_matching_function, "num_covered_function_variants": self.num_covered_function_variants, "total_function_variants": self.total_function_variants, } @@ -102,6 +105,7 @@ def to_json(self): def update_test_count(test_case_files: list, function_registry: FunctionRegistry): + num_tests_with_no_matching_function = 0 for test_file in test_case_files: for test_case in test_file.testcases: function_variant = function_registry.get_function( @@ -116,15 +120,20 @@ def update_test_count(test_case_files: list, function_registry: FunctionRegistry f"Return type mismatch in function {test_case.func_name}: " f"{function_variant.return_type} != {test_case.get_return_type()}" ) + num_tests_with_no_matching_function += 1 continue function_variant.increment_test_count() else: error(f"Function not found: {test_case.func_name}({test_case.args})") + num_tests_with_no_matching_function += 1 + return num_tests_with_no_matching_function def get_test_coverage(test_files, function_registry): coverage = TestCoverage(function_registry.get_extension_list()) - update_test_count(test_files, function_registry) + coverage.num_tests_with_no_matching_function = update_test_count( + test_files, function_registry + ) function_registry.fill_coverage(coverage) coverage.compute_coverage() return coverage diff --git a/tests/coverage/test_coverage.py b/tests/coverage/test_coverage.py index 5c1721352..7d9adc66a 100644 --- a/tests/coverage/test_coverage.py +++ b/tests/coverage/test_coverage.py @@ -373,14 +373,16 @@ def test_parse_errors_with_bad_aggregate_testcases(input_func_test, expected_mes "f6(1.1::dec<38,10>, 2.2::dec<38,10>) = 3.3::dec<38,10>", "f7(1.1::dec<38,10>, 2.2::decimal<38,10>) = 3.3::decimal<38,10>", "f8('1991-01-01'::date) = '2001-01-01'::date", - "f8('13:01:01.2345678'::time) = '23:59:59.999'::time", - "f8('1991-01-01T01:02:03.456'::ts, '1991-01-01T00:00:00'::timestamp) = '1991-01-01T22:33:44'::ts", - "f8('1991-01-01T01:02:03.456+05:30'::tstz, '1991-01-01T00:00:00+15:30'::timestamp_tz) = 23::i32", - "f9('1991-01-01'::date, 5::i64) = '1991-01-01T00:00:00+15:30'::timestamp_tz", - "f10('P10Y5M'::interval_year, 5::i64) = 'P15Y5M'::interval_year", - "f10('P10Y5M'::iyear, 5::i64) = 'P15Y5M'::iyear", - "f11('P10DT5H6M7S2000F'::interval_day, 5::i64) = 'P10DT10H6M7S2000F'::interval_day", - "f11('P10DT6M7S2000F'::interval_day, 5::i64) = 'P10DT11M7S2000F'::interval_day", + "f9('13:01:01.2345678'::time) = '23:59:59.999'::time", + "f10('1991-01-01T01:02:03.456'::ts, '1991-01-01T00:00:00'::timestamp) = '1991-01-01T22:33:44'::ts", + "f11('1991-01-01T01:02:03.456+05:30'::tstz, '1991-01-01T00:00:00+15:30'::timestamp_tz) = 23::i32", + "f12('1991-01-01'::date, 5::i64) = '1991-01-01T00:00:00+15:30'::timestamp_tz", + "f13('P10Y5M'::interval_year, 5::i64) = 'P15Y5M'::interval_year", + "f14('P10Y5M'::iyear, 5::i64) = 'P15Y5M'::iyear", + "f15('P10DT5H6M7S2000F'::interval_day<6>, 5::i64) = 'P10DT10H6M7S2000F'::interval_day<6>", + "f16('P10DT6M7S200F'::interval_day<3>, 5::i64) = 'P10DT11M7S200F'::interval_day<3>", + "f16('P10DT6M7S2000F'::iday<4>, 5::i64) = 'P10DT11M7S2000F'::iday<4>", + "f16('P10DT6M7S'::interval_day, 5::i64) = 'P10DT11M7S'::interval_day", "ltrim('abcabcdef'::str, 'abc'::str) [spaces_only:FALSE] = 'def'::str", "concat('abcd'::str, Null::str) [null_handling:ACCEPT_NULLS] = Null::str", "concat('abcd'::str, Null::str) [null_handling:IGNORE_NULLS] = 'abcd'::str", @@ -400,9 +402,34 @@ def test_parse_errors_with_bad_aggregate_testcases(input_func_test, expected_mes "octet_length(''::str) = 0::i64", "octet_length(' '::str) = 1::i64", "octet_length('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'::str) = 48::i64", + "concat('abcd'::varchar<9>, Null::str) [null_handling:ACCEPT_NULLS] = Null::str", + "concat('abcd'::vchar<9>, 'ef'::varchar<9>) = Null::vchar<9>", + "concat('abcd'::vchar<9>, 'ef'::fixedchar<9>) = Null::fchar<9>", + "concat('abcd'::fbin<9>, 'ef'::fixedbinary<9>) = Null::fbin<9>", + "f35('1991-01-01T01:02:03.456'::pts<3>) = '1991-01-01T01:02:30.123123'::precision_timestamp<3>", + "f36('1991-01-01T01:02:03.456'::pts<3>, '1991-01-01T01:02:30.123123'::precision_timestamp<3>) = 123456::i64", + "f37('1991-01-01T01:02:03.123456'::pts<6>, '1991-01-01T04:05:06.456'::precision_timestamp<6>) = 123456::i64", + "f38('1991-01-01T01:02:03.456+05:30'::ptstz<3>) = '1991-01-01T00:00:00+15:30'::precision_timestamp_tz<3>", + "f39('1991-01-01T01:02:03.123456+05:30'::ptstz<6>) = '1991-01-01T00:00:00+15:30'::precision_timestamp_tz<6>", ], ) -def test_parse_various_argument_types(input_func_test): +def test_parse_various_scalar_func_argument_types(input_func_test): + header = make_header("v1.0", "extensions/functions_arithmetic.yaml") + "# basic\n" + test_file = parse_string(header + input_func_test + "\n") + assert len(test_file.testcases) == 1 + + +@pytest.mark.parametrize( + "input_func_test", + [ + "f1((1, 2, 3, 4)::i64) = -7.0::fp32", + "((20, 20), (-3, -3), (1, 1), (10,10), (5,5)) count_start() = 1::fp64", + "((20), (3), (1), (10), (5)) count_start() = 1::fp64", + """DEFINE t1(fp32, fp32) = ((20, 20), (-3, -3), (1, 1), (10,10), (5,5)) + count_star() = 1::fp64""", + ], +) +def test_parse_various_aggregate_scalar_func_argument_types(input_func_test): header = ( make_aggregate_test_header("v1.0", "extensions/functions_arithmetic.yaml") + "# basic\n" diff --git a/tests/coverage/visitor.py b/tests/coverage/visitor.py index a6ae3b155..c7cf7bb64 100644 --- a/tests/coverage/visitor.py +++ b/tests/coverage/visitor.py @@ -73,8 +73,8 @@ def visitTestCase(self, ctx: FuncTestCaseParser.TestCaseContext): args = self.visitArguments(ctx.arguments()) result = self.visitResult(ctx.result()) options = dict() - if ctx.func_options() is not None: - options = self.visitFunc_options(ctx.func_options()) + if ctx.funcOptions() is not None: + options = self.visitFuncOptions(ctx.funcOptions()) return TestCase( func_name=ctx.identifier().getText(), base_uri="", @@ -89,8 +89,8 @@ def visitTestCase(self, ctx: FuncTestCaseParser.TestCaseContext): def visitAggFuncTestCase(self, ctx: FuncTestCaseParser.AggFuncTestCaseContext): testcase = self.visit(ctx.aggFuncCall()) testcase.result = self.visitResult(ctx.result()) - if ctx.func_options() is not None: - testcase.options = self.visitFunc_options(ctx.func_options()) + if ctx.funcOptions() is not None: + testcase.options = self.visitFuncOptions(ctx.funcOptions()) return testcase def visitSingleArgAggregateFuncCall( @@ -112,7 +112,9 @@ def visitCompactAggregateFuncCall( self, ctx: FuncTestCaseParser.CompactAggregateFuncCallContext ): rows = self.visitTableRows(ctx.tableRows()) - args = self.visitAggregateFuncArgs(ctx.aggregateFuncArgs()) + args = [] + if ctx.aggregateFuncArgs() is not None: + args = self.visitAggregateFuncArgs(ctx.aggregateFuncArgs()) return TestCase( func_name=ctx.identifier().getText(), base_uri="", @@ -128,7 +130,11 @@ def visitMultiArgAggregateFuncCall( self, ctx: FuncTestCaseParser.MultiArgAggregateFuncCallContext ): table_name, column_types, rows = self.visitTableData(ctx.tableData()) - args = self.visitQualifiedAggregateFuncArgs(ctx.qualifiedAggregateFuncArgs()) + args = [] + if ctx.qualifiedAggregateFuncArgs() is not None: + args = self.visitQualifiedAggregateFuncArgs( + ctx.qualifiedAggregateFuncArgs() + ) for arg in args: if arg.scalar_value is None: if arg.table_name != table_name: @@ -235,16 +241,16 @@ def visitLiteral(self, ctx: FuncTestCaseParser.LiteralContext): if ctx.NullLiteral() is not None: return ctx.getText(), "null" - def visitFunc_options(self, ctx: FuncTestCaseParser.Func_optionsContext): + def visitFuncOptions(self, ctx: FuncTestCaseParser.FuncOptionsContext): options = {} - for option in ctx.func_option(): - key, value = self.visitFunc_option(option) + for option in ctx.funcOption(): + key, value = self.visitFuncOption(option) options[key] = value return options - def visitFunc_option(self, ctx: FuncTestCaseParser.Func_optionContext): - key = ctx.option_name().getText() - value = ctx.option_value().getText() + def visitFuncOption(self, ctx: FuncTestCaseParser.FuncOptionContext): + key = ctx.optionName().getText() + value = ctx.optionValue().getText() return key, value def visitArguments(self, ctx: FuncTestCaseParser.ArgumentsContext): diff --git a/tests/test_extensions.py b/tests/test_extensions.py index bf0b9f2bc..6a33cad61 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -25,11 +25,17 @@ def test_substrait_extension_coverage(): coverage = get_test_coverage(all_test_files, registry) assert coverage.test_count >= 49 + assert ( + coverage.num_tests_with_no_matching_function == 0 + ), f"{coverage.num_tests_with_no_matching_function} tests with no matching function" assert coverage.num_covered_function_variants >= 18 assert coverage.total_function_variants >= 510 assert ( coverage.total_function_variants - coverage.num_covered_function_variants - ) <= 492 + ) <= 492, ( + f"Coverage gap too large: {coverage.total_function_variants - coverage.num_covered_function_variants} " + f"function variants with no tests, out of {coverage.total_function_variants} total function variants." + ) def test_build_type_to_short_type():