diff --git a/extensions/functions_table_generic.yaml b/extensions/functions_table_generic.yaml new file mode 100644 index 000000000..b8855d23b --- /dev/null +++ b/extensions/functions_table_generic.yaml @@ -0,0 +1,109 @@ +%YAML 1.2 +--- +urn: extension:io.substrait:functions_table_generic +table_functions: + - name: explode + description: >- + Produces one row per array element. + + For each input row, this function generates one output row for each element + in the input array. The output is a struct with a single field 'value' + containing the array element. + + Empty arrays produce zero output rows. For outer semantics (producing a row + with NULL when the array is empty), use GenerateRel's preserve_on_empty option. + impls: + - args: + - name: input + value: list + description: The array to explode. + return: struct + + - name: explode + description: >- + Produces one row per map entry. + + For each input row, this function generates one output row for each key-value + pair in the input map. The output is a struct with two fields: 'key' and 'value'. + Note that map entries may be visited in any order. + + Empty maps produce zero output rows. For outer semantics (producing a row + with NULLs when the map is empty), use GenerateRel's preserve_on_empty option. + + Some systems call this unnest. + impls: + - args: + - name: input + value: map + description: The map to explode. + return: struct + + - name: posexplode + description: >- + Produces one row per array element with position. + + For each input row, this function generates one output row for each element + in the input array. The output is a struct with two fields: + - 'pos': 0-indexed position of the element in the array (i64) + - 'value': the array element + + Empty arrays produce zero output rows. For outer semantics (producing a row + with NULLs when the array is empty), use GenerateRel's preserve_on_empty option. + impls: + - args: + - name: input + value: list + description: The array to explode with positions. + return: struct + + - name: unnest + description: >- + Expands one or more lists into rows by zipping them in parallel (PostgreSQL semantics). + + When multiple lists are provided, produces rows by expanding the lists in parallel, + similar to a zip operation. For example, unnest([1,2], [3,4]) produces rows: (1,3), (2,4). + + If lists have different lengths, shorter lists are padded with NULL values to match + the length of the longest list. + + Empty lists (when all inputs are empty) produce zero output rows. For outer semantics + (producing a row with NULLs when all lists are empty), use GenerateRel's preserve_on_empty option. + impls: + - args: + - name: input + value: list + description: The array to unnest. + return: struct + - args: + - name: input1 + value: list + description: First array to unnest. + - name: input2 + value: list + description: Second array to unnest. + return: struct + - args: + - name: input1 + value: list + description: First array to unnest. + - name: input2 + value: list + description: Second array to unnest. + - name: input3 + value: list + description: Third array to unnest. + return: struct + - args: + - name: input1 + value: list + description: First array to unnest. + - name: input2 + value: list + description: Second array to unnest. + - name: input3 + value: list + description: Third array to unnest. + - name: input4 + value: list + description: Fourth array to unnest. + return: struct diff --git a/grammar/FuncTestCaseLexer.g4 b/grammar/FuncTestCaseLexer.g4 index 2fd0805aa..53508fe6c 100644 --- a/grammar/FuncTestCaseLexer.g4 +++ b/grammar/FuncTestCaseLexer.g4 @@ -11,6 +11,7 @@ Whitespace : [ \t\n\r]+ -> channel(HIDDEN) ; TripleHash: '###'; SubstraitScalarTest: 'SUBSTRAIT_SCALAR_TEST'; SubstraitAggregateTest: 'SUBSTRAIT_AGGREGATE_TEST'; +SubstraitTableTest: 'SUBSTRAIT_TABLE_TEST'; SubstraitInclude: 'SUBSTRAIT_INCLUDE'; SubstraitDependency: 'SUBSTRAIT_DEPENDENCY'; diff --git a/grammar/FuncTestCaseParser.g4 b/grammar/FuncTestCaseParser.g4 index a83552bfa..47795ec91 100644 --- a/grammar/FuncTestCaseParser.g4 +++ b/grammar/FuncTestCaseParser.g4 @@ -7,15 +7,33 @@ options { } doc - : header testGroup+ EOF + : scalarDoc + | aggregateDoc + | tableDoc ; -header - : version include dependency* +scalarDoc + : scalarHeader scalarTestGroup+ EOF ; -version - : TripleHash (SubstraitScalarTest | SubstraitAggregateTest) Colon FormatVersion +aggregateDoc + : aggregateHeader aggregateTestGroup+ EOF + ; + +tableDoc + : tableHeader tableTestGroup+ EOF + ; + +scalarHeader + : TripleHash SubstraitScalarTest Colon FormatVersion include dependency* + ; + +aggregateHeader + : TripleHash SubstraitAggregateTest Colon FormatVersion include dependency* + ; + +tableHeader + : TripleHash SubstraitTableTest Colon FormatVersion include dependency* ; include @@ -34,9 +52,16 @@ testCase : functionName=identifier OParen arguments CParen ( OBracket funcOptions CBracket )? Eq result ; -testGroup - : testGroupDescription? (testCase)+ #scalarFuncTestGroup - | testGroupDescription? (aggFuncTestCase)+ #aggregateFuncTestGroup +scalarTestGroup + : testGroupDescription? testCase+ + ; + +aggregateTestGroup + : testGroupDescription? aggFuncTestCase+ + ; + +tableTestGroup + : testGroupDescription? tableFuncTestCase+ ; arguments @@ -76,6 +101,18 @@ aggFuncTestCase : aggFuncCall ( OBracket funcOptions CBracket )? Eq result ; +tableFuncTestCase + : functionName=identifier OParen arguments CParen ( OBracket funcOptions CBracket )? Eq multiRowResult + ; + +multiRowResult + : OBracket (rowTuple (Comma rowTuple)*)? CBracket DoubleColon structType + ; + +rowTuple + : OParen (literal (Comma literal)*)? CParen + ; + aggFuncCall : tableData funcName=identifier OParen qualifiedAggregateFuncArgs? CParen #multiArgAggregateFuncCall | tableRows functName=identifier OParen aggregateFuncArgs? CParen #compactAggregateFuncCall @@ -344,12 +381,16 @@ parameterizedType | precisionTimestampType | precisionTimestampTZType | funcType + | structType // TODO implement the rest of the parameterized types -// | Struct isnull='?'? Lt expr (Comma expr)* Gt #struct // | NStruct isnull='?'? Lt Identifier expr (Comma Identifier expr)* Gt #nStruct // | Map isnull='?'? Lt key=expr Comma value=expr Gt #map ; +structType + : Struct isnull=QMark? OAngleBracket dataType (Comma dataType)* CAngleBracket + ; + numericParameter : IntegerLiteral #integerLiteral ; diff --git a/proto/substrait/algebra.proto b/proto/substrait/algebra.proto index 95889db0a..ea0c98224 100644 --- a/proto/substrait/algebra.proto +++ b/proto/substrait/algebra.proto @@ -556,6 +556,41 @@ message ExpandRel { } } +// The Generate operator applies a table function to produce zero or more output +// rows for each input row. This operation is used to flatten or "explode" nested +// data structures like arrays and maps into separate rows, similar to SQL's +// LATERAL VIEW EXPLODE or UNNEST operations. +message GenerateRel { + RelCommon common = 1; + + // The input relation to generate from. Each input row will produce zero or + // more output rows based on the generator table function. + Rel input = 2; + + // The table expression to apply to each input row. This produces zero + // or more rows per input row. The output_type defines the schema + // of the generated columns, which are appended to the input schema. + // + // Required. + TableExpression generator = 3; + + // Controls behavior when the generator produces zero rows for an input record. + // + // When false (default): + // Input rows that produce zero output rows are excluded from the result. + // + // When true: + // Input rows that produce zero output rows still generate one output row + // with the input fields populated and the generator output fields set to NULL. + // This is equivalent to Spark's "LATERAL VIEW OUTER" or can be achieved in + // standard SQL via LEFT JOIN LATERAL. + // + // Optional; defaults to false. + bool preserve_on_empty = 4; + + substrait.extensions.AdvancedExtension advanced_extension = 10; +} + // A relation with output field names. // // This is for use at the root of a `Rel` tree. @@ -585,6 +620,7 @@ message Rel { WriteRel write = 19; DdlRel ddl = 20; UpdateRel update = 22; + GenerateRel generate = 23; // Physical relations HashJoinRel hash_join = 13; MergeJoinRel merge_join = 14; @@ -1690,6 +1726,54 @@ message Expression { } } +// TableExpression represents expressions that produce zero or more rows, +// as opposed to Expression which produces a single scalar value. +// Table expressions are used in relational contexts where multi-row output +// is expected (e.g., GenerateRel for lateral views and unnest operations). +// +// Since they have different cardinality than Expression expressions, +// TableExpression expressions cannot be composed with other expressions. +message TableExpression { + oneof table_expr_type { + TableFunction table_function = 1; + } + + // A table function call that produces zero or more rows per invocation. + // Table functions are similar to scalar functions but produce multiple output rows + // instead of a single scalar value. They are commonly used with the GenerateRel + // operator to flatten nested data structures like arrays and maps. + message TableFunction { + // Points to a function_anchor defined in this plan, which must refer + // to a table function in the associated YAML file. Table functions are + // distinguished from scalar functions by their ability to produce multiple + // output rows. Required; 0 is a valid anchor/reference. + uint32 function_reference = 1; + + // The arguments to be bound to the table function. This must have exactly the + // number of arguments specified in the function definition, and the argument + // types must match: + // + // - Value arguments must be bound using FunctionArgument.value + // - Type arguments must be bound using FunctionArgument.type + // - Enum arguments must be bound using FunctionArgument.enum + // + // For table functions, arguments typically reference fields from the input + // relation that contain nested data (arrays, maps, etc.) to be exploded. + repeated FunctionArgument arguments = 2; + + // Options to specify behavior for corner cases (e.g., handling malformed data, + // ordering within generated rows, deduplication). + repeated FunctionOption options = 3; + + // Must be set to the output type of the table function. For table functions, + // this must be a Struct type where each field represents a column in the + // generated output rows. + // + // Required. + Type output_type = 4; + } +} + // Expression that represents a dynamic parameter. // Dynamic parameters are identified by a surrogate key within a plan. message DynamicParameter { diff --git a/site/docs/expressions/table_functions.md b/site/docs/expressions/table_functions.md index b5ab3c5fa..859d5c255 100644 --- a/site/docs/expressions/table_functions.md +++ b/site/docs/expressions/table_functions.md @@ -1,8 +1,154 @@ # Table Functions -Table functions produce zero or more records for each input record. Table functions use a signature similar to scalar functions. However, they are not allowed in the same contexts. +Table functions produce zero or more records for each input record. Unlike scalar functions that return a single value, table functions return a set of rows, making them useful for operations that "explode" or "generate" data from nested structures. +## Overview +Table functions are similar to scalar functions in their definition and reference mechanism, but differ fundamentally in their output: -to be completed... +- **Scalar functions:** Produce exactly one value per input row +- **Window functions:** Produce one value per input row (with access to window of rows) +- **Aggregate functions:** Produce one value per group of input rows +- **Table functions:** Produce zero or more rows per input record + +## TableFunction Message + +The `TableFunction` message is used to invoke table functions within relational operators (primarily `GenerateRel`). + +| Field | Type | Description | Required | +|-------|------|-------------|----------| +| function_reference | uint32 | Points to a function_anchor in the plan that references a table function in the extension YAML. 0 is a valid anchor/reference. | Required | +| arguments | repeated FunctionArgument | Arguments bound to the table function (value, type, or enum arguments) | Required | +| options | repeated FunctionOption | Behavior options for corner cases | Optional | +| output_type | Type | The output type of the table function (must be a Struct type where each field is a generated column) | Required | + +### Output Type + +The `output_type` field must be a non-nullable `Struct` type where each field represents a column in the generated output rows. This explicitly defines the schema of rows produced by the table function. + +**Examples:** +- `explode(array)` → `Struct{value: i32}` +- `posexplode(array)` → `Struct{pos: i64, value: string}` +- `explode(map)` → `Struct{key: string, value: i32}` + +### Arguments + +Table function arguments work the same way as scalar function arguments: + +- **Value arguments:** Use `FunctionArgument.value` with an expression +- **Type arguments:** Use `FunctionArgument.type` +- **Enum arguments:** Use `FunctionArgument.enum` + +For table functions, value arguments typically reference fields containing nested data (arrays, maps, structs) that will be exploded or flattened. + +## Common Table Functions + +While specific table functions are defined in extension YAML files, common table functions include: + +### Array Functions + +| Function | Signature | Output | Description | +|----------|-----------|--------|-------------| +| `explode` | `array` → `Struct{value: T}` | One row per array element | Flattens an array by producing one output row per element | +| `posexplode` | `array` → `Struct{pos: i64, value: T}` | One row per array element with position | Like explode but includes 0-indexed position | +| `unnest` | `array` → `Struct{value: T}` | One row per array element | Standard SQL synonym for explode | + +### Map Functions + +| Function | Signature | Output | Description | +|----------|-----------|--------|-------------| +| `explode` | `map` → `Struct{key: K, value: V}` | One row per map entry | Flattens a map by producing one output row per key-value pair | + +### Other Table Functions + +Table functions can also be used for: + +- **JSON parsing:** Extract multiple fields from JSON strings into structured rows +- **String splitting:** Split delimited strings into multiple rows +- **Sequence generation:** Generate arithmetic or date sequences +- **Regex extraction:** Extract multiple matches from text + +### Examples + +**Simple Array Explode:** +```protobuf +--8<-- "examples/proto-textformat/table_function/simple_explode.textproto" +``` + +**Position Explode:** +```protobuf +--8<-- "examples/proto-textformat/table_function/posexplode.textproto" +``` + +## Usage in Relations + +Table functions are primarily used within the `GenerateRel` operator, which applies a table function to each row of an input relation. + +**Example:** +``` +Input Relation: users {user_id: i64, tags: array} +Table Function: explode(tags) → Struct{tag: string} +Output Relation: {user_id: i64, tags: array, tag: string} + +Input data: + {user_id: 1, tags: ['python', 'rust']} + {user_id: 2, tags: ['java']} + +Output data: + {user_id: 1, tags: ['python', 'rust'], tag: 'python'} + {user_id: 1, tags: ['python', 'rust'], tag: 'rust'} + {user_id: 2, tags: ['java'], tag: 'java'} +``` + +**Protobuf Example:** +```protobuf +--8<-- "examples/proto-textformat/table_function/generate_rel_explode.textproto" +``` + +See the [Generate Operation](../relations/logical_relations.md#generate-operation) documentation for more details. + +## Differences from Other Function Types + +| Aspect | Scalar Function | Window Function | Aggregate Function | Table Function | +|--------|----------------|-----------------|-------------------|----------------| +| **Invocation context** | Expressions (ProjectRel) | Window expressions (WindowRel) | Aggregate expressions (AggregateRel) | Relational operators (GenerateRel) | +| **Input scope** | Single row | Window of rows | Group of rows | Single row | +| **Output cardinality** | Exactly 1 value | Exactly 1 value | Exactly 1 value | 0 or more rows | +| **Output type** | Scalar type | Scalar type | Scalar type | Struct type | +| **Can appear in Expression** | Yes | Yes (WindowFunction) | No | No | + +## Extension Mechanism + +Table functions are defined in extension YAML files using the same mechanism as scalar functions, but with special semantics: + +- Must specify output type as a struct +- Must be marked as table-valued in function metadata +- Can only be referenced from relational operators (not expressions) + +Example function registration (conceptual): +```yaml +table_functions: + - name: explode + impls: + - args: + - name: input + value: list + return: struct + description: "Produces one row per array element" +``` + +=== "TableFunction Message" + + ```proto +%%% proto.algebra.TableExpression.TableFunction %%% + ``` + +## Future Extensions + +Potential future enhancements to table functions: + +1. **Cardinality hints:** Allow functions to hint at expected output cardinality for optimization +2. **Ordering guarantees:** Define whether table functions preserve or define ordering of generated rows +3. **Parameterized behavior:** Support options for controlling generation behavior (e.g., include_nulls, deduplicate) +4. **User-defined table functions:** Support for user-defined table functions via embedded functions (Python, WebAssembly) diff --git a/site/docs/relations/logical_relations.md b/site/docs/relations/logical_relations.md index a6b0990aa..596659273 100644 --- a/site/docs/relations/logical_relations.md +++ b/site/docs/relations/logical_relations.md @@ -559,3 +559,105 @@ The operator that defines modifications of a database schema (CREATE/DROP/ALTER ???+ question "Discussion Points" * How should correlated operations be handled? + +## Generate Operation + +The Generate operation applies a table function to each input row to produce zero or more output rows. This is commonly used to flatten or "explode" nested data structures like arrays and maps into separate rows. + +Unlike ExpandRel which duplicates input rows a fixed number of times known at plan time, GenerateRel produces a variable number of output rows that depends on the actual data values (e.g., the length of an array or number of entries in a map). + +### Common Use Cases + +- **Flattening arrays:** Turn one row with array [a,b,c] into three rows +- **Exploding maps:** Turn one row with map {k1:v1, k2:v2} into two rows +- **Position-indexed explode:** Generate (position, value) pairs from arrays +- **JSON parsing:** Extract multiple fields from JSON strings + +| Signature | Value | +|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Inputs | 1 | +| Outputs | 1 | +| Property Maintenance | Distribution and orderedness are not maintained. The variable number of output rows per input breaks distribution properties, and row multiplication breaks ordering. | +| Direct Output Order | Input fields followed by generated fields. The output schema is: `[input_field_1, ..., input_field_N, generated_field_1, ..., generated_field_M]` where generated fields come from the table function's output type. Unlike ExpandRel which appends an i32 ordinal column, GenerateRel does NOT automatically add an ordinal column. Table functions that need position information (like posexplode) include it explicitly in their output_type. The RelCommon.emit field can be used to reorder columns or project out unwanted fields. | + +### Generate Properties + +| Property | Description | Required | +| -------- | ----------- | -------- | +| Input | The input relation to generate from. | Required | +| Generator | A table function that produces zero or more rows per input row. The function's output type (a Struct) defines the schema of generated columns. | Required | +| Preserve On Empty | Controls behavior when the generator produces zero rows. When false (default), rows with empty generation are filtered out. When true, rows with empty generation produce one output row with NULL generated fields. | Optional, defaults to false | + +### Common Table Functions + +| Function | Input Type | Output Struct | Description | +|----------|-----------|---------------|-------------| +| `explode` | `array` | `{value: T}` | Produces one output row per array element | +| `explode` | `map` | `{key: K, value: V}` | Produces one output row per map entry | +| `posexplode` | `array` | `{pos: i64, value: T}` | Produces one row per array element with its position (0-indexed) | + +### Empty Collection Handling + +The `preserve_on_empty` flag controls what happens when a table function produces no rows for an input record: + +- **preserve_on_empty=false (default):** Input rows that generate no output rows are excluded from the result. This is the standard "explode" or "unnest" behavior. +- **preserve_on_empty=true:** Input rows that generate no output rows still produce one output row with input fields populated and generated fields set to NULL. This matches Spark's "LATERAL VIEW OUTER" or standard SQL's "LEFT JOIN LATERAL unnest()". + +**Example:** +``` +Input row: {user_id: 1, tags: []} (empty array) + +With preserve_on_empty=false: + Output: (no rows - filtered out) + +With preserve_on_empty=true: + Output: {user_id: 1, tags: [], tag: NULL} +``` + +### Examples + +**Array Explode:** +``` +Input schema: {user_id: i64, tags: list} +Generator: explode(tags) -> Struct{tag: string} +Output schema: {user_id: i64, tags: list, tag: string} + +Input data: + {user_id: 1, tags: ['a', 'b']} + {user_id: 2, tags: ['x']} + +Output data: + {user_id: 1, tags: ['a', 'b'], tag: 'a'} + {user_id: 1, tags: ['a', 'b'], tag: 'b'} + {user_id: 2, tags: ['x'], tag: 'x'} +``` + +**Position Explode:** +``` +Input schema: {line_id: i32, words: list} +Generator: posexplode(words) -> Struct{pos: i64, word: string} +Output schema: {line_id: i32, words: list, pos: i64, word: string} +``` + +**Map Explode:** +``` +Input schema: {user_id: i64, properties: map} +Generator: explode(properties) -> Struct{key: string, value: string} +Output schema: {user_id: i64, properties: map, key: string, value: string} +``` + +### Comparison to ExpandRel + +| Aspect | ExpandRel | GenerateRel | +|--------|-----------|-------------| +| Purpose | Duplicate rows for grouping sets/cube operations | Flatten nested data (arrays/maps) | +| Output Cardinality | Fixed at plan time (N duplicates per input) | Variable at runtime (depends on data) | +| Use Case | SQL GROUPING SETS, CUBE, ROLLUP | SQL LATERAL VIEW, UNNEST, EXPLODE | +| Extra Column | Appends i32 ordinal (which duplicate) | No automatic ordinal (posexplode includes position explicitly) | +| Property Maintenance | Can maintain distribution under certain conditions | Cannot maintain distribution (variable cardinality) | + +=== "GenerateRel Message" + + ```proto +%%% proto.algebra.GenerateRel %%% + ``` diff --git a/site/examples/proto-textformat/table_function/generate_rel_explode.textproto b/site/examples/proto-textformat/table_function/generate_rel_explode.textproto new file mode 100644 index 000000000..3dff9a54d --- /dev/null +++ b/site/examples/proto-textformat/table_function/generate_rel_explode.textproto @@ -0,0 +1,76 @@ +# Example GenerateRel using explode to flatten an array field +# Input: {user_id: i64, tags: list} +# Output: {user_id: i64, tags: list, value: string} +# +# message GenerateRel + +common: { + direct: {} +} + +input: { + # Input relation (e.g., a read or project) + read: { + base_schema: { + names: ["user_id", "tags"] + struct: { + types: [ + { + i64: { + nullability: NULLABILITY_REQUIRED + } + }, + { + list: { + type: { + string: { + nullability: NULLABILITY_NULLABLE + } + } + nullability: NULLABILITY_NULLABLE + } + } + ] + nullability: NULLABILITY_REQUIRED + } + } + # ... (rest of read definition omitted for brevity) + } +} + +generator: { + table_function: { + function_reference: 1 # Reference to explode function + + arguments: [ + { + # Explode the 'tags' field (field 1 of input) + value: { + selection: { + direct_reference: { + struct_field: { + field: 1 + } + } + } + } + } + ] + + output_type: { + struct: { + types: [ + { + # Output field: value + string: { + nullability: NULLABILITY_NULLABLE + } + } + ] + nullability: NULLABILITY_REQUIRED + } + } + } +} + +preserve_on_empty: false # Default: filter out rows with empty arrays diff --git a/site/examples/proto-textformat/table_function/posexplode.textproto b/site/examples/proto-textformat/table_function/posexplode.textproto new file mode 100644 index 000000000..2e3262d62 --- /dev/null +++ b/site/examples/proto-textformat/table_function/posexplode.textproto @@ -0,0 +1,41 @@ +# Represents: posexplode(words_array) +# Produces one row per array element with 'pos' and 'value' fields +# +# message TableExpression.TableFunction + +function_reference: 2 # Reference to posexplode function in extension + +arguments: [ + { + # Input: array field to explode + value: { + selection: { + direct_reference: { + struct_field: { + field: 1 # Assuming field 1 is the words array + } + } + } + } + } +] + +output_type: { + struct: { + types: [ + { + # Field 0: pos (0-indexed position) + i64: { + nullability: NULLABILITY_REQUIRED + } + }, + { + # Field 1: value (type matches array element type) + string: { + nullability: NULLABILITY_NULLABLE + } + } + ] + nullability: NULLABILITY_REQUIRED + } +} diff --git a/site/examples/proto-textformat/table_function/simple_explode.textproto b/site/examples/proto-textformat/table_function/simple_explode.textproto new file mode 100644 index 000000000..ab632675a --- /dev/null +++ b/site/examples/proto-textformat/table_function/simple_explode.textproto @@ -0,0 +1,35 @@ +# Represents: explode(tags_array) +# Produces one row per array element with a single 'value' field +# +# message TableExpression.TableFunction + +function_reference: 1 # Reference to explode function in extension + +arguments: [ + { + # Input: array field to explode + value: { + selection: { + direct_reference: { + struct_field: { + field: 2 # Assuming field 2 is the tags array + } + } + } + } + } +] + +output_type: { + struct: { + types: [ + { + # Field 0: value (type matches array element type) + string: { + nullability: NULLABILITY_NULLABLE + } + } + ] + nullability: NULLABILITY_REQUIRED + } +} diff --git a/tests/README.md b/tests/README.md index 510e2cabf..c24c8634a 100644 --- a/tests/README.md +++ b/tests/README.md @@ -6,7 +6,7 @@ Validates protobuf textformat examples in `site/examples/proto-textformat/`. ## Substrait Test Format -This document describes the format for Substrait scalar test files. +This document describes the format for Substrait test files (scalar, aggregate, and table function tests). A test file consists of the following elements: 1. Version declaration @@ -18,7 +18,7 @@ A test file consists of the following elements: ### Version Declaration The version declaration must appear as the first line of the file. It defines the type of tests in the file and test file format version. -Each test file must exclusively contain either scalar tests or aggregate tests. Mixing test types in the same file is not allowed. +Each test file must exclusively contain one type of test (scalar, aggregate, or table). Mixing test types in the same file is not allowed. The version declaration should follow this format: ```code ### SUBSTRAIT_SCALAR_TEST: V1 @@ -28,6 +28,11 @@ or ```code ### SUBSTRAIT_AGGREGATE_TEST: V1 ``` +or + +```code +### SUBSTRAIT_TABLE_TEST: V1 +``` ### Include Statement The include statement specifies the extension file being tested. Each test file must have exactly one include statement. This identifies which extension's functions are being tested and counted for coverage purposes. @@ -89,6 +94,34 @@ A testcase with mixed arguments ((20), (-3), (1), (10)) LIST_AGG(col0::fp32, ','::string) = 1::fp64 ``` +### Table Function Test Cases +Table function tests are used to test functions that return multiple rows (table-valued functions) such as `explode`, `posexplode`, and `unnest`. + +A test case consists of the following elements: + +- **function**: The name of the table function being tested. +- **arguments**: Comma-separated list of arguments to the function. Arguments are typically list literals. +- **result**: A list of struct values representing the expected output rows. Each struct represents one row of output. + +```code +explode([1, 2, 3]::list) = [(1), (2), (3)]::struct +``` + +Table functions can return multiple columns per row: +```code +posexplode([10, 20, 30]::list) = [(0, 10), (1, 20), (2, 30)]::struct +``` + +Table functions can also take multiple arguments: +```code +unnest([1, 2]::list, ['a', 'b']::list) = [(1, 'a'), (2, 'b')]::struct +``` + +Empty input produces empty output: +```code +explode([]::list) = []::struct +``` + ### Spec ``` @@ -241,3 +274,22 @@ In this example: - We are testing `functions_list.yaml` (specifically the `transform` function) - We need `functions_arithmetic.yaml` as a dependency because the lambda expressions use `multiply` and `add` from that extension - Test coverage counts towards `functions_list.yaml`, not `functions_arithmetic.yaml` + +### Example of a test file for table functions + +```code +### SUBSTRAIT_TABLE_TEST: v1.0 +### SUBSTRAIT_INCLUDE: '/extensions/functions_table_generic.yaml' + +# basic_int: Basic integer array explosion +explode([1, 2, 3]::list) = [(1), (2), (3)]::struct + +# empty: Empty arrays produce zero rows +explode([]::list) = []::struct + +# posexplode: Returns position and value +posexplode([10, 20, 30]::list) = [(0, 10), (1, 20), (2, 30)]::struct + +# unnest_multi: Unnest multiple lists together +unnest([1, 2]::list, ['a', 'b']::list) = [(1, 'a'), (2, 'b')]::struct +``` diff --git a/tests/baseline.json b/tests/baseline.json index 13e7fc08f..d95b2cb61 100644 --- a/tests/baseline.json +++ b/tests/baseline.json @@ -1,16 +1,17 @@ { "registry": { - "extension_count": 15, - "dependency_count": 15, - "function_count": 170, + "extension_count": 16, + "dependency_count": 16, + "function_count": 173, "num_aggregate_functions": 29, "num_scalar_functions": 166, "num_window_functions": 11, - "num_function_overloads": 529 + "num_table_functions": 4, + "num_function_overloads": 536 }, "coverage": { - "total_test_count": 1136, - "num_function_variants": 529, - "num_covered_function_variants": 241 + "total_test_count": 1158, + "num_function_variants": 536, + "num_covered_function_variants": 247 } } diff --git a/tests/baseline.py b/tests/baseline.py index 135069e7f..cc178465d 100644 --- a/tests/baseline.py +++ b/tests/baseline.py @@ -15,6 +15,7 @@ class Registry: num_aggregate_functions: int num_scalar_functions: int num_window_functions: int + num_table_functions: int num_function_overloads: int @@ -74,6 +75,10 @@ def validate_against(self, expected): errors.append( f"Window function count mismatch: expected {expected.registry.num_window_functions}, got {self.registry.num_window_functions}" ) + if self.registry.num_table_functions < expected.registry.num_table_functions: + errors.append( + f"Table function count mismatch: expected {expected.registry.num_table_functions}, got {self.registry.num_table_functions}" + ) if ( self.registry.num_function_overloads < expected.registry.num_function_overloads @@ -127,6 +132,7 @@ def generate_baseline(registry: FunctionRegistry, coverage: TestCoverage): num_aggregate_functions=len(registry.aggregate_functions), num_scalar_functions=len(registry.scalar_functions), num_window_functions=len(registry.window_functions), + num_table_functions=len(registry.table_functions), num_function_overloads=sum([len(f) for f in registry.registry.values()]), ) test_coverage_data = Coverage( diff --git a/tests/cases/table_generic/explode_array.test b/tests/cases/table_generic/explode_array.test new file mode 100644 index 000000000..3b179b79b --- /dev/null +++ b/tests/cases/table_generic/explode_array.test @@ -0,0 +1,20 @@ +### SUBSTRAIT_TABLE_TEST: v1.0 +### SUBSTRAIT_INCLUDE: '/extensions/functions_table_generic.yaml' + +# basic_int: Basic integer array explosion +explode([1, 2, 3]::list) = [(1), (2), (3)]::struct + +# basic_string: Basic string array explosion +explode(['a', 'b', 'c']::list) = [('a'), ('b'), ('c')]::struct + +# empty: Empty arrays produce zero rows +explode([]::list) = []::struct + +# single_element: Single element arrays +explode([42]::list) = [(42)]::struct + +# two_elements: Two element arrays +explode([10, 20]::list) = [(10), (20)]::struct + +# large_array: Larger array +explode([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]::list) = [(1), (2), (3), (4), (5), (6), (7), (8), (9), (10)]::struct diff --git a/tests/cases/table_generic/posexplode.test b/tests/cases/table_generic/posexplode.test new file mode 100644 index 000000000..d36578bdd --- /dev/null +++ b/tests/cases/table_generic/posexplode.test @@ -0,0 +1,17 @@ +### SUBSTRAIT_TABLE_TEST: v1.0 +### SUBSTRAIT_INCLUDE: '/extensions/functions_table_generic.yaml' + +# basic_int: Basic integer array with positions +posexplode([10, 20, 30]::list) = [(0, 10), (1, 20), (2, 30)]::struct + +# basic_string: Basic string array with positions +posexplode(['a', 'b', 'c']::list) = [(0, 'a'), (1, 'b'), (2, 'c')]::struct + +# empty: Empty arrays produce zero rows +posexplode([]::list) = []::struct + +# single_element: Single element arrays start at position 0 +posexplode([42]::list) = [(0, 42)]::struct + +# two_elements: Two element arrays +posexplode([100, 200]::list) = [(0, 100), (1, 200)]::struct diff --git a/tests/cases/table_generic/unnest.test b/tests/cases/table_generic/unnest.test new file mode 100644 index 000000000..6db6089c6 --- /dev/null +++ b/tests/cases/table_generic/unnest.test @@ -0,0 +1,23 @@ +### SUBSTRAIT_TABLE_TEST: v1.0 +### SUBSTRAIT_INCLUDE: '/extensions/functions_table_generic.yaml' + +# single_list_int: Single list unnest (same as explode) +unnest([1, 2, 3]::list) = [(1), (2), (3)]::struct + +# single_list_string: Single list unnest with strings +unnest(['a', 'b']::list) = [('a'), ('b')]::struct + +# single_list_empty: Empty list produces zero rows +unnest([]::list) = []::struct + +# two_lists_same_length: Zip two lists of same length +unnest([1, 2, 3]::list, [4, 5, 6]::list) = [(1, 4), (2, 5), (3, 6)]::struct + +# two_lists_different_types: Zip lists of different types +unnest([1, 2]::list, ['a', 'b']::list) = [(1, 'a'), (2, 'b')]::struct + +# three_lists: Zip three lists +unnest([1, 2]::list, [3, 4]::list, [5, 6]::list) = [(1, 3, 5), (2, 4, 6)]::struct + +# four_lists: Zip four lists +unnest([1, 2]::list, [3, 4]::list, [5, 6]::list, [7, 8]::list) = [(1, 3, 5, 7), (2, 4, 6, 8)]::struct diff --git a/tests/coverage/antlr_parser/FuncTestCaseLexer.py b/tests/coverage/antlr_parser/FuncTestCaseLexer.py index 14ad63dfc..704c23a26 100644 --- a/tests/coverage/antlr_parser/FuncTestCaseLexer.py +++ b/tests/coverage/antlr_parser/FuncTestCaseLexer.py @@ -11,7 +11,7 @@ def serializedATN(): return [ - 4,0,125,1248,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7, + 4,0,126,1271,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7, 5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12, 2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19, 7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25, @@ -32,438 +32,446 @@ def serializedATN(): 7,114,2,115,7,115,2,116,7,116,2,117,7,117,2,118,7,118,2,119,7,119, 2,120,7,120,2,121,7,121,2,122,7,122,2,123,7,123,2,124,7,124,2,125, 7,125,2,126,7,126,2,127,7,127,2,128,7,128,2,129,7,129,2,130,7,130, - 1,0,4,0,265,8,0,11,0,12,0,266,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,2,1, - 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, - 2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1, - 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1, - 4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1, - 5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1, - 5,1,5,1,5,1,5,1,6,1,6,4,6,363,8,6,11,6,12,6,364,1,6,1,6,4,6,369, - 8,6,11,6,12,6,370,3,6,373,8,6,1,7,1,7,1,7,1,7,5,7,379,8,7,10,7,12, - 7,382,9,7,1,7,3,7,385,8,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1, - 9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10, - 1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11, - 1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13, - 1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14, - 1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16, - 1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19, - 1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20, - 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,21, - 1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22, - 1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,23,3,23,536,8,23,1,23,1,23, - 1,24,3,24,541,8,24,1,24,4,24,544,8,24,11,24,12,24,545,1,24,1,24, - 4,24,550,8,24,11,24,12,24,551,3,24,554,8,24,1,25,3,25,557,8,25,1, - 25,4,25,560,8,25,11,25,12,25,561,1,25,1,25,5,25,566,8,25,10,25,12, - 25,569,9,25,3,25,571,8,25,1,25,1,25,3,25,575,8,25,1,25,4,25,578, - 8,25,11,25,12,25,579,3,25,582,8,25,1,25,3,25,585,8,25,1,25,1,25, - 1,25,1,25,1,25,1,25,1,25,3,25,594,8,25,1,26,1,26,1,26,1,26,1,26, - 1,26,1,26,1,26,1,26,3,26,605,8,26,1,27,1,27,1,27,1,27,1,27,1,28, - 1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, - 1,29,1,29,1,29,4,29,629,8,29,11,29,12,29,630,3,29,633,8,29,1,29, - 1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, - 1,30,1,30,1,30,1,30,1,30,1,30,4,30,655,8,30,11,30,12,30,656,3,30, - 659,8,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,4,31, - 671,8,31,11,31,12,31,672,3,31,675,8,31,1,31,1,31,1,32,1,32,1,32, - 1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,36,1,36, - 1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,1,42,1,42,1,43, - 1,43,1,43,1,43,1,43,1,43,1,43,3,43,714,8,43,1,43,1,43,1,43,1,43, - 1,43,1,43,1,43,1,43,3,43,724,8,43,1,44,1,44,1,44,1,44,1,44,1,44, - 1,44,3,44,733,8,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44, - 743,8,44,1,45,1,45,1,45,1,45,1,45,3,45,750,8,45,1,45,1,45,1,45,3, - 45,755,8,45,1,45,1,45,1,45,1,45,1,45,3,45,762,8,45,1,45,1,45,1,45, - 3,45,767,8,45,1,46,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,47, - 1,47,5,47,780,8,47,10,47,12,47,783,9,47,1,47,1,47,1,48,1,48,1,48, - 1,48,1,48,1,48,1,49,1,49,1,49,1,49,5,49,797,8,49,10,49,12,49,800, - 9,49,1,49,1,49,1,50,1,50,1,50,1,50,1,50,4,50,809,8,50,11,50,12,50, - 810,1,50,3,50,814,8,50,1,50,5,50,817,8,50,10,50,12,50,820,9,50,1, - 50,1,50,1,50,1,50,1,50,1,51,1,51,1,52,1,52,1,52,1,53,1,53,1,53,1, - 53,1,53,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,56,1, - 56,1,56,1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,58,1,58,1,58,1, - 58,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1, - 61,1,62,1,62,1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1, - 64,1,64,1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1, - 65,1,65,1,65,1,65,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1, - 66,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,1, - 68,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, - 69,1,69,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, - 70,1,70,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,72,1, - 72,1,72,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1, - 73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1, - 74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1, - 75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1, - 75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1, - 76,1,76,1,76,1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1, - 78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1, - 79,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1, - 80,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,83,1,83,1,83,1, - 84,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85,1,86,1,86,1,86,1,86,1, - 86,1,87,1,87,1,87,1,88,1,88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1, - 89,1,89,1,90,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,92,1,92,1, - 92,1,93,1,93,1,93,1,93,1,94,1,94,1,94,1,94,1,94,1,94,1,95,1,95,1, - 95,1,95,1,95,1,95,1,96,1,96,1,96,1,96,1,96,1,96,1,97,1,97,1,97,1, - 97,1,97,1,98,1,98,1,98,1,98,1,99,1,99,1,99,1,100,1,100,1,100,1,101, - 1,101,1,102,1,102,1,103,1,103,1,104,1,104,1,105,1,105,1,106,1,106, - 1,107,1,107,1,107,1,108,1,108,1,108,1,109,1,109,1,109,1,110,1,110, - 1,111,1,111,1,112,1,112,1,113,1,113,1,114,1,114,1,115,1,115,1,116, - 1,116,1,117,1,117,1,118,1,118,1,119,1,119,1,120,1,120,1,121,1,121, - 1,122,1,122,1,122,1,122,1,123,1,123,1,123,1,124,1,124,1,124,1,125, - 1,125,1,125,1,126,1,126,5,126,1219,8,126,10,126,12,126,1222,9,126, - 1,126,3,126,1225,8,126,1,127,1,127,1,128,3,128,1230,8,128,1,128, - 1,128,1,129,1,129,1,129,5,129,1237,8,129,10,129,12,129,1240,9,129, - 1,130,1,130,3,130,1244,8,130,1,130,3,130,1247,8,130,0,0,131,1,1, - 3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14, - 29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25, - 51,26,53,27,55,0,57,0,59,28,61,29,63,30,65,31,67,32,69,33,71,34, - 73,35,75,36,77,37,79,38,81,39,83,40,85,41,87,42,89,43,91,0,93,44, - 95,45,97,46,99,47,101,48,103,0,105,49,107,50,109,51,111,52,113,53, - 115,54,117,55,119,56,121,57,123,58,125,59,127,60,129,61,131,62,133, - 63,135,64,137,65,139,66,141,67,143,68,145,69,147,70,149,71,151,72, - 153,73,155,74,157,75,159,76,161,77,163,78,165,79,167,80,169,81,171, - 82,173,83,175,84,177,85,179,86,181,87,183,88,185,89,187,90,189,91, - 191,92,193,93,195,94,197,95,199,96,201,97,203,98,205,99,207,100, - 209,101,211,102,213,103,215,104,217,105,219,106,221,107,223,108, - 225,109,227,110,229,111,231,112,233,113,235,114,237,115,239,116, - 241,117,243,118,245,119,247,120,249,121,251,122,253,0,255,0,257, - 123,259,124,261,125,1,0,31,3,0,9,10,13,13,32,32,2,0,83,83,115,115, - 2,0,85,85,117,117,2,0,66,66,98,98,2,0,84,84,116,116,2,0,82,82,114, - 114,2,0,65,65,97,97,2,0,73,73,105,105,2,0,67,67,99,99,2,0,76,76, - 108,108,2,0,69,69,101,101,2,0,71,71,103,103,2,0,78,78,110,110,2, - 0,68,68,100,100,2,0,80,80,112,112,2,0,89,89,121,121,2,0,86,86,118, - 118,2,0,10,10,13,13,2,0,70,70,102,102,2,0,79,79,111,111,2,0,87,87, - 119,119,2,0,72,72,104,104,2,0,43,43,45,45,1,0,48,57,2,0,77,77,109, - 109,2,0,39,39,92,92,1,0,42,42,2,0,42,42,47,47,2,0,90,90,122,122, - 2,0,88,88,120,120,4,0,36,36,65,90,95,95,97,122,1292,0,1,1,0,0,0, - 0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13, - 1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23, - 1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33, - 1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43, - 1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53, - 1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67, - 1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77, - 1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87, - 1,0,0,0,0,89,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99, - 1,0,0,0,0,101,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0, - 0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1, - 0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0, - 129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0, - 0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147, - 1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0, - 0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1, - 0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,0,0,0,0, - 175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,183,1,0, - 0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0,0,0,0,193, - 1,0,0,0,0,195,1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201,1,0,0,0, - 0,203,1,0,0,0,0,205,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1, - 0,0,0,0,213,1,0,0,0,0,215,1,0,0,0,0,217,1,0,0,0,0,219,1,0,0,0,0, - 221,1,0,0,0,0,223,1,0,0,0,0,225,1,0,0,0,0,227,1,0,0,0,0,229,1,0, - 0,0,0,231,1,0,0,0,0,233,1,0,0,0,0,235,1,0,0,0,0,237,1,0,0,0,0,239, - 1,0,0,0,0,241,1,0,0,0,0,243,1,0,0,0,0,245,1,0,0,0,0,247,1,0,0,0, - 0,249,1,0,0,0,0,251,1,0,0,0,0,257,1,0,0,0,0,259,1,0,0,0,0,261,1, - 0,0,0,1,264,1,0,0,0,3,270,1,0,0,0,5,274,1,0,0,0,7,296,1,0,0,0,9, - 321,1,0,0,0,11,339,1,0,0,0,13,360,1,0,0,0,15,374,1,0,0,0,17,388, - 1,0,0,0,19,395,1,0,0,0,21,404,1,0,0,0,23,417,1,0,0,0,25,426,1,0, - 0,0,27,435,1,0,0,0,29,441,1,0,0,0,31,450,1,0,0,0,33,457,1,0,0,0, - 35,469,1,0,0,0,37,473,1,0,0,0,39,486,1,0,0,0,41,499,1,0,0,0,43,513, - 1,0,0,0,45,525,1,0,0,0,47,535,1,0,0,0,49,540,1,0,0,0,51,593,1,0, - 0,0,53,604,1,0,0,0,55,606,1,0,0,0,57,611,1,0,0,0,59,614,1,0,0,0, - 61,640,1,0,0,0,63,662,1,0,0,0,65,678,1,0,0,0,67,686,1,0,0,0,69,688, - 1,0,0,0,71,690,1,0,0,0,73,692,1,0,0,0,75,694,1,0,0,0,77,696,1,0, - 0,0,79,698,1,0,0,0,81,700,1,0,0,0,83,702,1,0,0,0,85,704,1,0,0,0, - 87,723,1,0,0,0,89,742,1,0,0,0,91,766,1,0,0,0,93,768,1,0,0,0,95,773, - 1,0,0,0,97,786,1,0,0,0,99,792,1,0,0,0,101,803,1,0,0,0,103,826,1, - 0,0,0,105,828,1,0,0,0,107,831,1,0,0,0,109,836,1,0,0,0,111,841,1, - 0,0,0,113,846,1,0,0,0,115,854,1,0,0,0,117,857,1,0,0,0,119,861,1, - 0,0,0,121,865,1,0,0,0,123,869,1,0,0,0,125,874,1,0,0,0,127,879,1, - 0,0,0,129,886,1,0,0,0,131,893,1,0,0,0,133,903,1,0,0,0,135,916,1, - 0,0,0,137,921,1,0,0,0,139,926,1,0,0,0,141,940,1,0,0,0,143,953,1, - 0,0,0,145,958,1,0,0,0,147,966,1,0,0,0,149,981,1,0,0,0,151,1001,1, - 0,0,0,153,1024,1,0,0,0,155,1034,1,0,0,0,157,1042,1,0,0,0,159,1054, - 1,0,0,0,161,1061,1,0,0,0,163,1069,1,0,0,0,165,1074,1,0,0,0,167,1078, - 1,0,0,0,169,1081,1,0,0,0,171,1086,1,0,0,0,173,1090,1,0,0,0,175,1095, - 1,0,0,0,177,1098,1,0,0,0,179,1103,1,0,0,0,181,1109,1,0,0,0,183,1114, - 1,0,0,0,185,1118,1,0,0,0,187,1121,1,0,0,0,189,1125,1,0,0,0,191,1131, - 1,0,0,0,193,1137,1,0,0,0,195,1143,1,0,0,0,197,1148,1,0,0,0,199,1152, - 1,0,0,0,201,1155,1,0,0,0,203,1158,1,0,0,0,205,1160,1,0,0,0,207,1162, - 1,0,0,0,209,1164,1,0,0,0,211,1166,1,0,0,0,213,1168,1,0,0,0,215,1170, - 1,0,0,0,217,1173,1,0,0,0,219,1176,1,0,0,0,221,1179,1,0,0,0,223,1181, - 1,0,0,0,225,1183,1,0,0,0,227,1185,1,0,0,0,229,1187,1,0,0,0,231,1189, - 1,0,0,0,233,1191,1,0,0,0,235,1193,1,0,0,0,237,1195,1,0,0,0,239,1197, - 1,0,0,0,241,1199,1,0,0,0,243,1201,1,0,0,0,245,1203,1,0,0,0,247,1207, - 1,0,0,0,249,1210,1,0,0,0,251,1213,1,0,0,0,253,1224,1,0,0,0,255,1226, - 1,0,0,0,257,1229,1,0,0,0,259,1233,1,0,0,0,261,1246,1,0,0,0,263,265, - 7,0,0,0,264,263,1,0,0,0,265,266,1,0,0,0,266,264,1,0,0,0,266,267, - 1,0,0,0,267,268,1,0,0,0,268,269,6,0,0,0,269,2,1,0,0,0,270,271,5, - 35,0,0,271,272,5,35,0,0,272,273,5,35,0,0,273,4,1,0,0,0,274,275,7, - 1,0,0,275,276,7,2,0,0,276,277,7,3,0,0,277,278,7,1,0,0,278,279,7, - 4,0,0,279,280,7,5,0,0,280,281,7,6,0,0,281,282,7,7,0,0,282,283,7, - 4,0,0,283,284,5,95,0,0,284,285,7,1,0,0,285,286,7,8,0,0,286,287,7, - 6,0,0,287,288,7,9,0,0,288,289,7,6,0,0,289,290,7,5,0,0,290,291,5, - 95,0,0,291,292,7,4,0,0,292,293,7,10,0,0,293,294,7,1,0,0,294,295, - 7,4,0,0,295,6,1,0,0,0,296,297,7,1,0,0,297,298,7,2,0,0,298,299,7, - 3,0,0,299,300,7,1,0,0,300,301,7,4,0,0,301,302,7,5,0,0,302,303,7, - 6,0,0,303,304,7,7,0,0,304,305,7,4,0,0,305,306,5,95,0,0,306,307,7, - 6,0,0,307,308,7,11,0,0,308,309,7,11,0,0,309,310,7,5,0,0,310,311, - 7,10,0,0,311,312,7,11,0,0,312,313,7,6,0,0,313,314,7,4,0,0,314,315, - 7,10,0,0,315,316,5,95,0,0,316,317,7,4,0,0,317,318,7,10,0,0,318,319, - 7,1,0,0,319,320,7,4,0,0,320,8,1,0,0,0,321,322,7,1,0,0,322,323,7, - 2,0,0,323,324,7,3,0,0,324,325,7,1,0,0,325,326,7,4,0,0,326,327,7, - 5,0,0,327,328,7,6,0,0,328,329,7,7,0,0,329,330,7,4,0,0,330,331,5, - 95,0,0,331,332,7,7,0,0,332,333,7,12,0,0,333,334,7,8,0,0,334,335, - 7,9,0,0,335,336,7,2,0,0,336,337,7,13,0,0,337,338,7,10,0,0,338,10, - 1,0,0,0,339,340,7,1,0,0,340,341,7,2,0,0,341,342,7,3,0,0,342,343, - 7,1,0,0,343,344,7,4,0,0,344,345,7,5,0,0,345,346,7,6,0,0,346,347, - 7,7,0,0,347,348,7,4,0,0,348,349,5,95,0,0,349,350,7,13,0,0,350,351, - 7,10,0,0,351,352,7,14,0,0,352,353,7,10,0,0,353,354,7,12,0,0,354, - 355,7,13,0,0,355,356,7,10,0,0,356,357,7,12,0,0,357,358,7,8,0,0,358, - 359,7,15,0,0,359,12,1,0,0,0,360,362,7,16,0,0,361,363,3,103,51,0, - 362,361,1,0,0,0,363,364,1,0,0,0,364,362,1,0,0,0,364,365,1,0,0,0, - 365,372,1,0,0,0,366,368,5,46,0,0,367,369,3,103,51,0,368,367,1,0, - 0,0,369,370,1,0,0,0,370,368,1,0,0,0,370,371,1,0,0,0,371,373,1,0, - 0,0,372,366,1,0,0,0,372,373,1,0,0,0,373,14,1,0,0,0,374,375,5,35, - 0,0,375,376,5,32,0,0,376,380,1,0,0,0,377,379,8,17,0,0,378,377,1, - 0,0,0,379,382,1,0,0,0,380,378,1,0,0,0,380,381,1,0,0,0,381,384,1, - 0,0,0,382,380,1,0,0,0,383,385,5,13,0,0,384,383,1,0,0,0,384,385,1, - 0,0,0,385,386,1,0,0,0,386,387,5,10,0,0,387,16,1,0,0,0,388,389,7, - 13,0,0,389,390,7,10,0,0,390,391,7,18,0,0,391,392,7,7,0,0,392,393, - 7,12,0,0,393,394,7,10,0,0,394,18,1,0,0,0,395,396,5,60,0,0,396,397, - 5,33,0,0,397,398,7,10,0,0,398,399,7,5,0,0,399,400,7,5,0,0,400,401, - 7,19,0,0,401,402,7,5,0,0,402,403,5,62,0,0,403,20,1,0,0,0,404,405, - 5,60,0,0,405,406,5,33,0,0,406,407,7,2,0,0,407,408,7,12,0,0,408,409, - 7,13,0,0,409,410,7,10,0,0,410,411,7,18,0,0,411,412,7,7,0,0,412,413, - 7,12,0,0,413,414,7,10,0,0,414,415,7,13,0,0,415,416,5,62,0,0,416, - 22,1,0,0,0,417,418,7,19,0,0,418,419,7,16,0,0,419,420,7,10,0,0,420, - 421,7,5,0,0,421,422,7,18,0,0,422,423,7,9,0,0,423,424,7,19,0,0,424, - 425,7,20,0,0,425,24,1,0,0,0,426,427,7,5,0,0,427,428,7,19,0,0,428, - 429,7,2,0,0,429,430,7,12,0,0,430,431,7,13,0,0,431,432,7,7,0,0,432, - 433,7,12,0,0,433,434,7,11,0,0,434,26,1,0,0,0,435,436,7,10,0,0,436, - 437,7,5,0,0,437,438,7,5,0,0,438,439,7,19,0,0,439,440,7,5,0,0,440, - 28,1,0,0,0,441,442,7,1,0,0,442,443,7,6,0,0,443,444,7,4,0,0,444,445, - 7,2,0,0,445,446,7,5,0,0,446,447,7,6,0,0,447,448,7,4,0,0,448,449, - 7,10,0,0,449,30,1,0,0,0,450,451,7,1,0,0,451,452,7,7,0,0,452,453, - 7,9,0,0,453,454,7,10,0,0,454,455,7,12,0,0,455,456,7,4,0,0,456,32, - 1,0,0,0,457,458,7,4,0,0,458,459,7,7,0,0,459,460,7,10,0,0,460,461, - 5,95,0,0,461,462,7,4,0,0,462,463,7,19,0,0,463,464,5,95,0,0,464,465, - 7,10,0,0,465,466,7,16,0,0,466,467,7,10,0,0,467,468,7,12,0,0,468, - 34,1,0,0,0,469,470,7,12,0,0,470,471,7,6,0,0,471,472,7,12,0,0,472, - 36,1,0,0,0,473,474,7,6,0,0,474,475,7,8,0,0,475,476,7,8,0,0,476,477, - 7,10,0,0,477,478,7,14,0,0,478,479,7,4,0,0,479,480,5,95,0,0,480,481, - 7,12,0,0,481,482,7,2,0,0,482,483,7,9,0,0,483,484,7,9,0,0,484,485, - 7,1,0,0,485,38,1,0,0,0,486,487,7,7,0,0,487,488,7,11,0,0,488,489, - 7,12,0,0,489,490,7,19,0,0,490,491,7,5,0,0,491,492,7,10,0,0,492,493, - 5,95,0,0,493,494,7,12,0,0,494,495,7,2,0,0,495,496,7,9,0,0,496,497, - 7,9,0,0,497,498,7,1,0,0,498,40,1,0,0,0,499,500,7,12,0,0,500,501, - 7,2,0,0,501,502,7,9,0,0,502,503,7,9,0,0,503,504,5,95,0,0,504,505, - 7,21,0,0,505,506,7,6,0,0,506,507,7,12,0,0,507,508,7,13,0,0,508,509, - 7,9,0,0,509,510,7,7,0,0,510,511,7,12,0,0,511,512,7,11,0,0,512,42, - 1,0,0,0,513,514,7,1,0,0,514,515,7,14,0,0,515,516,7,6,0,0,516,517, - 7,8,0,0,517,518,7,10,0,0,518,519,7,1,0,0,519,520,5,95,0,0,520,521, - 7,19,0,0,521,522,7,12,0,0,522,523,7,9,0,0,523,524,7,15,0,0,524,44, - 1,0,0,0,525,526,7,4,0,0,526,527,7,5,0,0,527,528,7,2,0,0,528,529, - 7,12,0,0,529,530,7,8,0,0,530,531,7,6,0,0,531,532,7,4,0,0,532,533, - 7,10,0,0,533,46,1,0,0,0,534,536,7,22,0,0,535,534,1,0,0,0,535,536, - 1,0,0,0,536,537,1,0,0,0,537,538,3,253,126,0,538,48,1,0,0,0,539,541, - 7,22,0,0,540,539,1,0,0,0,540,541,1,0,0,0,541,543,1,0,0,0,542,544, - 7,23,0,0,543,542,1,0,0,0,544,545,1,0,0,0,545,543,1,0,0,0,545,546, - 1,0,0,0,546,553,1,0,0,0,547,549,5,46,0,0,548,550,7,23,0,0,549,548, - 1,0,0,0,550,551,1,0,0,0,551,549,1,0,0,0,551,552,1,0,0,0,552,554, - 1,0,0,0,553,547,1,0,0,0,553,554,1,0,0,0,554,50,1,0,0,0,555,557,7, - 22,0,0,556,555,1,0,0,0,556,557,1,0,0,0,557,559,1,0,0,0,558,560,7, - 23,0,0,559,558,1,0,0,0,560,561,1,0,0,0,561,559,1,0,0,0,561,562,1, - 0,0,0,562,570,1,0,0,0,563,567,5,46,0,0,564,566,7,23,0,0,565,564, - 1,0,0,0,566,569,1,0,0,0,567,565,1,0,0,0,567,568,1,0,0,0,568,571, - 1,0,0,0,569,567,1,0,0,0,570,563,1,0,0,0,570,571,1,0,0,0,571,581, - 1,0,0,0,572,574,7,10,0,0,573,575,7,22,0,0,574,573,1,0,0,0,574,575, - 1,0,0,0,575,577,1,0,0,0,576,578,7,23,0,0,577,576,1,0,0,0,578,579, - 1,0,0,0,579,577,1,0,0,0,579,580,1,0,0,0,580,582,1,0,0,0,581,572, - 1,0,0,0,581,582,1,0,0,0,582,594,1,0,0,0,583,585,7,22,0,0,584,583, - 1,0,0,0,584,585,1,0,0,0,585,586,1,0,0,0,586,587,7,7,0,0,587,588, - 7,12,0,0,588,594,7,18,0,0,589,590,7,1,0,0,590,591,7,12,0,0,591,592, - 7,6,0,0,592,594,7,12,0,0,593,556,1,0,0,0,593,584,1,0,0,0,593,589, - 1,0,0,0,594,52,1,0,0,0,595,596,7,4,0,0,596,597,7,5,0,0,597,598,7, - 2,0,0,598,605,7,10,0,0,599,600,7,18,0,0,600,601,7,6,0,0,601,602, - 7,9,0,0,602,603,7,1,0,0,603,605,7,10,0,0,604,595,1,0,0,0,604,599, - 1,0,0,0,605,54,1,0,0,0,606,607,7,23,0,0,607,608,7,23,0,0,608,609, - 7,23,0,0,609,610,7,23,0,0,610,56,1,0,0,0,611,612,7,23,0,0,612,613, - 7,23,0,0,613,58,1,0,0,0,614,615,5,39,0,0,615,616,3,55,27,0,616,617, - 5,45,0,0,617,618,3,57,28,0,618,619,5,45,0,0,619,620,3,57,28,0,620, - 621,7,4,0,0,621,622,3,57,28,0,622,623,5,58,0,0,623,624,3,57,28,0, - 624,625,5,58,0,0,625,632,3,57,28,0,626,628,5,46,0,0,627,629,7,23, - 0,0,628,627,1,0,0,0,629,630,1,0,0,0,630,628,1,0,0,0,630,631,1,0, - 0,0,631,633,1,0,0,0,632,626,1,0,0,0,632,633,1,0,0,0,633,634,1,0, - 0,0,634,635,7,22,0,0,635,636,3,57,28,0,636,637,5,58,0,0,637,638, - 3,57,28,0,638,639,5,39,0,0,639,60,1,0,0,0,640,641,5,39,0,0,641,642, - 3,55,27,0,642,643,5,45,0,0,643,644,3,57,28,0,644,645,5,45,0,0,645, - 646,3,57,28,0,646,647,7,4,0,0,647,648,3,57,28,0,648,649,5,58,0,0, - 649,650,3,57,28,0,650,651,5,58,0,0,651,658,3,57,28,0,652,654,5,46, - 0,0,653,655,7,23,0,0,654,653,1,0,0,0,655,656,1,0,0,0,656,654,1,0, - 0,0,656,657,1,0,0,0,657,659,1,0,0,0,658,652,1,0,0,0,658,659,1,0, - 0,0,659,660,1,0,0,0,660,661,5,39,0,0,661,62,1,0,0,0,662,663,5,39, - 0,0,663,664,3,57,28,0,664,665,5,58,0,0,665,666,3,57,28,0,666,667, - 5,58,0,0,667,674,3,57,28,0,668,670,5,46,0,0,669,671,7,23,0,0,670, - 669,1,0,0,0,671,672,1,0,0,0,672,670,1,0,0,0,672,673,1,0,0,0,673, - 675,1,0,0,0,674,668,1,0,0,0,674,675,1,0,0,0,675,676,1,0,0,0,676, - 677,5,39,0,0,677,64,1,0,0,0,678,679,5,39,0,0,679,680,3,55,27,0,680, - 681,5,45,0,0,681,682,3,57,28,0,682,683,5,45,0,0,683,684,3,57,28, - 0,684,685,5,39,0,0,685,66,1,0,0,0,686,687,7,14,0,0,687,68,1,0,0, - 0,688,689,7,4,0,0,689,70,1,0,0,0,690,691,7,15,0,0,691,72,1,0,0,0, - 692,693,7,24,0,0,693,74,1,0,0,0,694,695,7,13,0,0,695,76,1,0,0,0, - 696,697,7,21,0,0,697,78,1,0,0,0,698,699,7,1,0,0,699,80,1,0,0,0,700, - 701,7,18,0,0,701,82,1,0,0,0,702,703,3,223,111,0,703,84,1,0,0,0,704, - 705,3,221,110,0,705,86,1,0,0,0,706,707,5,39,0,0,707,708,3,67,33, - 0,708,709,3,47,23,0,709,713,3,71,35,0,710,711,3,47,23,0,711,712, - 3,73,36,0,712,714,1,0,0,0,713,710,1,0,0,0,713,714,1,0,0,0,714,715, - 1,0,0,0,715,716,5,39,0,0,716,724,1,0,0,0,717,718,5,39,0,0,718,719, - 3,67,33,0,719,720,3,47,23,0,720,721,3,73,36,0,721,722,5,39,0,0,722, - 724,1,0,0,0,723,706,1,0,0,0,723,717,1,0,0,0,724,88,1,0,0,0,725,726, - 5,39,0,0,726,727,3,67,33,0,727,728,3,47,23,0,728,732,3,75,37,0,729, - 730,3,69,34,0,730,731,3,91,45,0,731,733,1,0,0,0,732,729,1,0,0,0, - 732,733,1,0,0,0,733,734,1,0,0,0,734,735,5,39,0,0,735,743,1,0,0,0, - 736,737,5,39,0,0,737,738,3,67,33,0,738,739,3,69,34,0,739,740,3,91, - 45,0,740,741,5,39,0,0,741,743,1,0,0,0,742,725,1,0,0,0,742,736,1, - 0,0,0,743,90,1,0,0,0,744,745,3,47,23,0,745,749,3,77,38,0,746,747, - 3,47,23,0,747,748,3,73,36,0,748,750,1,0,0,0,749,746,1,0,0,0,749, - 750,1,0,0,0,750,754,1,0,0,0,751,752,3,49,24,0,752,753,3,79,39,0, - 753,755,1,0,0,0,754,751,1,0,0,0,754,755,1,0,0,0,755,767,1,0,0,0, - 756,757,3,47,23,0,757,761,3,73,36,0,758,759,3,49,24,0,759,760,3, - 79,39,0,760,762,1,0,0,0,761,758,1,0,0,0,761,762,1,0,0,0,762,767, - 1,0,0,0,763,764,3,49,24,0,764,765,3,79,39,0,765,767,1,0,0,0,766, - 744,1,0,0,0,766,756,1,0,0,0,766,763,1,0,0,0,767,92,1,0,0,0,768,769, - 7,12,0,0,769,770,7,2,0,0,770,771,7,9,0,0,771,772,7,9,0,0,772,94, - 1,0,0,0,773,781,5,39,0,0,774,775,5,92,0,0,775,780,9,0,0,0,776,777, - 5,39,0,0,777,780,5,39,0,0,778,780,8,25,0,0,779,774,1,0,0,0,779,776, - 1,0,0,0,779,778,1,0,0,0,780,783,1,0,0,0,781,779,1,0,0,0,781,782, - 1,0,0,0,782,784,1,0,0,0,783,781,1,0,0,0,784,785,5,39,0,0,785,96, - 1,0,0,0,786,787,7,8,0,0,787,788,7,19,0,0,788,789,7,9,0,0,789,790, - 1,0,0,0,790,791,3,253,126,0,791,98,1,0,0,0,792,793,5,47,0,0,793, - 794,5,47,0,0,794,798,1,0,0,0,795,797,8,17,0,0,796,795,1,0,0,0,797, - 800,1,0,0,0,798,796,1,0,0,0,798,799,1,0,0,0,799,801,1,0,0,0,800, - 798,1,0,0,0,801,802,6,49,0,0,802,100,1,0,0,0,803,804,5,47,0,0,804, - 805,5,42,0,0,805,813,1,0,0,0,806,814,8,26,0,0,807,809,5,42,0,0,808, - 807,1,0,0,0,809,810,1,0,0,0,810,808,1,0,0,0,810,811,1,0,0,0,811, - 812,1,0,0,0,812,814,8,27,0,0,813,806,1,0,0,0,813,808,1,0,0,0,814, - 818,1,0,0,0,815,817,5,42,0,0,816,815,1,0,0,0,817,820,1,0,0,0,818, - 816,1,0,0,0,818,819,1,0,0,0,819,821,1,0,0,0,820,818,1,0,0,0,821, - 822,5,42,0,0,822,823,5,47,0,0,823,824,1,0,0,0,824,825,6,50,0,0,825, - 102,1,0,0,0,826,827,7,23,0,0,827,104,1,0,0,0,828,829,7,7,0,0,829, - 830,7,18,0,0,830,106,1,0,0,0,831,832,7,4,0,0,832,833,7,21,0,0,833, - 834,7,10,0,0,834,835,7,12,0,0,835,108,1,0,0,0,836,837,7,10,0,0,837, - 838,7,9,0,0,838,839,7,1,0,0,839,840,7,10,0,0,840,110,1,0,0,0,841, - 842,7,18,0,0,842,843,7,2,0,0,843,844,7,12,0,0,844,845,7,8,0,0,845, - 112,1,0,0,0,846,847,7,3,0,0,847,848,7,19,0,0,848,849,7,19,0,0,849, - 850,7,9,0,0,850,851,7,10,0,0,851,852,7,6,0,0,852,853,7,12,0,0,853, - 114,1,0,0,0,854,855,7,7,0,0,855,856,5,56,0,0,856,116,1,0,0,0,857, - 858,7,7,0,0,858,859,5,49,0,0,859,860,5,54,0,0,860,118,1,0,0,0,861, - 862,7,7,0,0,862,863,5,51,0,0,863,864,5,50,0,0,864,120,1,0,0,0,865, - 866,7,7,0,0,866,867,5,54,0,0,867,868,5,52,0,0,868,122,1,0,0,0,869, - 870,7,18,0,0,870,871,7,14,0,0,871,872,5,51,0,0,872,873,5,50,0,0, - 873,124,1,0,0,0,874,875,7,18,0,0,875,876,7,14,0,0,876,877,5,54,0, - 0,877,878,5,52,0,0,878,126,1,0,0,0,879,880,7,1,0,0,880,881,7,4,0, - 0,881,882,7,5,0,0,882,883,7,7,0,0,883,884,7,12,0,0,884,885,7,11, - 0,0,885,128,1,0,0,0,886,887,7,3,0,0,887,888,7,7,0,0,888,889,7,12, - 0,0,889,890,7,6,0,0,890,891,7,5,0,0,891,892,7,15,0,0,892,130,1,0, - 0,0,893,894,7,4,0,0,894,895,7,7,0,0,895,896,7,24,0,0,896,897,7,10, - 0,0,897,898,7,1,0,0,898,899,7,4,0,0,899,900,7,6,0,0,900,901,7,24, - 0,0,901,902,7,14,0,0,902,132,1,0,0,0,903,904,7,4,0,0,904,905,7,7, - 0,0,905,906,7,24,0,0,906,907,7,10,0,0,907,908,7,1,0,0,908,909,7, - 4,0,0,909,910,7,6,0,0,910,911,7,24,0,0,911,912,7,14,0,0,912,913, - 5,95,0,0,913,914,7,4,0,0,914,915,7,28,0,0,915,134,1,0,0,0,916,917, - 7,13,0,0,917,918,7,6,0,0,918,919,7,4,0,0,919,920,7,10,0,0,920,136, - 1,0,0,0,921,922,7,4,0,0,922,923,7,7,0,0,923,924,7,24,0,0,924,925, - 7,10,0,0,925,138,1,0,0,0,926,927,7,7,0,0,927,928,7,12,0,0,928,929, - 7,4,0,0,929,930,7,10,0,0,930,931,7,5,0,0,931,932,7,16,0,0,932,933, - 7,6,0,0,933,934,7,9,0,0,934,935,5,95,0,0,935,936,7,15,0,0,936,937, - 7,10,0,0,937,938,7,6,0,0,938,939,7,5,0,0,939,140,1,0,0,0,940,941, - 7,7,0,0,941,942,7,12,0,0,942,943,7,4,0,0,943,944,7,10,0,0,944,945, - 7,5,0,0,945,946,7,16,0,0,946,947,7,6,0,0,947,948,7,9,0,0,948,949, - 5,95,0,0,949,950,7,13,0,0,950,951,7,6,0,0,951,952,7,15,0,0,952,142, - 1,0,0,0,953,954,7,2,0,0,954,955,7,2,0,0,955,956,7,7,0,0,956,957, - 7,13,0,0,957,144,1,0,0,0,958,959,7,13,0,0,959,960,7,10,0,0,960,961, - 7,8,0,0,961,962,7,7,0,0,962,963,7,24,0,0,963,964,7,6,0,0,964,965, - 7,9,0,0,965,146,1,0,0,0,966,967,7,14,0,0,967,968,7,5,0,0,968,969, - 7,10,0,0,969,970,7,8,0,0,970,971,7,7,0,0,971,972,7,1,0,0,972,973, - 7,7,0,0,973,974,7,19,0,0,974,975,7,12,0,0,975,976,5,95,0,0,976,977, - 7,4,0,0,977,978,7,7,0,0,978,979,7,24,0,0,979,980,7,10,0,0,980,148, - 1,0,0,0,981,982,7,14,0,0,982,983,7,5,0,0,983,984,7,10,0,0,984,985, - 7,8,0,0,985,986,7,7,0,0,986,987,7,1,0,0,987,988,7,7,0,0,988,989, - 7,19,0,0,989,990,7,12,0,0,990,991,5,95,0,0,991,992,7,4,0,0,992,993, - 7,7,0,0,993,994,7,24,0,0,994,995,7,10,0,0,995,996,7,1,0,0,996,997, - 7,4,0,0,997,998,7,6,0,0,998,999,7,24,0,0,999,1000,7,14,0,0,1000, - 150,1,0,0,0,1001,1002,7,14,0,0,1002,1003,7,5,0,0,1003,1004,7,10, - 0,0,1004,1005,7,8,0,0,1005,1006,7,7,0,0,1006,1007,7,1,0,0,1007,1008, - 7,7,0,0,1008,1009,7,19,0,0,1009,1010,7,12,0,0,1010,1011,5,95,0,0, - 1011,1012,7,4,0,0,1012,1013,7,7,0,0,1013,1014,7,24,0,0,1014,1015, - 7,10,0,0,1015,1016,7,1,0,0,1016,1017,7,4,0,0,1017,1018,7,6,0,0,1018, - 1019,7,24,0,0,1019,1020,7,14,0,0,1020,1021,5,95,0,0,1021,1022,7, - 4,0,0,1022,1023,7,28,0,0,1023,152,1,0,0,0,1024,1025,7,18,0,0,1025, - 1026,7,7,0,0,1026,1027,7,29,0,0,1027,1028,7,10,0,0,1028,1029,7,13, - 0,0,1029,1030,7,8,0,0,1030,1031,7,21,0,0,1031,1032,7,6,0,0,1032, - 1033,7,5,0,0,1033,154,1,0,0,0,1034,1035,7,16,0,0,1035,1036,7,6,0, - 0,1036,1037,7,5,0,0,1037,1038,7,8,0,0,1038,1039,7,21,0,0,1039,1040, - 7,6,0,0,1040,1041,7,5,0,0,1041,156,1,0,0,0,1042,1043,7,18,0,0,1043, - 1044,7,7,0,0,1044,1045,7,29,0,0,1045,1046,7,10,0,0,1046,1047,7,13, - 0,0,1047,1048,7,3,0,0,1048,1049,7,7,0,0,1049,1050,7,12,0,0,1050, - 1051,7,6,0,0,1051,1052,7,5,0,0,1052,1053,7,15,0,0,1053,158,1,0,0, - 0,1054,1055,7,1,0,0,1055,1056,7,4,0,0,1056,1057,7,5,0,0,1057,1058, - 7,2,0,0,1058,1059,7,8,0,0,1059,1060,7,4,0,0,1060,160,1,0,0,0,1061, - 1062,7,12,0,0,1062,1063,7,1,0,0,1063,1064,7,4,0,0,1064,1065,7,5, - 0,0,1065,1066,7,2,0,0,1066,1067,7,8,0,0,1067,1068,7,4,0,0,1068,162, - 1,0,0,0,1069,1070,7,9,0,0,1070,1071,7,7,0,0,1071,1072,7,1,0,0,1072, - 1073,7,4,0,0,1073,164,1,0,0,0,1074,1075,7,24,0,0,1075,1076,7,6,0, - 0,1076,1077,7,14,0,0,1077,166,1,0,0,0,1078,1079,7,2,0,0,1079,1080, - 5,33,0,0,1080,168,1,0,0,0,1081,1082,7,3,0,0,1082,1083,7,19,0,0,1083, - 1084,7,19,0,0,1084,1085,7,9,0,0,1085,170,1,0,0,0,1086,1087,7,1,0, - 0,1087,1088,7,4,0,0,1088,1089,7,5,0,0,1089,172,1,0,0,0,1090,1091, - 7,16,0,0,1091,1092,7,3,0,0,1092,1093,7,7,0,0,1093,1094,7,12,0,0, - 1094,174,1,0,0,0,1095,1096,7,4,0,0,1096,1097,7,1,0,0,1097,176,1, - 0,0,0,1098,1099,7,4,0,0,1099,1100,7,1,0,0,1100,1101,7,4,0,0,1101, - 1102,7,28,0,0,1102,178,1,0,0,0,1103,1104,7,7,0,0,1104,1105,7,15, - 0,0,1105,1106,7,10,0,0,1106,1107,7,6,0,0,1107,1108,7,5,0,0,1108, - 180,1,0,0,0,1109,1110,7,7,0,0,1110,1111,7,13,0,0,1111,1112,7,6,0, - 0,1112,1113,7,15,0,0,1113,182,1,0,0,0,1114,1115,7,13,0,0,1115,1116, - 7,10,0,0,1116,1117,7,8,0,0,1117,184,1,0,0,0,1118,1119,7,14,0,0,1119, - 1120,7,4,0,0,1120,186,1,0,0,0,1121,1122,7,14,0,0,1122,1123,7,4,0, - 0,1123,1124,7,1,0,0,1124,188,1,0,0,0,1125,1126,7,14,0,0,1126,1127, - 7,4,0,0,1127,1128,7,1,0,0,1128,1129,7,4,0,0,1129,1130,7,28,0,0,1130, - 190,1,0,0,0,1131,1132,7,18,0,0,1132,1133,7,8,0,0,1133,1134,7,21, - 0,0,1134,1135,7,6,0,0,1135,1136,7,5,0,0,1136,192,1,0,0,0,1137,1138, - 7,16,0,0,1138,1139,7,8,0,0,1139,1140,7,21,0,0,1140,1141,7,6,0,0, - 1141,1142,7,5,0,0,1142,194,1,0,0,0,1143,1144,7,18,0,0,1144,1145, - 7,3,0,0,1145,1146,7,7,0,0,1146,1147,7,12,0,0,1147,196,1,0,0,0,1148, - 1149,7,6,0,0,1149,1150,7,12,0,0,1150,1151,7,15,0,0,1151,198,1,0, - 0,0,1152,1153,3,197,98,0,1153,1154,7,23,0,0,1154,200,1,0,0,0,1155, - 1156,5,58,0,0,1156,1157,5,58,0,0,1157,202,1,0,0,0,1158,1159,5,43, - 0,0,1159,204,1,0,0,0,1160,1161,5,45,0,0,1161,206,1,0,0,0,1162,1163, - 5,42,0,0,1163,208,1,0,0,0,1164,1165,5,47,0,0,1165,210,1,0,0,0,1166, - 1167,5,37,0,0,1167,212,1,0,0,0,1168,1169,5,61,0,0,1169,214,1,0,0, - 0,1170,1171,5,33,0,0,1171,1172,5,61,0,0,1172,216,1,0,0,0,1173,1174, - 5,62,0,0,1174,1175,5,61,0,0,1175,218,1,0,0,0,1176,1177,5,60,0,0, - 1177,1178,5,61,0,0,1178,220,1,0,0,0,1179,1180,5,62,0,0,1180,222, - 1,0,0,0,1181,1182,5,60,0,0,1182,224,1,0,0,0,1183,1184,5,33,0,0,1184, - 226,1,0,0,0,1185,1186,5,40,0,0,1186,228,1,0,0,0,1187,1188,5,41,0, - 0,1188,230,1,0,0,0,1189,1190,5,91,0,0,1190,232,1,0,0,0,1191,1192, - 5,93,0,0,1192,234,1,0,0,0,1193,1194,5,44,0,0,1194,236,1,0,0,0,1195, - 1196,5,58,0,0,1196,238,1,0,0,0,1197,1198,5,63,0,0,1198,240,1,0,0, - 0,1199,1200,5,35,0,0,1200,242,1,0,0,0,1201,1202,5,46,0,0,1202,244, - 1,0,0,0,1203,1204,7,6,0,0,1204,1205,7,12,0,0,1205,1206,7,13,0,0, - 1206,246,1,0,0,0,1207,1208,7,19,0,0,1208,1209,7,5,0,0,1209,248,1, - 0,0,0,1210,1211,5,58,0,0,1211,1212,5,61,0,0,1212,250,1,0,0,0,1213, - 1214,5,45,0,0,1214,1215,5,62,0,0,1215,252,1,0,0,0,1216,1220,2,49, - 57,0,1217,1219,3,255,127,0,1218,1217,1,0,0,0,1219,1222,1,0,0,0,1220, - 1218,1,0,0,0,1220,1221,1,0,0,0,1221,1225,1,0,0,0,1222,1220,1,0,0, - 0,1223,1225,5,48,0,0,1224,1216,1,0,0,0,1224,1223,1,0,0,0,1225,254, - 1,0,0,0,1226,1227,2,48,57,0,1227,256,1,0,0,0,1228,1230,5,45,0,0, - 1229,1228,1,0,0,0,1229,1230,1,0,0,0,1230,1231,1,0,0,0,1231,1232, - 3,253,126,0,1232,258,1,0,0,0,1233,1238,7,30,0,0,1234,1237,7,30,0, - 0,1235,1237,3,255,127,0,1236,1234,1,0,0,0,1236,1235,1,0,0,0,1237, - 1240,1,0,0,0,1238,1236,1,0,0,0,1238,1239,1,0,0,0,1239,260,1,0,0, - 0,1240,1238,1,0,0,0,1241,1243,5,13,0,0,1242,1244,5,10,0,0,1243,1242, - 1,0,0,0,1243,1244,1,0,0,0,1244,1247,1,0,0,0,1245,1247,5,10,0,0,1246, - 1241,1,0,0,0,1246,1245,1,0,0,0,1247,262,1,0,0,0,49,0,266,364,370, - 372,380,384,535,540,545,551,553,556,561,567,570,574,579,581,584, - 593,604,630,632,656,658,672,674,713,723,732,742,749,754,761,766, - 779,781,798,810,813,818,1220,1224,1229,1236,1238,1243,1246,1,0,1, - 0 + 2,131,7,131,1,0,4,0,267,8,0,11,0,12,0,268,1,0,1,0,1,1,1,1,1,1,1, + 1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1, + 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1, + 4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1, + 4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1, + 5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1, + 6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,4,7,386,8, + 7,11,7,12,7,387,1,7,1,7,4,7,392,8,7,11,7,12,7,393,3,7,396,8,7,1, + 8,1,8,1,8,1,8,5,8,402,8,8,10,8,12,8,405,9,8,1,8,3,8,408,8,8,1,8, + 1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1, + 10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1, + 11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1, + 14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1, + 16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1, + 17,1,17,1,17,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1, + 19,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1, + 20,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1, + 21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1, + 22,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,23,1,23,1, + 23,1,23,1,23,1,24,3,24,559,8,24,1,24,1,24,1,25,3,25,564,8,25,1,25, + 4,25,567,8,25,11,25,12,25,568,1,25,1,25,4,25,573,8,25,11,25,12,25, + 574,3,25,577,8,25,1,26,3,26,580,8,26,1,26,4,26,583,8,26,11,26,12, + 26,584,1,26,1,26,5,26,589,8,26,10,26,12,26,592,9,26,3,26,594,8,26, + 1,26,1,26,3,26,598,8,26,1,26,4,26,601,8,26,11,26,12,26,602,3,26, + 605,8,26,1,26,3,26,608,8,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,3, + 26,617,8,26,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,3,27,628, + 8,27,1,28,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,4,30,652,8,30, + 11,30,12,30,653,3,30,656,8,30,1,30,1,30,1,30,1,30,1,30,1,30,1,31, + 1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31, + 4,31,678,8,31,11,31,12,31,679,3,31,682,8,31,1,31,1,31,1,32,1,32, + 1,32,1,32,1,32,1,32,1,32,1,32,4,32,694,8,32,11,32,12,32,695,3,32, + 698,8,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,34, + 1,34,1,35,1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40, + 1,41,1,41,1,42,1,42,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44, + 3,44,737,8,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,747,8, + 44,1,45,1,45,1,45,1,45,1,45,1,45,1,45,3,45,756,8,45,1,45,1,45,1, + 45,1,45,1,45,1,45,1,45,1,45,3,45,766,8,45,1,46,1,46,1,46,1,46,1, + 46,3,46,773,8,46,1,46,1,46,1,46,3,46,778,8,46,1,46,1,46,1,46,1,46, + 1,46,3,46,785,8,46,1,46,1,46,1,46,3,46,790,8,46,1,47,1,47,1,47,1, + 47,1,47,1,48,1,48,1,48,1,48,1,48,1,48,5,48,803,8,48,10,48,12,48, + 806,9,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50, + 1,50,5,50,820,8,50,10,50,12,50,823,9,50,1,50,1,50,1,51,1,51,1,51, + 1,51,1,51,4,51,832,8,51,11,51,12,51,833,1,51,3,51,837,8,51,1,51, + 5,51,840,8,51,10,51,12,51,843,9,51,1,51,1,51,1,51,1,51,1,51,1,52, + 1,52,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55, + 1,55,1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1,57,1,57,1,57, + 1,57,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1,60,1,61, + 1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,63, + 1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65, + 1,65,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,67,1,67, + 1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,68,1,68, + 1,68,1,68,1,68,1,69,1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70, + 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,71,1,71,1,71,1,71, + 1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72, + 1,72,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74, + 1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,75,1,75, + 1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75, + 1,75,1,75,1,75,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76, + 1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76, + 1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,78, + 1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1,79,1,79,1,79,1,79,1,79, + 1,79,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,1,80,1,80,1,80, + 1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82, + 1,83,1,83,1,83,1,83,1,84,1,84,1,84,1,85,1,85,1,85,1,85,1,85,1,86, + 1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,88,1,88,1,88,1,89,1,89, + 1,89,1,89,1,89,1,90,1,90,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91, + 1,91,1,92,1,92,1,92,1,92,1,93,1,93,1,93,1,94,1,94,1,94,1,94,1,95, + 1,95,1,95,1,95,1,95,1,95,1,96,1,96,1,96,1,96,1,96,1,96,1,97,1,97, + 1,97,1,97,1,97,1,97,1,98,1,98,1,98,1,98,1,98,1,99,1,99,1,99,1,99, + 1,100,1,100,1,100,1,101,1,101,1,101,1,102,1,102,1,103,1,103,1,104, + 1,104,1,105,1,105,1,106,1,106,1,107,1,107,1,108,1,108,1,108,1,109, + 1,109,1,109,1,110,1,110,1,110,1,111,1,111,1,112,1,112,1,113,1,113, + 1,114,1,114,1,115,1,115,1,116,1,116,1,117,1,117,1,118,1,118,1,119, + 1,119,1,120,1,120,1,121,1,121,1,122,1,122,1,123,1,123,1,123,1,123, + 1,124,1,124,1,124,1,125,1,125,1,125,1,126,1,126,1,126,1,127,1,127, + 5,127,1242,8,127,10,127,12,127,1245,9,127,1,127,3,127,1248,8,127, + 1,128,1,128,1,129,3,129,1253,8,129,1,129,1,129,1,130,1,130,1,130, + 5,130,1260,8,130,10,130,12,130,1263,9,130,1,131,1,131,3,131,1267, + 8,131,1,131,3,131,1270,8,131,0,0,132,1,1,3,2,5,3,7,4,9,5,11,6,13, + 7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18, + 37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,0, + 59,0,61,29,63,30,65,31,67,32,69,33,71,34,73,35,75,36,77,37,79,38, + 81,39,83,40,85,41,87,42,89,43,91,44,93,0,95,45,97,46,99,47,101,48, + 103,49,105,0,107,50,109,51,111,52,113,53,115,54,117,55,119,56,121, + 57,123,58,125,59,127,60,129,61,131,62,133,63,135,64,137,65,139,66, + 141,67,143,68,145,69,147,70,149,71,151,72,153,73,155,74,157,75,159, + 76,161,77,163,78,165,79,167,80,169,81,171,82,173,83,175,84,177,85, + 179,86,181,87,183,88,185,89,187,90,189,91,191,92,193,93,195,94,197, + 95,199,96,201,97,203,98,205,99,207,100,209,101,211,102,213,103,215, + 104,217,105,219,106,221,107,223,108,225,109,227,110,229,111,231, + 112,233,113,235,114,237,115,239,116,241,117,243,118,245,119,247, + 120,249,121,251,122,253,123,255,0,257,0,259,124,261,125,263,126, + 1,0,31,3,0,9,10,13,13,32,32,2,0,83,83,115,115,2,0,85,85,117,117, + 2,0,66,66,98,98,2,0,84,84,116,116,2,0,82,82,114,114,2,0,65,65,97, + 97,2,0,73,73,105,105,2,0,67,67,99,99,2,0,76,76,108,108,2,0,69,69, + 101,101,2,0,71,71,103,103,2,0,78,78,110,110,2,0,68,68,100,100,2, + 0,80,80,112,112,2,0,89,89,121,121,2,0,86,86,118,118,2,0,10,10,13, + 13,2,0,70,70,102,102,2,0,79,79,111,111,2,0,87,87,119,119,2,0,72, + 72,104,104,2,0,43,43,45,45,1,0,48,57,2,0,77,77,109,109,2,0,39,39, + 92,92,1,0,42,42,2,0,42,42,47,47,2,0,90,90,122,122,2,0,88,88,120, + 120,4,0,36,36,65,90,95,95,97,122,1315,0,1,1,0,0,0,0,3,1,0,0,0,0, + 5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15, + 1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25, + 1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35, + 1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45, + 1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55, + 1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69, + 1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79, + 1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89, + 1,0,0,0,0,91,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101, + 1,0,0,0,0,103,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0, + 0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1, + 0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0, + 131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0, + 0,0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149, + 1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0, + 0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1, + 0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0, + 177,1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,183,1,0,0,0,0,185,1,0, + 0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0,0,0,0,193,1,0,0,0,0,195, + 1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201,1,0,0,0,0,203,1,0,0,0, + 0,205,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1,0,0,0,0,213,1, + 0,0,0,0,215,1,0,0,0,0,217,1,0,0,0,0,219,1,0,0,0,0,221,1,0,0,0,0, + 223,1,0,0,0,0,225,1,0,0,0,0,227,1,0,0,0,0,229,1,0,0,0,0,231,1,0, + 0,0,0,233,1,0,0,0,0,235,1,0,0,0,0,237,1,0,0,0,0,239,1,0,0,0,0,241, + 1,0,0,0,0,243,1,0,0,0,0,245,1,0,0,0,0,247,1,0,0,0,0,249,1,0,0,0, + 0,251,1,0,0,0,0,253,1,0,0,0,0,259,1,0,0,0,0,261,1,0,0,0,0,263,1, + 0,0,0,1,266,1,0,0,0,3,272,1,0,0,0,5,276,1,0,0,0,7,298,1,0,0,0,9, + 323,1,0,0,0,11,344,1,0,0,0,13,362,1,0,0,0,15,383,1,0,0,0,17,397, + 1,0,0,0,19,411,1,0,0,0,21,418,1,0,0,0,23,427,1,0,0,0,25,440,1,0, + 0,0,27,449,1,0,0,0,29,458,1,0,0,0,31,464,1,0,0,0,33,473,1,0,0,0, + 35,480,1,0,0,0,37,492,1,0,0,0,39,496,1,0,0,0,41,509,1,0,0,0,43,522, + 1,0,0,0,45,536,1,0,0,0,47,548,1,0,0,0,49,558,1,0,0,0,51,563,1,0, + 0,0,53,616,1,0,0,0,55,627,1,0,0,0,57,629,1,0,0,0,59,634,1,0,0,0, + 61,637,1,0,0,0,63,663,1,0,0,0,65,685,1,0,0,0,67,701,1,0,0,0,69,709, + 1,0,0,0,71,711,1,0,0,0,73,713,1,0,0,0,75,715,1,0,0,0,77,717,1,0, + 0,0,79,719,1,0,0,0,81,721,1,0,0,0,83,723,1,0,0,0,85,725,1,0,0,0, + 87,727,1,0,0,0,89,746,1,0,0,0,91,765,1,0,0,0,93,789,1,0,0,0,95,791, + 1,0,0,0,97,796,1,0,0,0,99,809,1,0,0,0,101,815,1,0,0,0,103,826,1, + 0,0,0,105,849,1,0,0,0,107,851,1,0,0,0,109,854,1,0,0,0,111,859,1, + 0,0,0,113,864,1,0,0,0,115,869,1,0,0,0,117,877,1,0,0,0,119,880,1, + 0,0,0,121,884,1,0,0,0,123,888,1,0,0,0,125,892,1,0,0,0,127,897,1, + 0,0,0,129,902,1,0,0,0,131,909,1,0,0,0,133,916,1,0,0,0,135,926,1, + 0,0,0,137,939,1,0,0,0,139,944,1,0,0,0,141,949,1,0,0,0,143,963,1, + 0,0,0,145,976,1,0,0,0,147,981,1,0,0,0,149,989,1,0,0,0,151,1004,1, + 0,0,0,153,1024,1,0,0,0,155,1047,1,0,0,0,157,1057,1,0,0,0,159,1065, + 1,0,0,0,161,1077,1,0,0,0,163,1084,1,0,0,0,165,1092,1,0,0,0,167,1097, + 1,0,0,0,169,1101,1,0,0,0,171,1104,1,0,0,0,173,1109,1,0,0,0,175,1113, + 1,0,0,0,177,1118,1,0,0,0,179,1121,1,0,0,0,181,1126,1,0,0,0,183,1132, + 1,0,0,0,185,1137,1,0,0,0,187,1141,1,0,0,0,189,1144,1,0,0,0,191,1148, + 1,0,0,0,193,1154,1,0,0,0,195,1160,1,0,0,0,197,1166,1,0,0,0,199,1171, + 1,0,0,0,201,1175,1,0,0,0,203,1178,1,0,0,0,205,1181,1,0,0,0,207,1183, + 1,0,0,0,209,1185,1,0,0,0,211,1187,1,0,0,0,213,1189,1,0,0,0,215,1191, + 1,0,0,0,217,1193,1,0,0,0,219,1196,1,0,0,0,221,1199,1,0,0,0,223,1202, + 1,0,0,0,225,1204,1,0,0,0,227,1206,1,0,0,0,229,1208,1,0,0,0,231,1210, + 1,0,0,0,233,1212,1,0,0,0,235,1214,1,0,0,0,237,1216,1,0,0,0,239,1218, + 1,0,0,0,241,1220,1,0,0,0,243,1222,1,0,0,0,245,1224,1,0,0,0,247,1226, + 1,0,0,0,249,1230,1,0,0,0,251,1233,1,0,0,0,253,1236,1,0,0,0,255,1247, + 1,0,0,0,257,1249,1,0,0,0,259,1252,1,0,0,0,261,1256,1,0,0,0,263,1269, + 1,0,0,0,265,267,7,0,0,0,266,265,1,0,0,0,267,268,1,0,0,0,268,266, + 1,0,0,0,268,269,1,0,0,0,269,270,1,0,0,0,270,271,6,0,0,0,271,2,1, + 0,0,0,272,273,5,35,0,0,273,274,5,35,0,0,274,275,5,35,0,0,275,4,1, + 0,0,0,276,277,7,1,0,0,277,278,7,2,0,0,278,279,7,3,0,0,279,280,7, + 1,0,0,280,281,7,4,0,0,281,282,7,5,0,0,282,283,7,6,0,0,283,284,7, + 7,0,0,284,285,7,4,0,0,285,286,5,95,0,0,286,287,7,1,0,0,287,288,7, + 8,0,0,288,289,7,6,0,0,289,290,7,9,0,0,290,291,7,6,0,0,291,292,7, + 5,0,0,292,293,5,95,0,0,293,294,7,4,0,0,294,295,7,10,0,0,295,296, + 7,1,0,0,296,297,7,4,0,0,297,6,1,0,0,0,298,299,7,1,0,0,299,300,7, + 2,0,0,300,301,7,3,0,0,301,302,7,1,0,0,302,303,7,4,0,0,303,304,7, + 5,0,0,304,305,7,6,0,0,305,306,7,7,0,0,306,307,7,4,0,0,307,308,5, + 95,0,0,308,309,7,6,0,0,309,310,7,11,0,0,310,311,7,11,0,0,311,312, + 7,5,0,0,312,313,7,10,0,0,313,314,7,11,0,0,314,315,7,6,0,0,315,316, + 7,4,0,0,316,317,7,10,0,0,317,318,5,95,0,0,318,319,7,4,0,0,319,320, + 7,10,0,0,320,321,7,1,0,0,321,322,7,4,0,0,322,8,1,0,0,0,323,324,7, + 1,0,0,324,325,7,2,0,0,325,326,7,3,0,0,326,327,7,1,0,0,327,328,7, + 4,0,0,328,329,7,5,0,0,329,330,7,6,0,0,330,331,7,7,0,0,331,332,7, + 4,0,0,332,333,5,95,0,0,333,334,7,4,0,0,334,335,7,6,0,0,335,336,7, + 3,0,0,336,337,7,9,0,0,337,338,7,10,0,0,338,339,5,95,0,0,339,340, + 7,4,0,0,340,341,7,10,0,0,341,342,7,1,0,0,342,343,7,4,0,0,343,10, + 1,0,0,0,344,345,7,1,0,0,345,346,7,2,0,0,346,347,7,3,0,0,347,348, + 7,1,0,0,348,349,7,4,0,0,349,350,7,5,0,0,350,351,7,6,0,0,351,352, + 7,7,0,0,352,353,7,4,0,0,353,354,5,95,0,0,354,355,7,7,0,0,355,356, + 7,12,0,0,356,357,7,8,0,0,357,358,7,9,0,0,358,359,7,2,0,0,359,360, + 7,13,0,0,360,361,7,10,0,0,361,12,1,0,0,0,362,363,7,1,0,0,363,364, + 7,2,0,0,364,365,7,3,0,0,365,366,7,1,0,0,366,367,7,4,0,0,367,368, + 7,5,0,0,368,369,7,6,0,0,369,370,7,7,0,0,370,371,7,4,0,0,371,372, + 5,95,0,0,372,373,7,13,0,0,373,374,7,10,0,0,374,375,7,14,0,0,375, + 376,7,10,0,0,376,377,7,12,0,0,377,378,7,13,0,0,378,379,7,10,0,0, + 379,380,7,12,0,0,380,381,7,8,0,0,381,382,7,15,0,0,382,14,1,0,0,0, + 383,385,7,16,0,0,384,386,3,105,52,0,385,384,1,0,0,0,386,387,1,0, + 0,0,387,385,1,0,0,0,387,388,1,0,0,0,388,395,1,0,0,0,389,391,5,46, + 0,0,390,392,3,105,52,0,391,390,1,0,0,0,392,393,1,0,0,0,393,391,1, + 0,0,0,393,394,1,0,0,0,394,396,1,0,0,0,395,389,1,0,0,0,395,396,1, + 0,0,0,396,16,1,0,0,0,397,398,5,35,0,0,398,399,5,32,0,0,399,403,1, + 0,0,0,400,402,8,17,0,0,401,400,1,0,0,0,402,405,1,0,0,0,403,401,1, + 0,0,0,403,404,1,0,0,0,404,407,1,0,0,0,405,403,1,0,0,0,406,408,5, + 13,0,0,407,406,1,0,0,0,407,408,1,0,0,0,408,409,1,0,0,0,409,410,5, + 10,0,0,410,18,1,0,0,0,411,412,7,13,0,0,412,413,7,10,0,0,413,414, + 7,18,0,0,414,415,7,7,0,0,415,416,7,12,0,0,416,417,7,10,0,0,417,20, + 1,0,0,0,418,419,5,60,0,0,419,420,5,33,0,0,420,421,7,10,0,0,421,422, + 7,5,0,0,422,423,7,5,0,0,423,424,7,19,0,0,424,425,7,5,0,0,425,426, + 5,62,0,0,426,22,1,0,0,0,427,428,5,60,0,0,428,429,5,33,0,0,429,430, + 7,2,0,0,430,431,7,12,0,0,431,432,7,13,0,0,432,433,7,10,0,0,433,434, + 7,18,0,0,434,435,7,7,0,0,435,436,7,12,0,0,436,437,7,10,0,0,437,438, + 7,13,0,0,438,439,5,62,0,0,439,24,1,0,0,0,440,441,7,19,0,0,441,442, + 7,16,0,0,442,443,7,10,0,0,443,444,7,5,0,0,444,445,7,18,0,0,445,446, + 7,9,0,0,446,447,7,19,0,0,447,448,7,20,0,0,448,26,1,0,0,0,449,450, + 7,5,0,0,450,451,7,19,0,0,451,452,7,2,0,0,452,453,7,12,0,0,453,454, + 7,13,0,0,454,455,7,7,0,0,455,456,7,12,0,0,456,457,7,11,0,0,457,28, + 1,0,0,0,458,459,7,10,0,0,459,460,7,5,0,0,460,461,7,5,0,0,461,462, + 7,19,0,0,462,463,7,5,0,0,463,30,1,0,0,0,464,465,7,1,0,0,465,466, + 7,6,0,0,466,467,7,4,0,0,467,468,7,2,0,0,468,469,7,5,0,0,469,470, + 7,6,0,0,470,471,7,4,0,0,471,472,7,10,0,0,472,32,1,0,0,0,473,474, + 7,1,0,0,474,475,7,7,0,0,475,476,7,9,0,0,476,477,7,10,0,0,477,478, + 7,12,0,0,478,479,7,4,0,0,479,34,1,0,0,0,480,481,7,4,0,0,481,482, + 7,7,0,0,482,483,7,10,0,0,483,484,5,95,0,0,484,485,7,4,0,0,485,486, + 7,19,0,0,486,487,5,95,0,0,487,488,7,10,0,0,488,489,7,16,0,0,489, + 490,7,10,0,0,490,491,7,12,0,0,491,36,1,0,0,0,492,493,7,12,0,0,493, + 494,7,6,0,0,494,495,7,12,0,0,495,38,1,0,0,0,496,497,7,6,0,0,497, + 498,7,8,0,0,498,499,7,8,0,0,499,500,7,10,0,0,500,501,7,14,0,0,501, + 502,7,4,0,0,502,503,5,95,0,0,503,504,7,12,0,0,504,505,7,2,0,0,505, + 506,7,9,0,0,506,507,7,9,0,0,507,508,7,1,0,0,508,40,1,0,0,0,509,510, + 7,7,0,0,510,511,7,11,0,0,511,512,7,12,0,0,512,513,7,19,0,0,513,514, + 7,5,0,0,514,515,7,10,0,0,515,516,5,95,0,0,516,517,7,12,0,0,517,518, + 7,2,0,0,518,519,7,9,0,0,519,520,7,9,0,0,520,521,7,1,0,0,521,42,1, + 0,0,0,522,523,7,12,0,0,523,524,7,2,0,0,524,525,7,9,0,0,525,526,7, + 9,0,0,526,527,5,95,0,0,527,528,7,21,0,0,528,529,7,6,0,0,529,530, + 7,12,0,0,530,531,7,13,0,0,531,532,7,9,0,0,532,533,7,7,0,0,533,534, + 7,12,0,0,534,535,7,11,0,0,535,44,1,0,0,0,536,537,7,1,0,0,537,538, + 7,14,0,0,538,539,7,6,0,0,539,540,7,8,0,0,540,541,7,10,0,0,541,542, + 7,1,0,0,542,543,5,95,0,0,543,544,7,19,0,0,544,545,7,12,0,0,545,546, + 7,9,0,0,546,547,7,15,0,0,547,46,1,0,0,0,548,549,7,4,0,0,549,550, + 7,5,0,0,550,551,7,2,0,0,551,552,7,12,0,0,552,553,7,8,0,0,553,554, + 7,6,0,0,554,555,7,4,0,0,555,556,7,10,0,0,556,48,1,0,0,0,557,559, + 7,22,0,0,558,557,1,0,0,0,558,559,1,0,0,0,559,560,1,0,0,0,560,561, + 3,255,127,0,561,50,1,0,0,0,562,564,7,22,0,0,563,562,1,0,0,0,563, + 564,1,0,0,0,564,566,1,0,0,0,565,567,7,23,0,0,566,565,1,0,0,0,567, + 568,1,0,0,0,568,566,1,0,0,0,568,569,1,0,0,0,569,576,1,0,0,0,570, + 572,5,46,0,0,571,573,7,23,0,0,572,571,1,0,0,0,573,574,1,0,0,0,574, + 572,1,0,0,0,574,575,1,0,0,0,575,577,1,0,0,0,576,570,1,0,0,0,576, + 577,1,0,0,0,577,52,1,0,0,0,578,580,7,22,0,0,579,578,1,0,0,0,579, + 580,1,0,0,0,580,582,1,0,0,0,581,583,7,23,0,0,582,581,1,0,0,0,583, + 584,1,0,0,0,584,582,1,0,0,0,584,585,1,0,0,0,585,593,1,0,0,0,586, + 590,5,46,0,0,587,589,7,23,0,0,588,587,1,0,0,0,589,592,1,0,0,0,590, + 588,1,0,0,0,590,591,1,0,0,0,591,594,1,0,0,0,592,590,1,0,0,0,593, + 586,1,0,0,0,593,594,1,0,0,0,594,604,1,0,0,0,595,597,7,10,0,0,596, + 598,7,22,0,0,597,596,1,0,0,0,597,598,1,0,0,0,598,600,1,0,0,0,599, + 601,7,23,0,0,600,599,1,0,0,0,601,602,1,0,0,0,602,600,1,0,0,0,602, + 603,1,0,0,0,603,605,1,0,0,0,604,595,1,0,0,0,604,605,1,0,0,0,605, + 617,1,0,0,0,606,608,7,22,0,0,607,606,1,0,0,0,607,608,1,0,0,0,608, + 609,1,0,0,0,609,610,7,7,0,0,610,611,7,12,0,0,611,617,7,18,0,0,612, + 613,7,1,0,0,613,614,7,12,0,0,614,615,7,6,0,0,615,617,7,12,0,0,616, + 579,1,0,0,0,616,607,1,0,0,0,616,612,1,0,0,0,617,54,1,0,0,0,618,619, + 7,4,0,0,619,620,7,5,0,0,620,621,7,2,0,0,621,628,7,10,0,0,622,623, + 7,18,0,0,623,624,7,6,0,0,624,625,7,9,0,0,625,626,7,1,0,0,626,628, + 7,10,0,0,627,618,1,0,0,0,627,622,1,0,0,0,628,56,1,0,0,0,629,630, + 7,23,0,0,630,631,7,23,0,0,631,632,7,23,0,0,632,633,7,23,0,0,633, + 58,1,0,0,0,634,635,7,23,0,0,635,636,7,23,0,0,636,60,1,0,0,0,637, + 638,5,39,0,0,638,639,3,57,28,0,639,640,5,45,0,0,640,641,3,59,29, + 0,641,642,5,45,0,0,642,643,3,59,29,0,643,644,7,4,0,0,644,645,3,59, + 29,0,645,646,5,58,0,0,646,647,3,59,29,0,647,648,5,58,0,0,648,655, + 3,59,29,0,649,651,5,46,0,0,650,652,7,23,0,0,651,650,1,0,0,0,652, + 653,1,0,0,0,653,651,1,0,0,0,653,654,1,0,0,0,654,656,1,0,0,0,655, + 649,1,0,0,0,655,656,1,0,0,0,656,657,1,0,0,0,657,658,7,22,0,0,658, + 659,3,59,29,0,659,660,5,58,0,0,660,661,3,59,29,0,661,662,5,39,0, + 0,662,62,1,0,0,0,663,664,5,39,0,0,664,665,3,57,28,0,665,666,5,45, + 0,0,666,667,3,59,29,0,667,668,5,45,0,0,668,669,3,59,29,0,669,670, + 7,4,0,0,670,671,3,59,29,0,671,672,5,58,0,0,672,673,3,59,29,0,673, + 674,5,58,0,0,674,681,3,59,29,0,675,677,5,46,0,0,676,678,7,23,0,0, + 677,676,1,0,0,0,678,679,1,0,0,0,679,677,1,0,0,0,679,680,1,0,0,0, + 680,682,1,0,0,0,681,675,1,0,0,0,681,682,1,0,0,0,682,683,1,0,0,0, + 683,684,5,39,0,0,684,64,1,0,0,0,685,686,5,39,0,0,686,687,3,59,29, + 0,687,688,5,58,0,0,688,689,3,59,29,0,689,690,5,58,0,0,690,697,3, + 59,29,0,691,693,5,46,0,0,692,694,7,23,0,0,693,692,1,0,0,0,694,695, + 1,0,0,0,695,693,1,0,0,0,695,696,1,0,0,0,696,698,1,0,0,0,697,691, + 1,0,0,0,697,698,1,0,0,0,698,699,1,0,0,0,699,700,5,39,0,0,700,66, + 1,0,0,0,701,702,5,39,0,0,702,703,3,57,28,0,703,704,5,45,0,0,704, + 705,3,59,29,0,705,706,5,45,0,0,706,707,3,59,29,0,707,708,5,39,0, + 0,708,68,1,0,0,0,709,710,7,14,0,0,710,70,1,0,0,0,711,712,7,4,0,0, + 712,72,1,0,0,0,713,714,7,15,0,0,714,74,1,0,0,0,715,716,7,24,0,0, + 716,76,1,0,0,0,717,718,7,13,0,0,718,78,1,0,0,0,719,720,7,21,0,0, + 720,80,1,0,0,0,721,722,7,1,0,0,722,82,1,0,0,0,723,724,7,18,0,0,724, + 84,1,0,0,0,725,726,3,225,112,0,726,86,1,0,0,0,727,728,3,223,111, + 0,728,88,1,0,0,0,729,730,5,39,0,0,730,731,3,69,34,0,731,732,3,49, + 24,0,732,736,3,73,36,0,733,734,3,49,24,0,734,735,3,75,37,0,735,737, + 1,0,0,0,736,733,1,0,0,0,736,737,1,0,0,0,737,738,1,0,0,0,738,739, + 5,39,0,0,739,747,1,0,0,0,740,741,5,39,0,0,741,742,3,69,34,0,742, + 743,3,49,24,0,743,744,3,75,37,0,744,745,5,39,0,0,745,747,1,0,0,0, + 746,729,1,0,0,0,746,740,1,0,0,0,747,90,1,0,0,0,748,749,5,39,0,0, + 749,750,3,69,34,0,750,751,3,49,24,0,751,755,3,77,38,0,752,753,3, + 71,35,0,753,754,3,93,46,0,754,756,1,0,0,0,755,752,1,0,0,0,755,756, + 1,0,0,0,756,757,1,0,0,0,757,758,5,39,0,0,758,766,1,0,0,0,759,760, + 5,39,0,0,760,761,3,69,34,0,761,762,3,71,35,0,762,763,3,93,46,0,763, + 764,5,39,0,0,764,766,1,0,0,0,765,748,1,0,0,0,765,759,1,0,0,0,766, + 92,1,0,0,0,767,768,3,49,24,0,768,772,3,79,39,0,769,770,3,49,24,0, + 770,771,3,75,37,0,771,773,1,0,0,0,772,769,1,0,0,0,772,773,1,0,0, + 0,773,777,1,0,0,0,774,775,3,51,25,0,775,776,3,81,40,0,776,778,1, + 0,0,0,777,774,1,0,0,0,777,778,1,0,0,0,778,790,1,0,0,0,779,780,3, + 49,24,0,780,784,3,75,37,0,781,782,3,51,25,0,782,783,3,81,40,0,783, + 785,1,0,0,0,784,781,1,0,0,0,784,785,1,0,0,0,785,790,1,0,0,0,786, + 787,3,51,25,0,787,788,3,81,40,0,788,790,1,0,0,0,789,767,1,0,0,0, + 789,779,1,0,0,0,789,786,1,0,0,0,790,94,1,0,0,0,791,792,7,12,0,0, + 792,793,7,2,0,0,793,794,7,9,0,0,794,795,7,9,0,0,795,96,1,0,0,0,796, + 804,5,39,0,0,797,798,5,92,0,0,798,803,9,0,0,0,799,800,5,39,0,0,800, + 803,5,39,0,0,801,803,8,25,0,0,802,797,1,0,0,0,802,799,1,0,0,0,802, + 801,1,0,0,0,803,806,1,0,0,0,804,802,1,0,0,0,804,805,1,0,0,0,805, + 807,1,0,0,0,806,804,1,0,0,0,807,808,5,39,0,0,808,98,1,0,0,0,809, + 810,7,8,0,0,810,811,7,19,0,0,811,812,7,9,0,0,812,813,1,0,0,0,813, + 814,3,255,127,0,814,100,1,0,0,0,815,816,5,47,0,0,816,817,5,47,0, + 0,817,821,1,0,0,0,818,820,8,17,0,0,819,818,1,0,0,0,820,823,1,0,0, + 0,821,819,1,0,0,0,821,822,1,0,0,0,822,824,1,0,0,0,823,821,1,0,0, + 0,824,825,6,50,0,0,825,102,1,0,0,0,826,827,5,47,0,0,827,828,5,42, + 0,0,828,836,1,0,0,0,829,837,8,26,0,0,830,832,5,42,0,0,831,830,1, + 0,0,0,832,833,1,0,0,0,833,831,1,0,0,0,833,834,1,0,0,0,834,835,1, + 0,0,0,835,837,8,27,0,0,836,829,1,0,0,0,836,831,1,0,0,0,837,841,1, + 0,0,0,838,840,5,42,0,0,839,838,1,0,0,0,840,843,1,0,0,0,841,839,1, + 0,0,0,841,842,1,0,0,0,842,844,1,0,0,0,843,841,1,0,0,0,844,845,5, + 42,0,0,845,846,5,47,0,0,846,847,1,0,0,0,847,848,6,51,0,0,848,104, + 1,0,0,0,849,850,7,23,0,0,850,106,1,0,0,0,851,852,7,7,0,0,852,853, + 7,18,0,0,853,108,1,0,0,0,854,855,7,4,0,0,855,856,7,21,0,0,856,857, + 7,10,0,0,857,858,7,12,0,0,858,110,1,0,0,0,859,860,7,10,0,0,860,861, + 7,9,0,0,861,862,7,1,0,0,862,863,7,10,0,0,863,112,1,0,0,0,864,865, + 7,18,0,0,865,866,7,2,0,0,866,867,7,12,0,0,867,868,7,8,0,0,868,114, + 1,0,0,0,869,870,7,3,0,0,870,871,7,19,0,0,871,872,7,19,0,0,872,873, + 7,9,0,0,873,874,7,10,0,0,874,875,7,6,0,0,875,876,7,12,0,0,876,116, + 1,0,0,0,877,878,7,7,0,0,878,879,5,56,0,0,879,118,1,0,0,0,880,881, + 7,7,0,0,881,882,5,49,0,0,882,883,5,54,0,0,883,120,1,0,0,0,884,885, + 7,7,0,0,885,886,5,51,0,0,886,887,5,50,0,0,887,122,1,0,0,0,888,889, + 7,7,0,0,889,890,5,54,0,0,890,891,5,52,0,0,891,124,1,0,0,0,892,893, + 7,18,0,0,893,894,7,14,0,0,894,895,5,51,0,0,895,896,5,50,0,0,896, + 126,1,0,0,0,897,898,7,18,0,0,898,899,7,14,0,0,899,900,5,54,0,0,900, + 901,5,52,0,0,901,128,1,0,0,0,902,903,7,1,0,0,903,904,7,4,0,0,904, + 905,7,5,0,0,905,906,7,7,0,0,906,907,7,12,0,0,907,908,7,11,0,0,908, + 130,1,0,0,0,909,910,7,3,0,0,910,911,7,7,0,0,911,912,7,12,0,0,912, + 913,7,6,0,0,913,914,7,5,0,0,914,915,7,15,0,0,915,132,1,0,0,0,916, + 917,7,4,0,0,917,918,7,7,0,0,918,919,7,24,0,0,919,920,7,10,0,0,920, + 921,7,1,0,0,921,922,7,4,0,0,922,923,7,6,0,0,923,924,7,24,0,0,924, + 925,7,14,0,0,925,134,1,0,0,0,926,927,7,4,0,0,927,928,7,7,0,0,928, + 929,7,24,0,0,929,930,7,10,0,0,930,931,7,1,0,0,931,932,7,4,0,0,932, + 933,7,6,0,0,933,934,7,24,0,0,934,935,7,14,0,0,935,936,5,95,0,0,936, + 937,7,4,0,0,937,938,7,28,0,0,938,136,1,0,0,0,939,940,7,13,0,0,940, + 941,7,6,0,0,941,942,7,4,0,0,942,943,7,10,0,0,943,138,1,0,0,0,944, + 945,7,4,0,0,945,946,7,7,0,0,946,947,7,24,0,0,947,948,7,10,0,0,948, + 140,1,0,0,0,949,950,7,7,0,0,950,951,7,12,0,0,951,952,7,4,0,0,952, + 953,7,10,0,0,953,954,7,5,0,0,954,955,7,16,0,0,955,956,7,6,0,0,956, + 957,7,9,0,0,957,958,5,95,0,0,958,959,7,15,0,0,959,960,7,10,0,0,960, + 961,7,6,0,0,961,962,7,5,0,0,962,142,1,0,0,0,963,964,7,7,0,0,964, + 965,7,12,0,0,965,966,7,4,0,0,966,967,7,10,0,0,967,968,7,5,0,0,968, + 969,7,16,0,0,969,970,7,6,0,0,970,971,7,9,0,0,971,972,5,95,0,0,972, + 973,7,13,0,0,973,974,7,6,0,0,974,975,7,15,0,0,975,144,1,0,0,0,976, + 977,7,2,0,0,977,978,7,2,0,0,978,979,7,7,0,0,979,980,7,13,0,0,980, + 146,1,0,0,0,981,982,7,13,0,0,982,983,7,10,0,0,983,984,7,8,0,0,984, + 985,7,7,0,0,985,986,7,24,0,0,986,987,7,6,0,0,987,988,7,9,0,0,988, + 148,1,0,0,0,989,990,7,14,0,0,990,991,7,5,0,0,991,992,7,10,0,0,992, + 993,7,8,0,0,993,994,7,7,0,0,994,995,7,1,0,0,995,996,7,7,0,0,996, + 997,7,19,0,0,997,998,7,12,0,0,998,999,5,95,0,0,999,1000,7,4,0,0, + 1000,1001,7,7,0,0,1001,1002,7,24,0,0,1002,1003,7,10,0,0,1003,150, + 1,0,0,0,1004,1005,7,14,0,0,1005,1006,7,5,0,0,1006,1007,7,10,0,0, + 1007,1008,7,8,0,0,1008,1009,7,7,0,0,1009,1010,7,1,0,0,1010,1011, + 7,7,0,0,1011,1012,7,19,0,0,1012,1013,7,12,0,0,1013,1014,5,95,0,0, + 1014,1015,7,4,0,0,1015,1016,7,7,0,0,1016,1017,7,24,0,0,1017,1018, + 7,10,0,0,1018,1019,7,1,0,0,1019,1020,7,4,0,0,1020,1021,7,6,0,0,1021, + 1022,7,24,0,0,1022,1023,7,14,0,0,1023,152,1,0,0,0,1024,1025,7,14, + 0,0,1025,1026,7,5,0,0,1026,1027,7,10,0,0,1027,1028,7,8,0,0,1028, + 1029,7,7,0,0,1029,1030,7,1,0,0,1030,1031,7,7,0,0,1031,1032,7,19, + 0,0,1032,1033,7,12,0,0,1033,1034,5,95,0,0,1034,1035,7,4,0,0,1035, + 1036,7,7,0,0,1036,1037,7,24,0,0,1037,1038,7,10,0,0,1038,1039,7,1, + 0,0,1039,1040,7,4,0,0,1040,1041,7,6,0,0,1041,1042,7,24,0,0,1042, + 1043,7,14,0,0,1043,1044,5,95,0,0,1044,1045,7,4,0,0,1045,1046,7,28, + 0,0,1046,154,1,0,0,0,1047,1048,7,18,0,0,1048,1049,7,7,0,0,1049,1050, + 7,29,0,0,1050,1051,7,10,0,0,1051,1052,7,13,0,0,1052,1053,7,8,0,0, + 1053,1054,7,21,0,0,1054,1055,7,6,0,0,1055,1056,7,5,0,0,1056,156, + 1,0,0,0,1057,1058,7,16,0,0,1058,1059,7,6,0,0,1059,1060,7,5,0,0,1060, + 1061,7,8,0,0,1061,1062,7,21,0,0,1062,1063,7,6,0,0,1063,1064,7,5, + 0,0,1064,158,1,0,0,0,1065,1066,7,18,0,0,1066,1067,7,7,0,0,1067,1068, + 7,29,0,0,1068,1069,7,10,0,0,1069,1070,7,13,0,0,1070,1071,7,3,0,0, + 1071,1072,7,7,0,0,1072,1073,7,12,0,0,1073,1074,7,6,0,0,1074,1075, + 7,5,0,0,1075,1076,7,15,0,0,1076,160,1,0,0,0,1077,1078,7,1,0,0,1078, + 1079,7,4,0,0,1079,1080,7,5,0,0,1080,1081,7,2,0,0,1081,1082,7,8,0, + 0,1082,1083,7,4,0,0,1083,162,1,0,0,0,1084,1085,7,12,0,0,1085,1086, + 7,1,0,0,1086,1087,7,4,0,0,1087,1088,7,5,0,0,1088,1089,7,2,0,0,1089, + 1090,7,8,0,0,1090,1091,7,4,0,0,1091,164,1,0,0,0,1092,1093,7,9,0, + 0,1093,1094,7,7,0,0,1094,1095,7,1,0,0,1095,1096,7,4,0,0,1096,166, + 1,0,0,0,1097,1098,7,24,0,0,1098,1099,7,6,0,0,1099,1100,7,14,0,0, + 1100,168,1,0,0,0,1101,1102,7,2,0,0,1102,1103,5,33,0,0,1103,170,1, + 0,0,0,1104,1105,7,3,0,0,1105,1106,7,19,0,0,1106,1107,7,19,0,0,1107, + 1108,7,9,0,0,1108,172,1,0,0,0,1109,1110,7,1,0,0,1110,1111,7,4,0, + 0,1111,1112,7,5,0,0,1112,174,1,0,0,0,1113,1114,7,16,0,0,1114,1115, + 7,3,0,0,1115,1116,7,7,0,0,1116,1117,7,12,0,0,1117,176,1,0,0,0,1118, + 1119,7,4,0,0,1119,1120,7,1,0,0,1120,178,1,0,0,0,1121,1122,7,4,0, + 0,1122,1123,7,1,0,0,1123,1124,7,4,0,0,1124,1125,7,28,0,0,1125,180, + 1,0,0,0,1126,1127,7,7,0,0,1127,1128,7,15,0,0,1128,1129,7,10,0,0, + 1129,1130,7,6,0,0,1130,1131,7,5,0,0,1131,182,1,0,0,0,1132,1133,7, + 7,0,0,1133,1134,7,13,0,0,1134,1135,7,6,0,0,1135,1136,7,15,0,0,1136, + 184,1,0,0,0,1137,1138,7,13,0,0,1138,1139,7,10,0,0,1139,1140,7,8, + 0,0,1140,186,1,0,0,0,1141,1142,7,14,0,0,1142,1143,7,4,0,0,1143,188, + 1,0,0,0,1144,1145,7,14,0,0,1145,1146,7,4,0,0,1146,1147,7,1,0,0,1147, + 190,1,0,0,0,1148,1149,7,14,0,0,1149,1150,7,4,0,0,1150,1151,7,1,0, + 0,1151,1152,7,4,0,0,1152,1153,7,28,0,0,1153,192,1,0,0,0,1154,1155, + 7,18,0,0,1155,1156,7,8,0,0,1156,1157,7,21,0,0,1157,1158,7,6,0,0, + 1158,1159,7,5,0,0,1159,194,1,0,0,0,1160,1161,7,16,0,0,1161,1162, + 7,8,0,0,1162,1163,7,21,0,0,1163,1164,7,6,0,0,1164,1165,7,5,0,0,1165, + 196,1,0,0,0,1166,1167,7,18,0,0,1167,1168,7,3,0,0,1168,1169,7,7,0, + 0,1169,1170,7,12,0,0,1170,198,1,0,0,0,1171,1172,7,6,0,0,1172,1173, + 7,12,0,0,1173,1174,7,15,0,0,1174,200,1,0,0,0,1175,1176,3,199,99, + 0,1176,1177,7,23,0,0,1177,202,1,0,0,0,1178,1179,5,58,0,0,1179,1180, + 5,58,0,0,1180,204,1,0,0,0,1181,1182,5,43,0,0,1182,206,1,0,0,0,1183, + 1184,5,45,0,0,1184,208,1,0,0,0,1185,1186,5,42,0,0,1186,210,1,0,0, + 0,1187,1188,5,47,0,0,1188,212,1,0,0,0,1189,1190,5,37,0,0,1190,214, + 1,0,0,0,1191,1192,5,61,0,0,1192,216,1,0,0,0,1193,1194,5,33,0,0,1194, + 1195,5,61,0,0,1195,218,1,0,0,0,1196,1197,5,62,0,0,1197,1198,5,61, + 0,0,1198,220,1,0,0,0,1199,1200,5,60,0,0,1200,1201,5,61,0,0,1201, + 222,1,0,0,0,1202,1203,5,62,0,0,1203,224,1,0,0,0,1204,1205,5,60,0, + 0,1205,226,1,0,0,0,1206,1207,5,33,0,0,1207,228,1,0,0,0,1208,1209, + 5,40,0,0,1209,230,1,0,0,0,1210,1211,5,41,0,0,1211,232,1,0,0,0,1212, + 1213,5,91,0,0,1213,234,1,0,0,0,1214,1215,5,93,0,0,1215,236,1,0,0, + 0,1216,1217,5,44,0,0,1217,238,1,0,0,0,1218,1219,5,58,0,0,1219,240, + 1,0,0,0,1220,1221,5,63,0,0,1221,242,1,0,0,0,1222,1223,5,35,0,0,1223, + 244,1,0,0,0,1224,1225,5,46,0,0,1225,246,1,0,0,0,1226,1227,7,6,0, + 0,1227,1228,7,12,0,0,1228,1229,7,13,0,0,1229,248,1,0,0,0,1230,1231, + 7,19,0,0,1231,1232,7,5,0,0,1232,250,1,0,0,0,1233,1234,5,58,0,0,1234, + 1235,5,61,0,0,1235,252,1,0,0,0,1236,1237,5,45,0,0,1237,1238,5,62, + 0,0,1238,254,1,0,0,0,1239,1243,2,49,57,0,1240,1242,3,257,128,0,1241, + 1240,1,0,0,0,1242,1245,1,0,0,0,1243,1241,1,0,0,0,1243,1244,1,0,0, + 0,1244,1248,1,0,0,0,1245,1243,1,0,0,0,1246,1248,5,48,0,0,1247,1239, + 1,0,0,0,1247,1246,1,0,0,0,1248,256,1,0,0,0,1249,1250,2,48,57,0,1250, + 258,1,0,0,0,1251,1253,5,45,0,0,1252,1251,1,0,0,0,1252,1253,1,0,0, + 0,1253,1254,1,0,0,0,1254,1255,3,255,127,0,1255,260,1,0,0,0,1256, + 1261,7,30,0,0,1257,1260,7,30,0,0,1258,1260,3,257,128,0,1259,1257, + 1,0,0,0,1259,1258,1,0,0,0,1260,1263,1,0,0,0,1261,1259,1,0,0,0,1261, + 1262,1,0,0,0,1262,262,1,0,0,0,1263,1261,1,0,0,0,1264,1266,5,13,0, + 0,1265,1267,5,10,0,0,1266,1265,1,0,0,0,1266,1267,1,0,0,0,1267,1270, + 1,0,0,0,1268,1270,5,10,0,0,1269,1264,1,0,0,0,1269,1268,1,0,0,0,1270, + 264,1,0,0,0,49,0,268,387,393,395,403,407,558,563,568,574,576,579, + 584,590,593,597,602,604,607,616,627,653,655,679,681,695,697,736, + 746,755,765,772,777,784,789,802,804,821,833,836,841,1243,1247,1252, + 1259,1261,1266,1269,1,0,1,0 ] class FuncTestCaseLexer(Lexer): @@ -476,127 +484,128 @@ class FuncTestCaseLexer(Lexer): TripleHash = 2 SubstraitScalarTest = 3 SubstraitAggregateTest = 4 - SubstraitInclude = 5 - SubstraitDependency = 6 - FormatVersion = 7 - DescriptionLine = 8 - Define = 9 - ErrorResult = 10 - UndefineResult = 11 - Overflow = 12 - Rounding = 13 - Error = 14 - Saturate = 15 - Silent = 16 - TieToEven = 17 - NaN = 18 - AcceptNulls = 19 - IgnoreNulls = 20 - NullHandling = 21 - SpacesOnly = 22 - Truncate = 23 - IntegerLiteral = 24 - DecimalLiteral = 25 - FloatLiteral = 26 - BooleanLiteral = 27 - TimestampTzLiteral = 28 - TimestampLiteral = 29 - TimeLiteral = 30 - DateLiteral = 31 - PeriodPrefix = 32 - TimePrefix = 33 - YearPrefix = 34 - MSuffix = 35 - DaySuffix = 36 - HourSuffix = 37 - SecondSuffix = 38 - FractionalSecondSuffix = 39 - OAngleBracket = 40 - CAngleBracket = 41 - IntervalYearLiteral = 42 - IntervalDayLiteral = 43 - NullLiteral = 44 - StringLiteral = 45 - ColumnName = 46 - LineComment = 47 - BlockComment = 48 - If = 49 - Then = 50 - Else = 51 - Func = 52 - Boolean = 53 - I8 = 54 - I16 = 55 - I32 = 56 - I64 = 57 - FP32 = 58 - FP64 = 59 - String = 60 - Binary = 61 - Timestamp = 62 - Timestamp_TZ = 63 - Date = 64 - Time = 65 - Interval_Year = 66 - Interval_Day = 67 - UUID = 68 - Decimal = 69 - Precision_Time = 70 - Precision_Timestamp = 71 - Precision_Timestamp_TZ = 72 - FixedChar = 73 - VarChar = 74 - FixedBinary = 75 - Struct = 76 - NStruct = 77 - List = 78 - Map = 79 - UserDefined = 80 - Bool = 81 - Str = 82 - VBin = 83 - Ts = 84 - TsTZ = 85 - IYear = 86 - IDay = 87 - Dec = 88 - PT = 89 - PTs = 90 - PTsTZ = 91 - FChar = 92 - VChar = 93 - FBin = 94 - Any = 95 - AnyVar = 96 - DoubleColon = 97 - Plus = 98 - Minus = 99 - Asterisk = 100 - ForwardSlash = 101 - Percent = 102 - Eq = 103 - Ne = 104 - Gte = 105 - Lte = 106 - Gt = 107 - Lt = 108 - Bang = 109 - OParen = 110 - CParen = 111 - OBracket = 112 - CBracket = 113 - Comma = 114 - Colon = 115 - QMark = 116 - Hash = 117 - Dot = 118 - And = 119 - Or = 120 - Assign = 121 - Arrow = 122 - Number = 123 - Identifier = 124 - Newline = 125 + SubstraitTableTest = 5 + SubstraitInclude = 6 + SubstraitDependency = 7 + FormatVersion = 8 + DescriptionLine = 9 + Define = 10 + ErrorResult = 11 + UndefineResult = 12 + Overflow = 13 + Rounding = 14 + Error = 15 + Saturate = 16 + Silent = 17 + TieToEven = 18 + NaN = 19 + AcceptNulls = 20 + IgnoreNulls = 21 + NullHandling = 22 + SpacesOnly = 23 + Truncate = 24 + IntegerLiteral = 25 + DecimalLiteral = 26 + FloatLiteral = 27 + BooleanLiteral = 28 + TimestampTzLiteral = 29 + TimestampLiteral = 30 + TimeLiteral = 31 + DateLiteral = 32 + PeriodPrefix = 33 + TimePrefix = 34 + YearPrefix = 35 + MSuffix = 36 + DaySuffix = 37 + HourSuffix = 38 + SecondSuffix = 39 + FractionalSecondSuffix = 40 + OAngleBracket = 41 + CAngleBracket = 42 + IntervalYearLiteral = 43 + IntervalDayLiteral = 44 + NullLiteral = 45 + StringLiteral = 46 + ColumnName = 47 + LineComment = 48 + BlockComment = 49 + If = 50 + Then = 51 + Else = 52 + Func = 53 + Boolean = 54 + I8 = 55 + I16 = 56 + I32 = 57 + I64 = 58 + FP32 = 59 + FP64 = 60 + String = 61 + Binary = 62 + Timestamp = 63 + Timestamp_TZ = 64 + Date = 65 + Time = 66 + Interval_Year = 67 + Interval_Day = 68 + UUID = 69 + Decimal = 70 + Precision_Time = 71 + Precision_Timestamp = 72 + Precision_Timestamp_TZ = 73 + FixedChar = 74 + VarChar = 75 + FixedBinary = 76 + Struct = 77 + NStruct = 78 + List = 79 + Map = 80 + UserDefined = 81 + Bool = 82 + Str = 83 + VBin = 84 + Ts = 85 + TsTZ = 86 + IYear = 87 + IDay = 88 + Dec = 89 + PT = 90 + PTs = 91 + PTsTZ = 92 + FChar = 93 + VChar = 94 + FBin = 95 + Any = 96 + AnyVar = 97 + DoubleColon = 98 + Plus = 99 + Minus = 100 + Asterisk = 101 + ForwardSlash = 102 + Percent = 103 + Eq = 104 + Ne = 105 + Gte = 106 + Lte = 107 + Gt = 108 + Lt = 109 + Bang = 110 + OParen = 111 + CParen = 112 + OBracket = 113 + CBracket = 114 + Comma = 115 + Colon = 116 + QMark = 117 + Hash = 118 + Dot = 119 + And = 120 + Or = 121 + Assign = 122 + Arrow = 123 + Number = 124 + Identifier = 125 + Newline = 126 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] @@ -604,8 +613,8 @@ class FuncTestCaseLexer(Lexer): literalNames = [ "", "'###'", "'SUBSTRAIT_SCALAR_TEST'", "'SUBSTRAIT_AGGREGATE_TEST'", - "'SUBSTRAIT_INCLUDE'", "'SUBSTRAIT_DEPENDENCY'", "'DEFINE'", - "''", "''", "'OVERFLOW'", "'ROUNDING'", + "'SUBSTRAIT_TABLE_TEST'", "'SUBSTRAIT_INCLUDE'", "'SUBSTRAIT_DEPENDENCY'", + "'DEFINE'", "''", "''", "'OVERFLOW'", "'ROUNDING'", "'ERROR'", "'SATURATE'", "'SILENT'", "'TIE_TO_EVEN'", "'NAN'", "'ACCEPT_NULLS'", "'IGNORE_NULLS'", "'NULL_HANDLING'", "'SPACES_ONLY'", "'TRUNCATE'", "'P'", "'T'", "'Y'", "'M'", "'D'", "'H'", "'S'", @@ -624,15 +633,15 @@ class FuncTestCaseLexer(Lexer): symbolicNames = [ "", "Whitespace", "TripleHash", "SubstraitScalarTest", "SubstraitAggregateTest", - "SubstraitInclude", "SubstraitDependency", "FormatVersion", - "DescriptionLine", "Define", "ErrorResult", "UndefineResult", - "Overflow", "Rounding", "Error", "Saturate", "Silent", "TieToEven", - "NaN", "AcceptNulls", "IgnoreNulls", "NullHandling", "SpacesOnly", - "Truncate", "IntegerLiteral", "DecimalLiteral", "FloatLiteral", - "BooleanLiteral", "TimestampTzLiteral", "TimestampLiteral", - "TimeLiteral", "DateLiteral", "PeriodPrefix", "TimePrefix", - "YearPrefix", "MSuffix", "DaySuffix", "HourSuffix", "SecondSuffix", - "FractionalSecondSuffix", "OAngleBracket", "CAngleBracket", + "SubstraitTableTest", "SubstraitInclude", "SubstraitDependency", + "FormatVersion", "DescriptionLine", "Define", "ErrorResult", + "UndefineResult", "Overflow", "Rounding", "Error", "Saturate", + "Silent", "TieToEven", "NaN", "AcceptNulls", "IgnoreNulls", + "NullHandling", "SpacesOnly", "Truncate", "IntegerLiteral", + "DecimalLiteral", "FloatLiteral", "BooleanLiteral", "TimestampTzLiteral", + "TimestampLiteral", "TimeLiteral", "DateLiteral", "PeriodPrefix", + "TimePrefix", "YearPrefix", "MSuffix", "DaySuffix", "HourSuffix", + "SecondSuffix", "FractionalSecondSuffix", "OAngleBracket", "CAngleBracket", "IntervalYearLiteral", "IntervalDayLiteral", "NullLiteral", "StringLiteral", "ColumnName", "LineComment", "BlockComment", "If", "Then", "Else", "Func", "Boolean", "I8", "I16", "I32", @@ -649,15 +658,15 @@ class FuncTestCaseLexer(Lexer): "Number", "Identifier", "Newline" ] ruleNames = [ "Whitespace", "TripleHash", "SubstraitScalarTest", "SubstraitAggregateTest", - "SubstraitInclude", "SubstraitDependency", "FormatVersion", - "DescriptionLine", "Define", "ErrorResult", "UndefineResult", - "Overflow", "Rounding", "Error", "Saturate", "Silent", - "TieToEven", "NaN", "AcceptNulls", "IgnoreNulls", "NullHandling", - "SpacesOnly", "Truncate", "IntegerLiteral", "DecimalLiteral", - "FloatLiteral", "BooleanLiteral", "FourDigits", "TwoDigits", - "TimestampTzLiteral", "TimestampLiteral", "TimeLiteral", - "DateLiteral", "PeriodPrefix", "TimePrefix", "YearPrefix", - "MSuffix", "DaySuffix", "HourSuffix", "SecondSuffix", + "SubstraitTableTest", "SubstraitInclude", "SubstraitDependency", + "FormatVersion", "DescriptionLine", "Define", "ErrorResult", + "UndefineResult", "Overflow", "Rounding", "Error", "Saturate", + "Silent", "TieToEven", "NaN", "AcceptNulls", "IgnoreNulls", + "NullHandling", "SpacesOnly", "Truncate", "IntegerLiteral", + "DecimalLiteral", "FloatLiteral", "BooleanLiteral", "FourDigits", + "TwoDigits", "TimestampTzLiteral", "TimestampLiteral", + "TimeLiteral", "DateLiteral", "PeriodPrefix", "TimePrefix", + "YearPrefix", "MSuffix", "DaySuffix", "HourSuffix", "SecondSuffix", "FractionalSecondSuffix", "OAngleBracket", "CAngleBracket", "IntervalYearLiteral", "IntervalDayLiteral", "TimeInterval", "NullLiteral", "StringLiteral", "ColumnName", "LineComment", diff --git a/tests/coverage/antlr_parser/FuncTestCaseParser.py b/tests/coverage/antlr_parser/FuncTestCaseParser.py index c9f18894e..d19867170 100644 --- a/tests/coverage/antlr_parser/FuncTestCaseParser.py +++ b/tests/coverage/antlr_parser/FuncTestCaseParser.py @@ -11,7 +11,7 @@ def serializedATN(): return [ - 4,1,125,711,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, + 4,1,126,835,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7, 13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, 20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7, @@ -23,256 +23,302 @@ def serializedATN(): 59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7, 65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2, 72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7, - 78,2,79,7,79,1,0,1,0,4,0,163,8,0,11,0,12,0,164,1,0,1,0,1,1,1,1,1, - 1,5,1,172,8,1,10,1,12,1,175,9,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3, - 1,3,1,3,1,3,5,3,188,8,3,10,3,12,3,191,9,3,1,4,1,4,1,4,1,4,1,4,1, - 5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,3,6,208,8,6,1,6,1,6,1,6,1, - 7,3,7,214,8,7,1,7,4,7,217,8,7,11,7,12,7,218,1,7,3,7,222,8,7,1,7, - 4,7,225,8,7,11,7,12,7,226,3,7,229,8,7,1,8,1,8,1,8,5,8,234,8,8,10, - 8,12,8,237,9,8,1,9,1,9,3,9,241,8,9,1,10,1,10,1,10,1,10,1,10,1,10, - 1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10, - 1,10,1,10,3,10,264,8,10,1,11,1,11,1,11,1,11,1,11,3,11,271,8,11,1, - 11,1,11,1,11,1,12,1,12,1,12,1,12,3,12,280,8,12,1,12,1,12,1,12,1, - 12,1,12,1,12,3,12,288,8,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,3, - 12,297,8,12,1,13,1,13,1,13,1,13,1,13,1,13,5,13,305,8,13,10,13,12, - 13,308,9,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,5,14,318,8,14, - 10,14,12,14,321,9,14,3,14,323,8,14,1,14,1,14,1,15,1,15,1,15,1,15, - 1,16,1,16,1,16,1,16,5,16,335,8,16,10,16,12,16,338,9,16,3,16,340, - 8,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17, - 3,17,354,8,17,1,18,1,18,1,18,5,18,359,8,18,10,18,12,18,362,9,18, - 1,19,1,19,1,19,5,19,367,8,19,10,19,12,19,370,9,19,1,20,1,20,1,20, - 1,20,3,20,376,8,20,1,21,1,21,1,21,1,21,3,21,382,8,21,1,22,1,22,1, - 22,3,22,387,8,22,1,23,1,23,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1, - 25,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1, - 29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,32,1, - 32,1,32,1,32,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,35,1,35,1, - 35,1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1, - 38,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1, - 42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,5,44,475, - 8,44,10,44,12,44,478,9,44,3,44,480,8,44,1,44,1,44,1,45,1,45,1,45, - 1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,4,46,495,8,46,11,46,12,46, - 496,1,46,3,46,500,8,46,1,47,1,47,1,47,1,47,1,47,1,48,1,48,3,48,509, - 8,48,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49, - 3,49,523,8,49,1,49,1,49,1,49,3,49,528,8,49,3,49,530,8,49,1,50,1, - 50,3,50,534,8,50,1,51,1,51,3,51,538,8,51,1,52,1,52,3,52,542,8,52, - 1,53,1,53,3,53,546,8,53,1,54,1,54,3,54,550,8,54,1,55,1,55,3,55,554, - 8,55,1,56,1,56,3,56,558,8,56,1,57,1,57,3,57,562,8,57,1,58,1,58,3, - 58,566,8,58,1,59,1,59,3,59,570,8,59,1,60,1,60,3,60,574,8,60,1,60, - 1,60,1,60,1,60,3,60,580,8,60,1,61,1,61,3,61,584,8,61,1,61,1,61,1, - 61,1,61,1,62,1,62,3,62,592,8,62,1,62,1,62,1,62,1,62,1,63,1,63,3, - 63,600,8,63,1,63,1,63,1,63,1,63,1,64,1,64,3,64,608,8,64,1,64,1,64, - 1,64,1,64,1,64,1,64,3,64,616,8,64,1,65,1,65,3,65,620,8,65,1,65,1, - 65,1,65,1,65,1,66,1,66,3,66,628,8,66,1,66,1,66,1,66,1,66,1,67,1, - 67,3,67,636,8,67,1,67,1,67,1,67,1,67,1,68,1,68,3,68,644,8,68,1,68, - 1,68,1,68,1,68,1,69,1,69,3,69,652,8,69,1,69,1,69,1,69,1,69,1,69, - 1,69,1,70,1,70,1,70,1,70,1,70,5,70,665,8,70,10,70,12,70,668,9,70, - 1,70,1,70,3,70,672,8,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, - 1,71,3,71,683,8,71,1,72,1,72,1,73,1,73,1,74,1,74,1,74,1,74,1,75, - 1,75,1,76,1,76,1,77,1,77,1,77,5,77,700,8,77,10,77,12,77,703,9,77, - 1,78,1,78,1,79,1,79,3,79,709,8,79,1,79,0,0,80,0,2,4,6,8,10,12,14, - 16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58, - 60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100, - 102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132, - 134,136,138,140,142,144,146,148,150,152,154,156,158,0,22,1,0,3,4, - 2,0,18,18,26,26,2,0,53,53,81,81,2,0,60,60,82,82,2,0,61,61,83,83, - 1,0,54,57,1,0,58,59,2,0,62,62,84,84,2,0,63,63,85,85,2,0,66,66,86, - 86,2,0,67,67,87,87,2,0,73,73,92,92,2,0,74,74,93,93,2,0,75,75,94, - 94,2,0,69,69,88,88,2,0,70,70,89,89,2,0,71,71,90,90,2,0,72,72,91, - 91,1,0,10,11,3,0,12,13,21,22,124,124,5,0,14,20,23,23,27,27,44,44, - 124,124,2,0,23,23,119,120,738,0,160,1,0,0,0,2,168,1,0,0,0,4,176, - 1,0,0,0,6,181,1,0,0,0,8,192,1,0,0,0,10,197,1,0,0,0,12,199,1,0,0, - 0,14,228,1,0,0,0,16,230,1,0,0,0,18,240,1,0,0,0,20,263,1,0,0,0,22, - 265,1,0,0,0,24,296,1,0,0,0,26,298,1,0,0,0,28,313,1,0,0,0,30,326, - 1,0,0,0,32,330,1,0,0,0,34,353,1,0,0,0,36,355,1,0,0,0,38,363,1,0, - 0,0,40,375,1,0,0,0,42,381,1,0,0,0,44,386,1,0,0,0,46,388,1,0,0,0, - 48,390,1,0,0,0,50,394,1,0,0,0,52,398,1,0,0,0,54,402,1,0,0,0,56,406, - 1,0,0,0,58,410,1,0,0,0,60,414,1,0,0,0,62,418,1,0,0,0,64,422,1,0, - 0,0,66,426,1,0,0,0,68,430,1,0,0,0,70,434,1,0,0,0,72,438,1,0,0,0, - 74,442,1,0,0,0,76,446,1,0,0,0,78,450,1,0,0,0,80,454,1,0,0,0,82,458, - 1,0,0,0,84,462,1,0,0,0,86,466,1,0,0,0,88,470,1,0,0,0,90,483,1,0, - 0,0,92,499,1,0,0,0,94,501,1,0,0,0,96,508,1,0,0,0,98,529,1,0,0,0, - 100,531,1,0,0,0,102,535,1,0,0,0,104,539,1,0,0,0,106,543,1,0,0,0, - 108,547,1,0,0,0,110,551,1,0,0,0,112,555,1,0,0,0,114,559,1,0,0,0, - 116,563,1,0,0,0,118,567,1,0,0,0,120,571,1,0,0,0,122,581,1,0,0,0, - 124,589,1,0,0,0,126,597,1,0,0,0,128,605,1,0,0,0,130,617,1,0,0,0, - 132,625,1,0,0,0,134,633,1,0,0,0,136,641,1,0,0,0,138,649,1,0,0,0, - 140,671,1,0,0,0,142,682,1,0,0,0,144,684,1,0,0,0,146,686,1,0,0,0, - 148,688,1,0,0,0,150,692,1,0,0,0,152,694,1,0,0,0,154,696,1,0,0,0, - 156,704,1,0,0,0,158,708,1,0,0,0,160,162,3,2,1,0,161,163,3,14,7,0, - 162,161,1,0,0,0,163,164,1,0,0,0,164,162,1,0,0,0,164,165,1,0,0,0, - 165,166,1,0,0,0,166,167,5,0,0,1,167,1,1,0,0,0,168,169,3,4,2,0,169, - 173,3,6,3,0,170,172,3,8,4,0,171,170,1,0,0,0,172,175,1,0,0,0,173, - 171,1,0,0,0,173,174,1,0,0,0,174,3,1,0,0,0,175,173,1,0,0,0,176,177, - 5,2,0,0,177,178,7,0,0,0,178,179,5,115,0,0,179,180,5,7,0,0,180,5, - 1,0,0,0,181,182,5,2,0,0,182,183,5,5,0,0,183,184,5,115,0,0,184,189, - 5,45,0,0,185,186,5,114,0,0,186,188,5,45,0,0,187,185,1,0,0,0,188, - 191,1,0,0,0,189,187,1,0,0,0,189,190,1,0,0,0,190,7,1,0,0,0,191,189, - 1,0,0,0,192,193,5,2,0,0,193,194,5,6,0,0,194,195,5,115,0,0,195,196, - 5,45,0,0,196,9,1,0,0,0,197,198,5,8,0,0,198,11,1,0,0,0,199,200,3, - 158,79,0,200,201,5,110,0,0,201,202,3,16,8,0,202,207,5,111,0,0,203, - 204,5,112,0,0,204,205,3,154,77,0,205,206,5,113,0,0,206,208,1,0,0, - 0,207,203,1,0,0,0,207,208,1,0,0,0,208,209,1,0,0,0,209,210,5,103, - 0,0,210,211,3,18,9,0,211,13,1,0,0,0,212,214,3,10,5,0,213,212,1,0, - 0,0,213,214,1,0,0,0,214,216,1,0,0,0,215,217,3,12,6,0,216,215,1,0, - 0,0,217,218,1,0,0,0,218,216,1,0,0,0,218,219,1,0,0,0,219,229,1,0, - 0,0,220,222,3,10,5,0,221,220,1,0,0,0,221,222,1,0,0,0,222,224,1,0, - 0,0,223,225,3,22,11,0,224,223,1,0,0,0,225,226,1,0,0,0,226,224,1, - 0,0,0,226,227,1,0,0,0,227,229,1,0,0,0,228,213,1,0,0,0,228,221,1, - 0,0,0,229,15,1,0,0,0,230,235,3,20,10,0,231,232,5,114,0,0,232,234, - 3,20,10,0,233,231,1,0,0,0,234,237,1,0,0,0,235,233,1,0,0,0,235,236, - 1,0,0,0,236,17,1,0,0,0,237,235,1,0,0,0,238,241,3,20,10,0,239,241, - 3,146,73,0,240,238,1,0,0,0,240,239,1,0,0,0,241,19,1,0,0,0,242,264, - 3,48,24,0,243,264,3,50,25,0,244,264,3,52,26,0,245,264,3,56,28,0, - 246,264,3,58,29,0,247,264,3,54,27,0,248,264,3,60,30,0,249,264,3, - 62,31,0,250,264,3,64,32,0,251,264,3,66,33,0,252,264,3,68,34,0,253, - 264,3,70,35,0,254,264,3,72,36,0,255,264,3,74,37,0,256,264,3,76,38, - 0,257,264,3,78,39,0,258,264,3,80,40,0,259,264,3,82,41,0,260,264, - 3,84,42,0,261,264,3,86,43,0,262,264,5,124,0,0,263,242,1,0,0,0,263, - 243,1,0,0,0,263,244,1,0,0,0,263,245,1,0,0,0,263,246,1,0,0,0,263, - 247,1,0,0,0,263,248,1,0,0,0,263,249,1,0,0,0,263,250,1,0,0,0,263, - 251,1,0,0,0,263,252,1,0,0,0,263,253,1,0,0,0,263,254,1,0,0,0,263, - 255,1,0,0,0,263,256,1,0,0,0,263,257,1,0,0,0,263,258,1,0,0,0,263, - 259,1,0,0,0,263,260,1,0,0,0,263,261,1,0,0,0,263,262,1,0,0,0,264, - 21,1,0,0,0,265,270,3,24,12,0,266,267,5,112,0,0,267,268,3,154,77, - 0,268,269,5,113,0,0,269,271,1,0,0,0,270,266,1,0,0,0,270,271,1,0, - 0,0,271,272,1,0,0,0,272,273,5,103,0,0,273,274,3,18,9,0,274,23,1, - 0,0,0,275,276,3,26,13,0,276,277,3,158,79,0,277,279,5,110,0,0,278, - 280,3,36,18,0,279,278,1,0,0,0,279,280,1,0,0,0,280,281,1,0,0,0,281, - 282,5,111,0,0,282,297,1,0,0,0,283,284,3,28,14,0,284,285,3,158,79, - 0,285,287,5,110,0,0,286,288,3,38,19,0,287,286,1,0,0,0,287,288,1, - 0,0,0,288,289,1,0,0,0,289,290,5,111,0,0,290,297,1,0,0,0,291,292, - 3,158,79,0,292,293,5,110,0,0,293,294,3,30,15,0,294,295,5,111,0,0, - 295,297,1,0,0,0,296,275,1,0,0,0,296,283,1,0,0,0,296,291,1,0,0,0, - 297,25,1,0,0,0,298,299,5,9,0,0,299,300,5,124,0,0,300,301,5,110,0, - 0,301,306,3,96,48,0,302,303,5,114,0,0,303,305,3,96,48,0,304,302, - 1,0,0,0,305,308,1,0,0,0,306,304,1,0,0,0,306,307,1,0,0,0,307,309, - 1,0,0,0,308,306,1,0,0,0,309,310,5,111,0,0,310,311,5,103,0,0,311, - 312,3,28,14,0,312,27,1,0,0,0,313,322,5,110,0,0,314,319,3,32,16,0, - 315,316,5,114,0,0,316,318,3,32,16,0,317,315,1,0,0,0,318,321,1,0, - 0,0,319,317,1,0,0,0,319,320,1,0,0,0,320,323,1,0,0,0,321,319,1,0, - 0,0,322,314,1,0,0,0,322,323,1,0,0,0,323,324,1,0,0,0,324,325,5,111, - 0,0,325,29,1,0,0,0,326,327,3,32,16,0,327,328,5,97,0,0,328,329,3, - 96,48,0,329,31,1,0,0,0,330,339,5,110,0,0,331,336,3,34,17,0,332,333, - 5,114,0,0,333,335,3,34,17,0,334,332,1,0,0,0,335,338,1,0,0,0,336, - 334,1,0,0,0,336,337,1,0,0,0,337,340,1,0,0,0,338,336,1,0,0,0,339, - 331,1,0,0,0,339,340,1,0,0,0,340,341,1,0,0,0,341,342,5,111,0,0,342, - 33,1,0,0,0,343,354,5,44,0,0,344,354,3,44,22,0,345,354,5,27,0,0,346, - 354,5,45,0,0,347,354,5,31,0,0,348,354,5,30,0,0,349,354,5,29,0,0, - 350,354,5,28,0,0,351,354,5,42,0,0,352,354,5,43,0,0,353,343,1,0,0, - 0,353,344,1,0,0,0,353,345,1,0,0,0,353,346,1,0,0,0,353,347,1,0,0, - 0,353,348,1,0,0,0,353,349,1,0,0,0,353,350,1,0,0,0,353,351,1,0,0, - 0,353,352,1,0,0,0,354,35,1,0,0,0,355,360,3,40,20,0,356,357,5,114, - 0,0,357,359,3,40,20,0,358,356,1,0,0,0,359,362,1,0,0,0,360,358,1, - 0,0,0,360,361,1,0,0,0,361,37,1,0,0,0,362,360,1,0,0,0,363,368,3,42, - 21,0,364,365,5,114,0,0,365,367,3,42,21,0,366,364,1,0,0,0,367,370, - 1,0,0,0,368,366,1,0,0,0,368,369,1,0,0,0,369,39,1,0,0,0,370,368,1, - 0,0,0,371,372,5,124,0,0,372,373,5,118,0,0,373,376,5,46,0,0,374,376, - 3,20,10,0,375,371,1,0,0,0,375,374,1,0,0,0,376,41,1,0,0,0,377,378, - 5,46,0,0,378,379,5,97,0,0,379,382,3,96,48,0,380,382,3,20,10,0,381, - 377,1,0,0,0,381,380,1,0,0,0,382,43,1,0,0,0,383,387,5,25,0,0,384, - 387,5,24,0,0,385,387,3,46,23,0,386,383,1,0,0,0,386,384,1,0,0,0,386, - 385,1,0,0,0,387,45,1,0,0,0,388,389,7,1,0,0,389,47,1,0,0,0,390,391, - 5,44,0,0,391,392,5,97,0,0,392,393,3,96,48,0,393,49,1,0,0,0,394,395, - 5,24,0,0,395,396,5,97,0,0,396,397,3,106,53,0,397,51,1,0,0,0,398, - 399,3,44,22,0,399,400,5,97,0,0,400,401,3,108,54,0,401,53,1,0,0,0, - 402,403,3,44,22,0,403,404,5,97,0,0,404,405,3,128,64,0,405,55,1,0, - 0,0,406,407,5,27,0,0,407,408,5,97,0,0,408,409,3,100,50,0,409,57, - 1,0,0,0,410,411,5,45,0,0,411,412,5,97,0,0,412,413,3,102,51,0,413, - 59,1,0,0,0,414,415,5,31,0,0,415,416,5,97,0,0,416,417,3,110,55,0, - 417,61,1,0,0,0,418,419,5,30,0,0,419,420,5,97,0,0,420,421,3,112,56, - 0,421,63,1,0,0,0,422,423,5,29,0,0,423,424,5,97,0,0,424,425,3,114, - 57,0,425,65,1,0,0,0,426,427,5,28,0,0,427,428,5,97,0,0,428,429,3, - 116,58,0,429,67,1,0,0,0,430,431,5,42,0,0,431,432,5,97,0,0,432,433, - 3,118,59,0,433,69,1,0,0,0,434,435,5,43,0,0,435,436,5,97,0,0,436, - 437,3,120,60,0,437,71,1,0,0,0,438,439,5,45,0,0,439,440,5,97,0,0, - 440,441,3,122,61,0,441,73,1,0,0,0,442,443,5,45,0,0,443,444,5,97, - 0,0,444,445,3,124,62,0,445,75,1,0,0,0,446,447,5,45,0,0,447,448,5, - 97,0,0,448,449,3,126,63,0,449,77,1,0,0,0,450,451,5,30,0,0,451,452, - 5,97,0,0,452,453,3,130,65,0,453,79,1,0,0,0,454,455,5,29,0,0,455, - 456,5,97,0,0,456,457,3,132,66,0,457,81,1,0,0,0,458,459,5,28,0,0, - 459,460,5,97,0,0,460,461,3,134,67,0,461,83,1,0,0,0,462,463,3,88, - 44,0,463,464,5,97,0,0,464,465,3,136,68,0,465,85,1,0,0,0,466,467, - 3,90,45,0,467,468,5,97,0,0,468,469,3,138,69,0,469,87,1,0,0,0,470, - 479,5,112,0,0,471,476,3,34,17,0,472,473,5,114,0,0,473,475,3,34,17, - 0,474,472,1,0,0,0,475,478,1,0,0,0,476,474,1,0,0,0,476,477,1,0,0, - 0,477,480,1,0,0,0,478,476,1,0,0,0,479,471,1,0,0,0,479,480,1,0,0, - 0,480,481,1,0,0,0,481,482,5,113,0,0,482,89,1,0,0,0,483,484,5,110, - 0,0,484,485,3,92,46,0,485,486,5,122,0,0,486,487,3,94,47,0,487,488, - 5,111,0,0,488,91,1,0,0,0,489,500,5,124,0,0,490,491,5,110,0,0,491, - 494,5,124,0,0,492,493,5,114,0,0,493,495,5,124,0,0,494,492,1,0,0, - 0,495,496,1,0,0,0,496,494,1,0,0,0,496,497,1,0,0,0,497,498,1,0,0, - 0,498,500,5,111,0,0,499,489,1,0,0,0,499,490,1,0,0,0,500,93,1,0,0, - 0,501,502,3,158,79,0,502,503,5,110,0,0,503,504,3,16,8,0,504,505, - 5,111,0,0,505,95,1,0,0,0,506,509,3,98,49,0,507,509,3,142,71,0,508, - 506,1,0,0,0,508,507,1,0,0,0,509,97,1,0,0,0,510,530,3,100,50,0,511, - 530,3,106,53,0,512,530,3,108,54,0,513,530,3,102,51,0,514,530,3,104, - 52,0,515,530,3,114,57,0,516,530,3,116,58,0,517,530,3,110,55,0,518, - 530,3,112,56,0,519,530,3,118,59,0,520,522,5,68,0,0,521,523,5,116, - 0,0,522,521,1,0,0,0,522,523,1,0,0,0,523,530,1,0,0,0,524,525,5,80, - 0,0,525,527,5,124,0,0,526,528,5,116,0,0,527,526,1,0,0,0,527,528, - 1,0,0,0,528,530,1,0,0,0,529,510,1,0,0,0,529,511,1,0,0,0,529,512, - 1,0,0,0,529,513,1,0,0,0,529,514,1,0,0,0,529,515,1,0,0,0,529,516, - 1,0,0,0,529,517,1,0,0,0,529,518,1,0,0,0,529,519,1,0,0,0,529,520, - 1,0,0,0,529,524,1,0,0,0,530,99,1,0,0,0,531,533,7,2,0,0,532,534,5, - 116,0,0,533,532,1,0,0,0,533,534,1,0,0,0,534,101,1,0,0,0,535,537, - 7,3,0,0,536,538,5,116,0,0,537,536,1,0,0,0,537,538,1,0,0,0,538,103, - 1,0,0,0,539,541,7,4,0,0,540,542,5,116,0,0,541,540,1,0,0,0,541,542, - 1,0,0,0,542,105,1,0,0,0,543,545,7,5,0,0,544,546,5,116,0,0,545,544, - 1,0,0,0,545,546,1,0,0,0,546,107,1,0,0,0,547,549,7,6,0,0,548,550, - 5,116,0,0,549,548,1,0,0,0,549,550,1,0,0,0,550,109,1,0,0,0,551,553, - 5,64,0,0,552,554,5,116,0,0,553,552,1,0,0,0,553,554,1,0,0,0,554,111, - 1,0,0,0,555,557,5,65,0,0,556,558,5,116,0,0,557,556,1,0,0,0,557,558, - 1,0,0,0,558,113,1,0,0,0,559,561,7,7,0,0,560,562,5,116,0,0,561,560, - 1,0,0,0,561,562,1,0,0,0,562,115,1,0,0,0,563,565,7,8,0,0,564,566, - 5,116,0,0,565,564,1,0,0,0,565,566,1,0,0,0,566,117,1,0,0,0,567,569, - 7,9,0,0,568,570,5,116,0,0,569,568,1,0,0,0,569,570,1,0,0,0,570,119, - 1,0,0,0,571,573,7,10,0,0,572,574,5,116,0,0,573,572,1,0,0,0,573,574, - 1,0,0,0,574,579,1,0,0,0,575,576,5,40,0,0,576,577,3,144,72,0,577, - 578,5,41,0,0,578,580,1,0,0,0,579,575,1,0,0,0,579,580,1,0,0,0,580, - 121,1,0,0,0,581,583,7,11,0,0,582,584,5,116,0,0,583,582,1,0,0,0,583, - 584,1,0,0,0,584,585,1,0,0,0,585,586,5,40,0,0,586,587,3,144,72,0, - 587,588,5,41,0,0,588,123,1,0,0,0,589,591,7,12,0,0,590,592,5,116, - 0,0,591,590,1,0,0,0,591,592,1,0,0,0,592,593,1,0,0,0,593,594,5,40, - 0,0,594,595,3,144,72,0,595,596,5,41,0,0,596,125,1,0,0,0,597,599, - 7,13,0,0,598,600,5,116,0,0,599,598,1,0,0,0,599,600,1,0,0,0,600,601, - 1,0,0,0,601,602,5,40,0,0,602,603,3,144,72,0,603,604,5,41,0,0,604, - 127,1,0,0,0,605,607,7,14,0,0,606,608,5,116,0,0,607,606,1,0,0,0,607, - 608,1,0,0,0,608,615,1,0,0,0,609,610,5,40,0,0,610,611,3,144,72,0, - 611,612,5,114,0,0,612,613,3,144,72,0,613,614,5,41,0,0,614,616,1, - 0,0,0,615,609,1,0,0,0,615,616,1,0,0,0,616,129,1,0,0,0,617,619,7, - 15,0,0,618,620,5,116,0,0,619,618,1,0,0,0,619,620,1,0,0,0,620,621, - 1,0,0,0,621,622,5,40,0,0,622,623,3,144,72,0,623,624,5,41,0,0,624, - 131,1,0,0,0,625,627,7,16,0,0,626,628,5,116,0,0,627,626,1,0,0,0,627, - 628,1,0,0,0,628,629,1,0,0,0,629,630,5,40,0,0,630,631,3,144,72,0, - 631,632,5,41,0,0,632,133,1,0,0,0,633,635,7,17,0,0,634,636,5,116, - 0,0,635,634,1,0,0,0,635,636,1,0,0,0,636,637,1,0,0,0,637,638,5,40, - 0,0,638,639,3,144,72,0,639,640,5,41,0,0,640,135,1,0,0,0,641,643, - 5,78,0,0,642,644,5,116,0,0,643,642,1,0,0,0,643,644,1,0,0,0,644,645, - 1,0,0,0,645,646,5,40,0,0,646,647,3,96,48,0,647,648,5,41,0,0,648, - 137,1,0,0,0,649,651,5,52,0,0,650,652,5,116,0,0,651,650,1,0,0,0,651, - 652,1,0,0,0,652,653,1,0,0,0,653,654,5,40,0,0,654,655,3,140,70,0, - 655,656,5,122,0,0,656,657,3,96,48,0,657,658,5,41,0,0,658,139,1,0, - 0,0,659,672,3,96,48,0,660,661,5,110,0,0,661,666,3,96,48,0,662,663, - 5,114,0,0,663,665,3,96,48,0,664,662,1,0,0,0,665,668,1,0,0,0,666, - 664,1,0,0,0,666,667,1,0,0,0,667,669,1,0,0,0,668,666,1,0,0,0,669, - 670,5,111,0,0,670,672,1,0,0,0,671,659,1,0,0,0,671,660,1,0,0,0,672, - 141,1,0,0,0,673,683,3,122,61,0,674,683,3,124,62,0,675,683,3,126, - 63,0,676,683,3,128,64,0,677,683,3,120,60,0,678,683,3,130,65,0,679, - 683,3,132,66,0,680,683,3,134,67,0,681,683,3,138,69,0,682,673,1,0, - 0,0,682,674,1,0,0,0,682,675,1,0,0,0,682,676,1,0,0,0,682,677,1,0, - 0,0,682,678,1,0,0,0,682,679,1,0,0,0,682,680,1,0,0,0,682,681,1,0, - 0,0,683,143,1,0,0,0,684,685,5,24,0,0,685,145,1,0,0,0,686,687,7,18, - 0,0,687,147,1,0,0,0,688,689,3,150,75,0,689,690,5,115,0,0,690,691, - 3,152,76,0,691,149,1,0,0,0,692,693,7,19,0,0,693,151,1,0,0,0,694, - 695,7,20,0,0,695,153,1,0,0,0,696,701,3,148,74,0,697,698,5,114,0, - 0,698,700,3,148,74,0,699,697,1,0,0,0,700,703,1,0,0,0,701,699,1,0, - 0,0,701,702,1,0,0,0,702,155,1,0,0,0,703,701,1,0,0,0,704,705,7,21, - 0,0,705,157,1,0,0,0,706,709,3,156,78,0,707,709,5,124,0,0,708,706, - 1,0,0,0,708,707,1,0,0,0,709,159,1,0,0,0,62,164,173,189,207,213,218, - 221,226,228,235,240,263,270,279,287,296,306,319,322,336,339,353, - 360,368,375,381,386,476,479,496,499,508,522,527,529,533,537,541, - 545,549,553,557,561,565,569,573,579,583,591,599,607,615,619,627, - 635,643,651,666,671,682,701,708 + 78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2, + 85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,1,0,1,0,1,0,3,0, + 184,8,0,1,1,1,1,4,1,188,8,1,11,1,12,1,189,1,1,1,1,1,2,1,2,4,2,196, + 8,2,11,2,12,2,197,1,2,1,2,1,3,1,3,4,3,204,8,3,11,3,12,3,205,1,3, + 1,3,1,4,1,4,1,4,1,4,1,4,1,4,5,4,216,8,4,10,4,12,4,219,9,4,1,5,1, + 5,1,5,1,5,1,5,1,5,5,5,227,8,5,10,5,12,5,230,9,5,1,6,1,6,1,6,1,6, + 1,6,1,6,5,6,238,8,6,10,6,12,6,241,9,6,1,7,1,7,1,7,1,7,1,7,1,7,5, + 7,249,8,7,10,7,12,7,252,9,7,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,10,1,10, + 1,10,1,10,1,10,1,10,1,10,1,10,3,10,269,8,10,1,10,1,10,1,10,1,11, + 3,11,275,8,11,1,11,4,11,278,8,11,11,11,12,11,279,1,12,3,12,283,8, + 12,1,12,4,12,286,8,12,11,12,12,12,287,1,13,3,13,291,8,13,1,13,4, + 13,294,8,13,11,13,12,13,295,1,14,1,14,1,14,5,14,301,8,14,10,14,12, + 14,304,9,14,1,15,1,15,3,15,308,8,15,1,16,1,16,1,16,1,16,1,16,1,16, + 1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16, + 1,16,1,16,3,16,331,8,16,1,17,1,17,1,17,1,17,1,17,3,17,338,8,17,1, + 17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,351,8, + 18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,5,19,360,8,19,10,19,12,19, + 363,9,19,3,19,365,8,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,5, + 20,375,8,20,10,20,12,20,378,9,20,3,20,380,8,20,1,20,1,20,1,21,1, + 21,1,21,1,21,3,21,388,8,21,1,21,1,21,1,21,1,21,1,21,1,21,3,21,396, + 8,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,3,21,405,8,21,1,22,1,22, + 1,22,1,22,1,22,1,22,5,22,413,8,22,10,22,12,22,416,9,22,1,22,1,22, + 1,22,1,22,1,23,1,23,1,23,1,23,5,23,426,8,23,10,23,12,23,429,9,23, + 3,23,431,8,23,1,23,1,23,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25, + 5,25,443,8,25,10,25,12,25,446,9,25,3,25,448,8,25,1,25,1,25,1,26, + 1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,3,26,462,8,26,1,27, + 1,27,1,27,5,27,467,8,27,10,27,12,27,470,9,27,1,28,1,28,1,28,5,28, + 475,8,28,10,28,12,28,478,9,28,1,29,1,29,1,29,1,29,3,29,484,8,29, + 1,30,1,30,1,30,1,30,3,30,490,8,30,1,31,1,31,1,31,3,31,495,8,31,1, + 32,1,32,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1, + 35,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1, + 39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,42,1, + 42,1,42,1,42,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,45,1,45,1, + 45,1,45,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1, + 48,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1, + 52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,5,53,583,8,53,10,53,12,53, + 586,9,53,3,53,588,8,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1, + 55,1,55,1,55,1,55,1,55,4,55,603,8,55,11,55,12,55,604,1,55,3,55,608, + 8,55,1,56,1,56,1,56,1,56,1,56,1,57,1,57,3,57,617,8,57,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,631,8,58, + 1,58,1,58,1,58,3,58,636,8,58,3,58,638,8,58,1,59,1,59,3,59,642,8, + 59,1,60,1,60,3,60,646,8,60,1,61,1,61,3,61,650,8,61,1,62,1,62,3,62, + 654,8,62,1,63,1,63,3,63,658,8,63,1,64,1,64,3,64,662,8,64,1,65,1, + 65,3,65,666,8,65,1,66,1,66,3,66,670,8,66,1,67,1,67,3,67,674,8,67, + 1,68,1,68,3,68,678,8,68,1,69,1,69,3,69,682,8,69,1,69,1,69,1,69,1, + 69,3,69,688,8,69,1,70,1,70,3,70,692,8,70,1,70,1,70,1,70,1,70,1,71, + 1,71,3,71,700,8,71,1,71,1,71,1,71,1,71,1,72,1,72,3,72,708,8,72,1, + 72,1,72,1,72,1,72,1,73,1,73,3,73,716,8,73,1,73,1,73,1,73,1,73,1, + 73,1,73,3,73,724,8,73,1,74,1,74,3,74,728,8,74,1,74,1,74,1,74,1,74, + 1,75,1,75,3,75,736,8,75,1,75,1,75,1,75,1,75,1,76,1,76,3,76,744,8, + 76,1,76,1,76,1,76,1,76,1,77,1,77,3,77,752,8,77,1,77,1,77,1,77,1, + 77,1,78,1,78,3,78,760,8,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1, + 79,1,79,1,79,1,79,5,79,773,8,79,10,79,12,79,776,9,79,1,79,1,79,3, + 79,780,8,79,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,3, + 80,792,8,80,1,81,1,81,3,81,796,8,81,1,81,1,81,1,81,1,81,5,81,802, + 8,81,10,81,12,81,805,9,81,1,81,1,81,1,82,1,82,1,83,1,83,1,84,1,84, + 1,84,1,84,1,85,1,85,1,86,1,86,1,87,1,87,1,87,5,87,824,8,87,10,87, + 12,87,827,9,87,1,88,1,88,1,89,1,89,3,89,833,8,89,1,89,0,0,90,0,2, + 4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48, + 50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92, + 94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126, + 128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158, + 160,162,164,166,168,170,172,174,176,178,0,21,2,0,19,19,27,27,2,0, + 54,54,82,82,2,0,61,61,83,83,2,0,62,62,84,84,1,0,55,58,1,0,59,60, + 2,0,63,63,85,85,2,0,64,64,86,86,2,0,67,67,87,87,2,0,68,68,88,88, + 2,0,74,74,93,93,2,0,75,75,94,94,2,0,76,76,95,95,2,0,70,70,89,89, + 2,0,71,71,90,90,2,0,72,72,91,91,2,0,73,73,92,92,1,0,11,12,3,0,13, + 14,22,23,125,125,5,0,15,21,24,24,28,28,45,45,125,125,2,0,24,24,120, + 121,867,0,183,1,0,0,0,2,185,1,0,0,0,4,193,1,0,0,0,6,201,1,0,0,0, + 8,209,1,0,0,0,10,220,1,0,0,0,12,231,1,0,0,0,14,242,1,0,0,0,16,253, + 1,0,0,0,18,258,1,0,0,0,20,260,1,0,0,0,22,274,1,0,0,0,24,282,1,0, + 0,0,26,290,1,0,0,0,28,297,1,0,0,0,30,307,1,0,0,0,32,330,1,0,0,0, + 34,332,1,0,0,0,36,342,1,0,0,0,38,355,1,0,0,0,40,370,1,0,0,0,42,404, + 1,0,0,0,44,406,1,0,0,0,46,421,1,0,0,0,48,434,1,0,0,0,50,438,1,0, + 0,0,52,461,1,0,0,0,54,463,1,0,0,0,56,471,1,0,0,0,58,483,1,0,0,0, + 60,489,1,0,0,0,62,494,1,0,0,0,64,496,1,0,0,0,66,498,1,0,0,0,68,502, + 1,0,0,0,70,506,1,0,0,0,72,510,1,0,0,0,74,514,1,0,0,0,76,518,1,0, + 0,0,78,522,1,0,0,0,80,526,1,0,0,0,82,530,1,0,0,0,84,534,1,0,0,0, + 86,538,1,0,0,0,88,542,1,0,0,0,90,546,1,0,0,0,92,550,1,0,0,0,94,554, + 1,0,0,0,96,558,1,0,0,0,98,562,1,0,0,0,100,566,1,0,0,0,102,570,1, + 0,0,0,104,574,1,0,0,0,106,578,1,0,0,0,108,591,1,0,0,0,110,607,1, + 0,0,0,112,609,1,0,0,0,114,616,1,0,0,0,116,637,1,0,0,0,118,639,1, + 0,0,0,120,643,1,0,0,0,122,647,1,0,0,0,124,651,1,0,0,0,126,655,1, + 0,0,0,128,659,1,0,0,0,130,663,1,0,0,0,132,667,1,0,0,0,134,671,1, + 0,0,0,136,675,1,0,0,0,138,679,1,0,0,0,140,689,1,0,0,0,142,697,1, + 0,0,0,144,705,1,0,0,0,146,713,1,0,0,0,148,725,1,0,0,0,150,733,1, + 0,0,0,152,741,1,0,0,0,154,749,1,0,0,0,156,757,1,0,0,0,158,779,1, + 0,0,0,160,791,1,0,0,0,162,793,1,0,0,0,164,808,1,0,0,0,166,810,1, + 0,0,0,168,812,1,0,0,0,170,816,1,0,0,0,172,818,1,0,0,0,174,820,1, + 0,0,0,176,828,1,0,0,0,178,832,1,0,0,0,180,184,3,2,1,0,181,184,3, + 4,2,0,182,184,3,6,3,0,183,180,1,0,0,0,183,181,1,0,0,0,183,182,1, + 0,0,0,184,1,1,0,0,0,185,187,3,8,4,0,186,188,3,22,11,0,187,186,1, + 0,0,0,188,189,1,0,0,0,189,187,1,0,0,0,189,190,1,0,0,0,190,191,1, + 0,0,0,191,192,5,0,0,1,192,3,1,0,0,0,193,195,3,10,5,0,194,196,3,24, + 12,0,195,194,1,0,0,0,196,197,1,0,0,0,197,195,1,0,0,0,197,198,1,0, + 0,0,198,199,1,0,0,0,199,200,5,0,0,1,200,5,1,0,0,0,201,203,3,12,6, + 0,202,204,3,26,13,0,203,202,1,0,0,0,204,205,1,0,0,0,205,203,1,0, + 0,0,205,206,1,0,0,0,206,207,1,0,0,0,207,208,5,0,0,1,208,7,1,0,0, + 0,209,210,5,2,0,0,210,211,5,3,0,0,211,212,5,116,0,0,212,213,5,8, + 0,0,213,217,3,14,7,0,214,216,3,16,8,0,215,214,1,0,0,0,216,219,1, + 0,0,0,217,215,1,0,0,0,217,218,1,0,0,0,218,9,1,0,0,0,219,217,1,0, + 0,0,220,221,5,2,0,0,221,222,5,4,0,0,222,223,5,116,0,0,223,224,5, + 8,0,0,224,228,3,14,7,0,225,227,3,16,8,0,226,225,1,0,0,0,227,230, + 1,0,0,0,228,226,1,0,0,0,228,229,1,0,0,0,229,11,1,0,0,0,230,228,1, + 0,0,0,231,232,5,2,0,0,232,233,5,5,0,0,233,234,5,116,0,0,234,235, + 5,8,0,0,235,239,3,14,7,0,236,238,3,16,8,0,237,236,1,0,0,0,238,241, + 1,0,0,0,239,237,1,0,0,0,239,240,1,0,0,0,240,13,1,0,0,0,241,239,1, + 0,0,0,242,243,5,2,0,0,243,244,5,6,0,0,244,245,5,116,0,0,245,250, + 5,46,0,0,246,247,5,115,0,0,247,249,5,46,0,0,248,246,1,0,0,0,249, + 252,1,0,0,0,250,248,1,0,0,0,250,251,1,0,0,0,251,15,1,0,0,0,252,250, + 1,0,0,0,253,254,5,2,0,0,254,255,5,7,0,0,255,256,5,116,0,0,256,257, + 5,46,0,0,257,17,1,0,0,0,258,259,5,9,0,0,259,19,1,0,0,0,260,261,3, + 178,89,0,261,262,5,111,0,0,262,263,3,28,14,0,263,268,5,112,0,0,264, + 265,5,113,0,0,265,266,3,174,87,0,266,267,5,114,0,0,267,269,1,0,0, + 0,268,264,1,0,0,0,268,269,1,0,0,0,269,270,1,0,0,0,270,271,5,104, + 0,0,271,272,3,30,15,0,272,21,1,0,0,0,273,275,3,18,9,0,274,273,1, + 0,0,0,274,275,1,0,0,0,275,277,1,0,0,0,276,278,3,20,10,0,277,276, + 1,0,0,0,278,279,1,0,0,0,279,277,1,0,0,0,279,280,1,0,0,0,280,23,1, + 0,0,0,281,283,3,18,9,0,282,281,1,0,0,0,282,283,1,0,0,0,283,285,1, + 0,0,0,284,286,3,34,17,0,285,284,1,0,0,0,286,287,1,0,0,0,287,285, + 1,0,0,0,287,288,1,0,0,0,288,25,1,0,0,0,289,291,3,18,9,0,290,289, + 1,0,0,0,290,291,1,0,0,0,291,293,1,0,0,0,292,294,3,36,18,0,293,292, + 1,0,0,0,294,295,1,0,0,0,295,293,1,0,0,0,295,296,1,0,0,0,296,27,1, + 0,0,0,297,302,3,32,16,0,298,299,5,115,0,0,299,301,3,32,16,0,300, + 298,1,0,0,0,301,304,1,0,0,0,302,300,1,0,0,0,302,303,1,0,0,0,303, + 29,1,0,0,0,304,302,1,0,0,0,305,308,3,32,16,0,306,308,3,166,83,0, + 307,305,1,0,0,0,307,306,1,0,0,0,308,31,1,0,0,0,309,331,3,66,33,0, + 310,331,3,68,34,0,311,331,3,70,35,0,312,331,3,74,37,0,313,331,3, + 76,38,0,314,331,3,72,36,0,315,331,3,78,39,0,316,331,3,80,40,0,317, + 331,3,82,41,0,318,331,3,84,42,0,319,331,3,86,43,0,320,331,3,88,44, + 0,321,331,3,90,45,0,322,331,3,92,46,0,323,331,3,94,47,0,324,331, + 3,96,48,0,325,331,3,98,49,0,326,331,3,100,50,0,327,331,3,102,51, + 0,328,331,3,104,52,0,329,331,5,125,0,0,330,309,1,0,0,0,330,310,1, + 0,0,0,330,311,1,0,0,0,330,312,1,0,0,0,330,313,1,0,0,0,330,314,1, + 0,0,0,330,315,1,0,0,0,330,316,1,0,0,0,330,317,1,0,0,0,330,318,1, + 0,0,0,330,319,1,0,0,0,330,320,1,0,0,0,330,321,1,0,0,0,330,322,1, + 0,0,0,330,323,1,0,0,0,330,324,1,0,0,0,330,325,1,0,0,0,330,326,1, + 0,0,0,330,327,1,0,0,0,330,328,1,0,0,0,330,329,1,0,0,0,331,33,1,0, + 0,0,332,337,3,42,21,0,333,334,5,113,0,0,334,335,3,174,87,0,335,336, + 5,114,0,0,336,338,1,0,0,0,337,333,1,0,0,0,337,338,1,0,0,0,338,339, + 1,0,0,0,339,340,5,104,0,0,340,341,3,30,15,0,341,35,1,0,0,0,342,343, + 3,178,89,0,343,344,5,111,0,0,344,345,3,28,14,0,345,350,5,112,0,0, + 346,347,5,113,0,0,347,348,3,174,87,0,348,349,5,114,0,0,349,351,1, + 0,0,0,350,346,1,0,0,0,350,351,1,0,0,0,351,352,1,0,0,0,352,353,5, + 104,0,0,353,354,3,38,19,0,354,37,1,0,0,0,355,364,5,113,0,0,356,361, + 3,40,20,0,357,358,5,115,0,0,358,360,3,40,20,0,359,357,1,0,0,0,360, + 363,1,0,0,0,361,359,1,0,0,0,361,362,1,0,0,0,362,365,1,0,0,0,363, + 361,1,0,0,0,364,356,1,0,0,0,364,365,1,0,0,0,365,366,1,0,0,0,366, + 367,5,114,0,0,367,368,5,98,0,0,368,369,3,162,81,0,369,39,1,0,0,0, + 370,379,5,111,0,0,371,376,3,52,26,0,372,373,5,115,0,0,373,375,3, + 52,26,0,374,372,1,0,0,0,375,378,1,0,0,0,376,374,1,0,0,0,376,377, + 1,0,0,0,377,380,1,0,0,0,378,376,1,0,0,0,379,371,1,0,0,0,379,380, + 1,0,0,0,380,381,1,0,0,0,381,382,5,112,0,0,382,41,1,0,0,0,383,384, + 3,44,22,0,384,385,3,178,89,0,385,387,5,111,0,0,386,388,3,54,27,0, + 387,386,1,0,0,0,387,388,1,0,0,0,388,389,1,0,0,0,389,390,5,112,0, + 0,390,405,1,0,0,0,391,392,3,46,23,0,392,393,3,178,89,0,393,395,5, + 111,0,0,394,396,3,56,28,0,395,394,1,0,0,0,395,396,1,0,0,0,396,397, + 1,0,0,0,397,398,5,112,0,0,398,405,1,0,0,0,399,400,3,178,89,0,400, + 401,5,111,0,0,401,402,3,48,24,0,402,403,5,112,0,0,403,405,1,0,0, + 0,404,383,1,0,0,0,404,391,1,0,0,0,404,399,1,0,0,0,405,43,1,0,0,0, + 406,407,5,10,0,0,407,408,5,125,0,0,408,409,5,111,0,0,409,414,3,114, + 57,0,410,411,5,115,0,0,411,413,3,114,57,0,412,410,1,0,0,0,413,416, + 1,0,0,0,414,412,1,0,0,0,414,415,1,0,0,0,415,417,1,0,0,0,416,414, + 1,0,0,0,417,418,5,112,0,0,418,419,5,104,0,0,419,420,3,46,23,0,420, + 45,1,0,0,0,421,430,5,111,0,0,422,427,3,50,25,0,423,424,5,115,0,0, + 424,426,3,50,25,0,425,423,1,0,0,0,426,429,1,0,0,0,427,425,1,0,0, + 0,427,428,1,0,0,0,428,431,1,0,0,0,429,427,1,0,0,0,430,422,1,0,0, + 0,430,431,1,0,0,0,431,432,1,0,0,0,432,433,5,112,0,0,433,47,1,0,0, + 0,434,435,3,50,25,0,435,436,5,98,0,0,436,437,3,114,57,0,437,49,1, + 0,0,0,438,447,5,111,0,0,439,444,3,52,26,0,440,441,5,115,0,0,441, + 443,3,52,26,0,442,440,1,0,0,0,443,446,1,0,0,0,444,442,1,0,0,0,444, + 445,1,0,0,0,445,448,1,0,0,0,446,444,1,0,0,0,447,439,1,0,0,0,447, + 448,1,0,0,0,448,449,1,0,0,0,449,450,5,112,0,0,450,51,1,0,0,0,451, + 462,5,45,0,0,452,462,3,62,31,0,453,462,5,28,0,0,454,462,5,46,0,0, + 455,462,5,32,0,0,456,462,5,31,0,0,457,462,5,30,0,0,458,462,5,29, + 0,0,459,462,5,43,0,0,460,462,5,44,0,0,461,451,1,0,0,0,461,452,1, + 0,0,0,461,453,1,0,0,0,461,454,1,0,0,0,461,455,1,0,0,0,461,456,1, + 0,0,0,461,457,1,0,0,0,461,458,1,0,0,0,461,459,1,0,0,0,461,460,1, + 0,0,0,462,53,1,0,0,0,463,468,3,58,29,0,464,465,5,115,0,0,465,467, + 3,58,29,0,466,464,1,0,0,0,467,470,1,0,0,0,468,466,1,0,0,0,468,469, + 1,0,0,0,469,55,1,0,0,0,470,468,1,0,0,0,471,476,3,60,30,0,472,473, + 5,115,0,0,473,475,3,60,30,0,474,472,1,0,0,0,475,478,1,0,0,0,476, + 474,1,0,0,0,476,477,1,0,0,0,477,57,1,0,0,0,478,476,1,0,0,0,479,480, + 5,125,0,0,480,481,5,119,0,0,481,484,5,47,0,0,482,484,3,32,16,0,483, + 479,1,0,0,0,483,482,1,0,0,0,484,59,1,0,0,0,485,486,5,47,0,0,486, + 487,5,98,0,0,487,490,3,114,57,0,488,490,3,32,16,0,489,485,1,0,0, + 0,489,488,1,0,0,0,490,61,1,0,0,0,491,495,5,26,0,0,492,495,5,25,0, + 0,493,495,3,64,32,0,494,491,1,0,0,0,494,492,1,0,0,0,494,493,1,0, + 0,0,495,63,1,0,0,0,496,497,7,0,0,0,497,65,1,0,0,0,498,499,5,45,0, + 0,499,500,5,98,0,0,500,501,3,114,57,0,501,67,1,0,0,0,502,503,5,25, + 0,0,503,504,5,98,0,0,504,505,3,124,62,0,505,69,1,0,0,0,506,507,3, + 62,31,0,507,508,5,98,0,0,508,509,3,126,63,0,509,71,1,0,0,0,510,511, + 3,62,31,0,511,512,5,98,0,0,512,513,3,146,73,0,513,73,1,0,0,0,514, + 515,5,28,0,0,515,516,5,98,0,0,516,517,3,118,59,0,517,75,1,0,0,0, + 518,519,5,46,0,0,519,520,5,98,0,0,520,521,3,120,60,0,521,77,1,0, + 0,0,522,523,5,32,0,0,523,524,5,98,0,0,524,525,3,128,64,0,525,79, + 1,0,0,0,526,527,5,31,0,0,527,528,5,98,0,0,528,529,3,130,65,0,529, + 81,1,0,0,0,530,531,5,30,0,0,531,532,5,98,0,0,532,533,3,132,66,0, + 533,83,1,0,0,0,534,535,5,29,0,0,535,536,5,98,0,0,536,537,3,134,67, + 0,537,85,1,0,0,0,538,539,5,43,0,0,539,540,5,98,0,0,540,541,3,136, + 68,0,541,87,1,0,0,0,542,543,5,44,0,0,543,544,5,98,0,0,544,545,3, + 138,69,0,545,89,1,0,0,0,546,547,5,46,0,0,547,548,5,98,0,0,548,549, + 3,140,70,0,549,91,1,0,0,0,550,551,5,46,0,0,551,552,5,98,0,0,552, + 553,3,142,71,0,553,93,1,0,0,0,554,555,5,46,0,0,555,556,5,98,0,0, + 556,557,3,144,72,0,557,95,1,0,0,0,558,559,5,31,0,0,559,560,5,98, + 0,0,560,561,3,148,74,0,561,97,1,0,0,0,562,563,5,30,0,0,563,564,5, + 98,0,0,564,565,3,150,75,0,565,99,1,0,0,0,566,567,5,29,0,0,567,568, + 5,98,0,0,568,569,3,152,76,0,569,101,1,0,0,0,570,571,3,106,53,0,571, + 572,5,98,0,0,572,573,3,154,77,0,573,103,1,0,0,0,574,575,3,108,54, + 0,575,576,5,98,0,0,576,577,3,156,78,0,577,105,1,0,0,0,578,587,5, + 113,0,0,579,584,3,52,26,0,580,581,5,115,0,0,581,583,3,52,26,0,582, + 580,1,0,0,0,583,586,1,0,0,0,584,582,1,0,0,0,584,585,1,0,0,0,585, + 588,1,0,0,0,586,584,1,0,0,0,587,579,1,0,0,0,587,588,1,0,0,0,588, + 589,1,0,0,0,589,590,5,114,0,0,590,107,1,0,0,0,591,592,5,111,0,0, + 592,593,3,110,55,0,593,594,5,123,0,0,594,595,3,112,56,0,595,596, + 5,112,0,0,596,109,1,0,0,0,597,608,5,125,0,0,598,599,5,111,0,0,599, + 602,5,125,0,0,600,601,5,115,0,0,601,603,5,125,0,0,602,600,1,0,0, + 0,603,604,1,0,0,0,604,602,1,0,0,0,604,605,1,0,0,0,605,606,1,0,0, + 0,606,608,5,112,0,0,607,597,1,0,0,0,607,598,1,0,0,0,608,111,1,0, + 0,0,609,610,3,178,89,0,610,611,5,111,0,0,611,612,3,28,14,0,612,613, + 5,112,0,0,613,113,1,0,0,0,614,617,3,116,58,0,615,617,3,160,80,0, + 616,614,1,0,0,0,616,615,1,0,0,0,617,115,1,0,0,0,618,638,3,118,59, + 0,619,638,3,124,62,0,620,638,3,126,63,0,621,638,3,120,60,0,622,638, + 3,122,61,0,623,638,3,132,66,0,624,638,3,134,67,0,625,638,3,128,64, + 0,626,638,3,130,65,0,627,638,3,136,68,0,628,630,5,69,0,0,629,631, + 5,117,0,0,630,629,1,0,0,0,630,631,1,0,0,0,631,638,1,0,0,0,632,633, + 5,81,0,0,633,635,5,125,0,0,634,636,5,117,0,0,635,634,1,0,0,0,635, + 636,1,0,0,0,636,638,1,0,0,0,637,618,1,0,0,0,637,619,1,0,0,0,637, + 620,1,0,0,0,637,621,1,0,0,0,637,622,1,0,0,0,637,623,1,0,0,0,637, + 624,1,0,0,0,637,625,1,0,0,0,637,626,1,0,0,0,637,627,1,0,0,0,637, + 628,1,0,0,0,637,632,1,0,0,0,638,117,1,0,0,0,639,641,7,1,0,0,640, + 642,5,117,0,0,641,640,1,0,0,0,641,642,1,0,0,0,642,119,1,0,0,0,643, + 645,7,2,0,0,644,646,5,117,0,0,645,644,1,0,0,0,645,646,1,0,0,0,646, + 121,1,0,0,0,647,649,7,3,0,0,648,650,5,117,0,0,649,648,1,0,0,0,649, + 650,1,0,0,0,650,123,1,0,0,0,651,653,7,4,0,0,652,654,5,117,0,0,653, + 652,1,0,0,0,653,654,1,0,0,0,654,125,1,0,0,0,655,657,7,5,0,0,656, + 658,5,117,0,0,657,656,1,0,0,0,657,658,1,0,0,0,658,127,1,0,0,0,659, + 661,5,65,0,0,660,662,5,117,0,0,661,660,1,0,0,0,661,662,1,0,0,0,662, + 129,1,0,0,0,663,665,5,66,0,0,664,666,5,117,0,0,665,664,1,0,0,0,665, + 666,1,0,0,0,666,131,1,0,0,0,667,669,7,6,0,0,668,670,5,117,0,0,669, + 668,1,0,0,0,669,670,1,0,0,0,670,133,1,0,0,0,671,673,7,7,0,0,672, + 674,5,117,0,0,673,672,1,0,0,0,673,674,1,0,0,0,674,135,1,0,0,0,675, + 677,7,8,0,0,676,678,5,117,0,0,677,676,1,0,0,0,677,678,1,0,0,0,678, + 137,1,0,0,0,679,681,7,9,0,0,680,682,5,117,0,0,681,680,1,0,0,0,681, + 682,1,0,0,0,682,687,1,0,0,0,683,684,5,41,0,0,684,685,3,164,82,0, + 685,686,5,42,0,0,686,688,1,0,0,0,687,683,1,0,0,0,687,688,1,0,0,0, + 688,139,1,0,0,0,689,691,7,10,0,0,690,692,5,117,0,0,691,690,1,0,0, + 0,691,692,1,0,0,0,692,693,1,0,0,0,693,694,5,41,0,0,694,695,3,164, + 82,0,695,696,5,42,0,0,696,141,1,0,0,0,697,699,7,11,0,0,698,700,5, + 117,0,0,699,698,1,0,0,0,699,700,1,0,0,0,700,701,1,0,0,0,701,702, + 5,41,0,0,702,703,3,164,82,0,703,704,5,42,0,0,704,143,1,0,0,0,705, + 707,7,12,0,0,706,708,5,117,0,0,707,706,1,0,0,0,707,708,1,0,0,0,708, + 709,1,0,0,0,709,710,5,41,0,0,710,711,3,164,82,0,711,712,5,42,0,0, + 712,145,1,0,0,0,713,715,7,13,0,0,714,716,5,117,0,0,715,714,1,0,0, + 0,715,716,1,0,0,0,716,723,1,0,0,0,717,718,5,41,0,0,718,719,3,164, + 82,0,719,720,5,115,0,0,720,721,3,164,82,0,721,722,5,42,0,0,722,724, + 1,0,0,0,723,717,1,0,0,0,723,724,1,0,0,0,724,147,1,0,0,0,725,727, + 7,14,0,0,726,728,5,117,0,0,727,726,1,0,0,0,727,728,1,0,0,0,728,729, + 1,0,0,0,729,730,5,41,0,0,730,731,3,164,82,0,731,732,5,42,0,0,732, + 149,1,0,0,0,733,735,7,15,0,0,734,736,5,117,0,0,735,734,1,0,0,0,735, + 736,1,0,0,0,736,737,1,0,0,0,737,738,5,41,0,0,738,739,3,164,82,0, + 739,740,5,42,0,0,740,151,1,0,0,0,741,743,7,16,0,0,742,744,5,117, + 0,0,743,742,1,0,0,0,743,744,1,0,0,0,744,745,1,0,0,0,745,746,5,41, + 0,0,746,747,3,164,82,0,747,748,5,42,0,0,748,153,1,0,0,0,749,751, + 5,79,0,0,750,752,5,117,0,0,751,750,1,0,0,0,751,752,1,0,0,0,752,753, + 1,0,0,0,753,754,5,41,0,0,754,755,3,114,57,0,755,756,5,42,0,0,756, + 155,1,0,0,0,757,759,5,53,0,0,758,760,5,117,0,0,759,758,1,0,0,0,759, + 760,1,0,0,0,760,761,1,0,0,0,761,762,5,41,0,0,762,763,3,158,79,0, + 763,764,5,123,0,0,764,765,3,114,57,0,765,766,5,42,0,0,766,157,1, + 0,0,0,767,780,3,114,57,0,768,769,5,111,0,0,769,774,3,114,57,0,770, + 771,5,115,0,0,771,773,3,114,57,0,772,770,1,0,0,0,773,776,1,0,0,0, + 774,772,1,0,0,0,774,775,1,0,0,0,775,777,1,0,0,0,776,774,1,0,0,0, + 777,778,5,112,0,0,778,780,1,0,0,0,779,767,1,0,0,0,779,768,1,0,0, + 0,780,159,1,0,0,0,781,792,3,140,70,0,782,792,3,142,71,0,783,792, + 3,144,72,0,784,792,3,146,73,0,785,792,3,138,69,0,786,792,3,148,74, + 0,787,792,3,150,75,0,788,792,3,152,76,0,789,792,3,156,78,0,790,792, + 3,162,81,0,791,781,1,0,0,0,791,782,1,0,0,0,791,783,1,0,0,0,791,784, + 1,0,0,0,791,785,1,0,0,0,791,786,1,0,0,0,791,787,1,0,0,0,791,788, + 1,0,0,0,791,789,1,0,0,0,791,790,1,0,0,0,792,161,1,0,0,0,793,795, + 5,77,0,0,794,796,5,117,0,0,795,794,1,0,0,0,795,796,1,0,0,0,796,797, + 1,0,0,0,797,798,5,41,0,0,798,803,3,114,57,0,799,800,5,115,0,0,800, + 802,3,114,57,0,801,799,1,0,0,0,802,805,1,0,0,0,803,801,1,0,0,0,803, + 804,1,0,0,0,804,806,1,0,0,0,805,803,1,0,0,0,806,807,5,42,0,0,807, + 163,1,0,0,0,808,809,5,25,0,0,809,165,1,0,0,0,810,811,7,17,0,0,811, + 167,1,0,0,0,812,813,3,170,85,0,813,814,5,116,0,0,814,815,3,172,86, + 0,815,169,1,0,0,0,816,817,7,18,0,0,817,171,1,0,0,0,818,819,7,19, + 0,0,819,173,1,0,0,0,820,825,3,168,84,0,821,822,5,115,0,0,822,824, + 3,168,84,0,823,821,1,0,0,0,824,827,1,0,0,0,825,823,1,0,0,0,825,826, + 1,0,0,0,826,175,1,0,0,0,827,825,1,0,0,0,828,829,7,20,0,0,829,177, + 1,0,0,0,830,833,3,176,88,0,831,833,5,125,0,0,832,830,1,0,0,0,832, + 831,1,0,0,0,833,179,1,0,0,0,75,183,189,197,205,217,228,239,250,268, + 274,279,282,287,290,295,302,307,330,337,350,361,364,376,379,387, + 395,404,414,427,430,444,447,461,468,476,483,489,494,584,587,604, + 607,616,630,635,637,641,645,649,653,657,661,665,669,673,677,681, + 687,691,699,707,715,723,727,735,743,751,759,774,779,791,795,803, + 825,832 ] class FuncTestCaseParser ( Parser ): @@ -286,288 +332,304 @@ class FuncTestCaseParser ( Parser ): sharedContextCache = PredictionContextCache() literalNames = [ "", "", "'###'", "'SUBSTRAIT_SCALAR_TEST'", - "'SUBSTRAIT_AGGREGATE_TEST'", "'SUBSTRAIT_INCLUDE'", - "'SUBSTRAIT_DEPENDENCY'", "", "", - "'DEFINE'", "''", "''", "'OVERFLOW'", - "'ROUNDING'", "'ERROR'", "'SATURATE'", "'SILENT'", - "'TIE_TO_EVEN'", "'NAN'", "'ACCEPT_NULLS'", "'IGNORE_NULLS'", - "'NULL_HANDLING'", "'SPACES_ONLY'", "'TRUNCATE'", "", + "'SUBSTRAIT_AGGREGATE_TEST'", "'SUBSTRAIT_TABLE_TEST'", + "'SUBSTRAIT_INCLUDE'", "'SUBSTRAIT_DEPENDENCY'", "", + "", "'DEFINE'", "''", "''", + "'OVERFLOW'", "'ROUNDING'", "'ERROR'", "'SATURATE'", + "'SILENT'", "'TIE_TO_EVEN'", "'NAN'", "'ACCEPT_NULLS'", + "'IGNORE_NULLS'", "'NULL_HANDLING'", "'SPACES_ONLY'", + "'TRUNCATE'", "", "", "", "", "", "", "", - "", "", "", "'P'", "'T'", - "'Y'", "'M'", "'D'", "'H'", "'S'", "'F'", "", - "", "", "", "'null'", "", - "", "", "", "'IF'", "'THEN'", - "'ELSE'", "'FUNC'", "'BOOLEAN'", "'I8'", "'I16'", "'I32'", - "'I64'", "'FP32'", "'FP64'", "'STRING'", "'BINARY'", - "'TIMESTAMP'", "'TIMESTAMP_TZ'", "'DATE'", "'TIME'", - "'INTERVAL_YEAR'", "'INTERVAL_DAY'", "'UUID'", "'DECIMAL'", - "'PRECISION_TIME'", "'PRECISION_TIMESTAMP'", "'PRECISION_TIMESTAMP_TZ'", - "'FIXEDCHAR'", "'VARCHAR'", "'FIXEDBINARY'", "'STRUCT'", - "'NSTRUCT'", "'LIST'", "'MAP'", "'U!'", "'BOOL'", "'STR'", - "'VBIN'", "'TS'", "'TSTZ'", "'IYEAR'", "'IDAY'", "'DEC'", - "'PT'", "'PTS'", "'PTSTZ'", "'FCHAR'", "'VCHAR'", "'FBIN'", - "'ANY'", "", "'::'", "'+'", "'-'", "'*'", - "'/'", "'%'", "'='", "'!='", "'>='", "'<='", "'>'", - "'<'", "'!'", "'('", "')'", "'['", "']'", "','", "':'", - "'?'", "'#'", "'.'", "'AND'", "'OR'", "':='", "'->'" ] + "", "'P'", "'T'", "'Y'", "'M'", "'D'", "'H'", + "'S'", "'F'", "", "", "", + "", "'null'", "", "", "", + "", "'IF'", "'THEN'", "'ELSE'", "'FUNC'", + "'BOOLEAN'", "'I8'", "'I16'", "'I32'", "'I64'", "'FP32'", + "'FP64'", "'STRING'", "'BINARY'", "'TIMESTAMP'", "'TIMESTAMP_TZ'", + "'DATE'", "'TIME'", "'INTERVAL_YEAR'", "'INTERVAL_DAY'", + "'UUID'", "'DECIMAL'", "'PRECISION_TIME'", "'PRECISION_TIMESTAMP'", + "'PRECISION_TIMESTAMP_TZ'", "'FIXEDCHAR'", "'VARCHAR'", + "'FIXEDBINARY'", "'STRUCT'", "'NSTRUCT'", "'LIST'", + "'MAP'", "'U!'", "'BOOL'", "'STR'", "'VBIN'", "'TS'", + "'TSTZ'", "'IYEAR'", "'IDAY'", "'DEC'", "'PT'", "'PTS'", + "'PTSTZ'", "'FCHAR'", "'VCHAR'", "'FBIN'", "'ANY'", + "", "'::'", "'+'", "'-'", "'*'", "'/'", "'%'", + "'='", "'!='", "'>='", "'<='", "'>'", "'<'", "'!'", + "'('", "')'", "'['", "']'", "','", "':'", "'?'", "'#'", + "'.'", "'AND'", "'OR'", "':='", "'->'" ] symbolicNames = [ "", "Whitespace", "TripleHash", "SubstraitScalarTest", - "SubstraitAggregateTest", "SubstraitInclude", "SubstraitDependency", - "FormatVersion", "DescriptionLine", "Define", "ErrorResult", - "UndefineResult", "Overflow", "Rounding", "Error", - "Saturate", "Silent", "TieToEven", "NaN", "AcceptNulls", - "IgnoreNulls", "NullHandling", "SpacesOnly", "Truncate", - "IntegerLiteral", "DecimalLiteral", "FloatLiteral", - "BooleanLiteral", "TimestampTzLiteral", "TimestampLiteral", - "TimeLiteral", "DateLiteral", "PeriodPrefix", "TimePrefix", - "YearPrefix", "MSuffix", "DaySuffix", "HourSuffix", - "SecondSuffix", "FractionalSecondSuffix", "OAngleBracket", - "CAngleBracket", "IntervalYearLiteral", "IntervalDayLiteral", - "NullLiteral", "StringLiteral", "ColumnName", "LineComment", - "BlockComment", "If", "Then", "Else", "Func", "Boolean", - "I8", "I16", "I32", "I64", "FP32", "FP64", "String", - "Binary", "Timestamp", "Timestamp_TZ", "Date", "Time", - "Interval_Year", "Interval_Day", "UUID", "Decimal", - "Precision_Time", "Precision_Timestamp", "Precision_Timestamp_TZ", - "FixedChar", "VarChar", "FixedBinary", "Struct", "NStruct", - "List", "Map", "UserDefined", "Bool", "Str", "VBin", - "Ts", "TsTZ", "IYear", "IDay", "Dec", "PT", "PTs", - "PTsTZ", "FChar", "VChar", "FBin", "Any", "AnyVar", - "DoubleColon", "Plus", "Minus", "Asterisk", "ForwardSlash", - "Percent", "Eq", "Ne", "Gte", "Lte", "Gt", "Lt", "Bang", - "OParen", "CParen", "OBracket", "CBracket", "Comma", - "Colon", "QMark", "Hash", "Dot", "And", "Or", "Assign", - "Arrow", "Number", "Identifier", "Newline" ] + "SubstraitAggregateTest", "SubstraitTableTest", "SubstraitInclude", + "SubstraitDependency", "FormatVersion", "DescriptionLine", + "Define", "ErrorResult", "UndefineResult", "Overflow", + "Rounding", "Error", "Saturate", "Silent", "TieToEven", + "NaN", "AcceptNulls", "IgnoreNulls", "NullHandling", + "SpacesOnly", "Truncate", "IntegerLiteral", "DecimalLiteral", + "FloatLiteral", "BooleanLiteral", "TimestampTzLiteral", + "TimestampLiteral", "TimeLiteral", "DateLiteral", + "PeriodPrefix", "TimePrefix", "YearPrefix", "MSuffix", + "DaySuffix", "HourSuffix", "SecondSuffix", "FractionalSecondSuffix", + "OAngleBracket", "CAngleBracket", "IntervalYearLiteral", + "IntervalDayLiteral", "NullLiteral", "StringLiteral", + "ColumnName", "LineComment", "BlockComment", "If", + "Then", "Else", "Func", "Boolean", "I8", "I16", "I32", + "I64", "FP32", "FP64", "String", "Binary", "Timestamp", + "Timestamp_TZ", "Date", "Time", "Interval_Year", "Interval_Day", + "UUID", "Decimal", "Precision_Time", "Precision_Timestamp", + "Precision_Timestamp_TZ", "FixedChar", "VarChar", + "FixedBinary", "Struct", "NStruct", "List", "Map", + "UserDefined", "Bool", "Str", "VBin", "Ts", "TsTZ", + "IYear", "IDay", "Dec", "PT", "PTs", "PTsTZ", "FChar", + "VChar", "FBin", "Any", "AnyVar", "DoubleColon", "Plus", + "Minus", "Asterisk", "ForwardSlash", "Percent", "Eq", + "Ne", "Gte", "Lte", "Gt", "Lt", "Bang", "OParen", + "CParen", "OBracket", "CBracket", "Comma", "Colon", + "QMark", "Hash", "Dot", "And", "Or", "Assign", "Arrow", + "Number", "Identifier", "Newline" ] RULE_doc = 0 - RULE_header = 1 - RULE_version = 2 - RULE_include = 3 - RULE_dependency = 4 - RULE_testGroupDescription = 5 - RULE_testCase = 6 - RULE_testGroup = 7 - RULE_arguments = 8 - RULE_result = 9 - RULE_argument = 10 - RULE_aggFuncTestCase = 11 - RULE_aggFuncCall = 12 - RULE_tableData = 13 - RULE_tableRows = 14 - RULE_dataColumn = 15 - RULE_columnValues = 16 - RULE_literal = 17 - RULE_qualifiedAggregateFuncArgs = 18 - RULE_aggregateFuncArgs = 19 - RULE_qualifiedAggregateFuncArg = 20 - RULE_aggregateFuncArg = 21 - RULE_numericLiteral = 22 - RULE_floatLiteral = 23 - RULE_nullArg = 24 - RULE_intArg = 25 - RULE_floatArg = 26 - RULE_decimalArg = 27 - RULE_booleanArg = 28 - RULE_stringArg = 29 - RULE_dateArg = 30 - RULE_timeArg = 31 - RULE_timestampArg = 32 - RULE_timestampTzArg = 33 - RULE_intervalYearArg = 34 - RULE_intervalDayArg = 35 - RULE_fixedCharArg = 36 - RULE_varCharArg = 37 - RULE_fixedBinaryArg = 38 - RULE_precisionTimeArg = 39 - RULE_precisionTimestampArg = 40 - RULE_precisionTimestampTZArg = 41 - RULE_listArg = 42 - RULE_lambdaArg = 43 - RULE_literalList = 44 - RULE_literalLambda = 45 - RULE_lambdaParameters = 46 - RULE_lambdaBody = 47 - RULE_dataType = 48 - RULE_scalarType = 49 - RULE_booleanType = 50 - RULE_stringType = 51 - RULE_binaryType = 52 - RULE_intType = 53 - RULE_floatType = 54 - RULE_dateType = 55 - RULE_timeType = 56 - RULE_timestampType = 57 - RULE_timestampTZType = 58 - RULE_intervalYearType = 59 - RULE_intervalDayType = 60 - RULE_fixedCharType = 61 - RULE_varCharType = 62 - RULE_fixedBinaryType = 63 - RULE_decimalType = 64 - RULE_precisionTimeType = 65 - RULE_precisionTimestampType = 66 - RULE_precisionTimestampTZType = 67 - RULE_listType = 68 - RULE_funcType = 69 - RULE_funcParameters = 70 - RULE_parameterizedType = 71 - RULE_numericParameter = 72 - RULE_substraitError = 73 - RULE_funcOption = 74 - RULE_optionName = 75 - RULE_optionValue = 76 - RULE_funcOptions = 77 - RULE_nonReserved = 78 - RULE_identifier = 79 - - ruleNames = [ "doc", "header", "version", "include", "dependency", - "testGroupDescription", "testCase", "testGroup", "arguments", - "result", "argument", "aggFuncTestCase", "aggFuncCall", - "tableData", "tableRows", "dataColumn", "columnValues", - "literal", "qualifiedAggregateFuncArgs", "aggregateFuncArgs", - "qualifiedAggregateFuncArg", "aggregateFuncArg", "numericLiteral", - "floatLiteral", "nullArg", "intArg", "floatArg", "decimalArg", - "booleanArg", "stringArg", "dateArg", "timeArg", "timestampArg", - "timestampTzArg", "intervalYearArg", "intervalDayArg", - "fixedCharArg", "varCharArg", "fixedBinaryArg", "precisionTimeArg", - "precisionTimestampArg", "precisionTimestampTZArg", "listArg", - "lambdaArg", "literalList", "literalLambda", "lambdaParameters", - "lambdaBody", "dataType", "scalarType", "booleanType", - "stringType", "binaryType", "intType", "floatType", "dateType", - "timeType", "timestampType", "timestampTZType", "intervalYearType", - "intervalDayType", "fixedCharType", "varCharType", "fixedBinaryType", - "decimalType", "precisionTimeType", "precisionTimestampType", - "precisionTimestampTZType", "listType", "funcType", "funcParameters", - "parameterizedType", "numericParameter", "substraitError", - "funcOption", "optionName", "optionValue", "funcOptions", - "nonReserved", "identifier" ] + RULE_scalarDoc = 1 + RULE_aggregateDoc = 2 + RULE_tableDoc = 3 + RULE_scalarHeader = 4 + RULE_aggregateHeader = 5 + RULE_tableHeader = 6 + RULE_include = 7 + RULE_dependency = 8 + RULE_testGroupDescription = 9 + RULE_testCase = 10 + RULE_scalarTestGroup = 11 + RULE_aggregateTestGroup = 12 + RULE_tableTestGroup = 13 + RULE_arguments = 14 + RULE_result = 15 + RULE_argument = 16 + RULE_aggFuncTestCase = 17 + RULE_tableFuncTestCase = 18 + RULE_multiRowResult = 19 + RULE_rowTuple = 20 + RULE_aggFuncCall = 21 + RULE_tableData = 22 + RULE_tableRows = 23 + RULE_dataColumn = 24 + RULE_columnValues = 25 + RULE_literal = 26 + RULE_qualifiedAggregateFuncArgs = 27 + RULE_aggregateFuncArgs = 28 + RULE_qualifiedAggregateFuncArg = 29 + RULE_aggregateFuncArg = 30 + RULE_numericLiteral = 31 + RULE_floatLiteral = 32 + RULE_nullArg = 33 + RULE_intArg = 34 + RULE_floatArg = 35 + RULE_decimalArg = 36 + RULE_booleanArg = 37 + RULE_stringArg = 38 + RULE_dateArg = 39 + RULE_timeArg = 40 + RULE_timestampArg = 41 + RULE_timestampTzArg = 42 + RULE_intervalYearArg = 43 + RULE_intervalDayArg = 44 + RULE_fixedCharArg = 45 + RULE_varCharArg = 46 + RULE_fixedBinaryArg = 47 + RULE_precisionTimeArg = 48 + RULE_precisionTimestampArg = 49 + RULE_precisionTimestampTZArg = 50 + RULE_listArg = 51 + RULE_lambdaArg = 52 + RULE_literalList = 53 + RULE_literalLambda = 54 + RULE_lambdaParameters = 55 + RULE_lambdaBody = 56 + RULE_dataType = 57 + RULE_scalarType = 58 + RULE_booleanType = 59 + RULE_stringType = 60 + RULE_binaryType = 61 + RULE_intType = 62 + RULE_floatType = 63 + RULE_dateType = 64 + RULE_timeType = 65 + RULE_timestampType = 66 + RULE_timestampTZType = 67 + RULE_intervalYearType = 68 + RULE_intervalDayType = 69 + RULE_fixedCharType = 70 + RULE_varCharType = 71 + RULE_fixedBinaryType = 72 + RULE_decimalType = 73 + RULE_precisionTimeType = 74 + RULE_precisionTimestampType = 75 + RULE_precisionTimestampTZType = 76 + RULE_listType = 77 + RULE_funcType = 78 + RULE_funcParameters = 79 + RULE_parameterizedType = 80 + RULE_structType = 81 + RULE_numericParameter = 82 + RULE_substraitError = 83 + RULE_funcOption = 84 + RULE_optionName = 85 + RULE_optionValue = 86 + RULE_funcOptions = 87 + RULE_nonReserved = 88 + RULE_identifier = 89 + + ruleNames = [ "doc", "scalarDoc", "aggregateDoc", "tableDoc", "scalarHeader", + "aggregateHeader", "tableHeader", "include", "dependency", + "testGroupDescription", "testCase", "scalarTestGroup", + "aggregateTestGroup", "tableTestGroup", "arguments", + "result", "argument", "aggFuncTestCase", "tableFuncTestCase", + "multiRowResult", "rowTuple", "aggFuncCall", "tableData", + "tableRows", "dataColumn", "columnValues", "literal", + "qualifiedAggregateFuncArgs", "aggregateFuncArgs", "qualifiedAggregateFuncArg", + "aggregateFuncArg", "numericLiteral", "floatLiteral", + "nullArg", "intArg", "floatArg", "decimalArg", "booleanArg", + "stringArg", "dateArg", "timeArg", "timestampArg", "timestampTzArg", + "intervalYearArg", "intervalDayArg", "fixedCharArg", + "varCharArg", "fixedBinaryArg", "precisionTimeArg", "precisionTimestampArg", + "precisionTimestampTZArg", "listArg", "lambdaArg", "literalList", + "literalLambda", "lambdaParameters", "lambdaBody", "dataType", + "scalarType", "booleanType", "stringType", "binaryType", + "intType", "floatType", "dateType", "timeType", "timestampType", + "timestampTZType", "intervalYearType", "intervalDayType", + "fixedCharType", "varCharType", "fixedBinaryType", "decimalType", + "precisionTimeType", "precisionTimestampType", "precisionTimestampTZType", + "listType", "funcType", "funcParameters", "parameterizedType", + "structType", "numericParameter", "substraitError", "funcOption", + "optionName", "optionValue", "funcOptions", "nonReserved", + "identifier" ] EOF = Token.EOF Whitespace=1 TripleHash=2 SubstraitScalarTest=3 SubstraitAggregateTest=4 - SubstraitInclude=5 - SubstraitDependency=6 - FormatVersion=7 - DescriptionLine=8 - Define=9 - ErrorResult=10 - UndefineResult=11 - Overflow=12 - Rounding=13 - Error=14 - Saturate=15 - Silent=16 - TieToEven=17 - NaN=18 - AcceptNulls=19 - IgnoreNulls=20 - NullHandling=21 - SpacesOnly=22 - Truncate=23 - IntegerLiteral=24 - DecimalLiteral=25 - FloatLiteral=26 - BooleanLiteral=27 - TimestampTzLiteral=28 - TimestampLiteral=29 - TimeLiteral=30 - DateLiteral=31 - PeriodPrefix=32 - TimePrefix=33 - YearPrefix=34 - MSuffix=35 - DaySuffix=36 - HourSuffix=37 - SecondSuffix=38 - FractionalSecondSuffix=39 - OAngleBracket=40 - CAngleBracket=41 - IntervalYearLiteral=42 - IntervalDayLiteral=43 - NullLiteral=44 - StringLiteral=45 - ColumnName=46 - LineComment=47 - BlockComment=48 - If=49 - Then=50 - Else=51 - Func=52 - Boolean=53 - I8=54 - I16=55 - I32=56 - I64=57 - FP32=58 - FP64=59 - String=60 - Binary=61 - Timestamp=62 - Timestamp_TZ=63 - Date=64 - Time=65 - Interval_Year=66 - Interval_Day=67 - UUID=68 - Decimal=69 - Precision_Time=70 - Precision_Timestamp=71 - Precision_Timestamp_TZ=72 - FixedChar=73 - VarChar=74 - FixedBinary=75 - Struct=76 - NStruct=77 - List=78 - Map=79 - UserDefined=80 - Bool=81 - Str=82 - VBin=83 - Ts=84 - TsTZ=85 - IYear=86 - IDay=87 - Dec=88 - PT=89 - PTs=90 - PTsTZ=91 - FChar=92 - VChar=93 - FBin=94 - Any=95 - AnyVar=96 - DoubleColon=97 - Plus=98 - Minus=99 - Asterisk=100 - ForwardSlash=101 - Percent=102 - Eq=103 - Ne=104 - Gte=105 - Lte=106 - Gt=107 - Lt=108 - Bang=109 - OParen=110 - CParen=111 - OBracket=112 - CBracket=113 - Comma=114 - Colon=115 - QMark=116 - Hash=117 - Dot=118 - And=119 - Or=120 - Assign=121 - Arrow=122 - Number=123 - Identifier=124 - Newline=125 + SubstraitTableTest=5 + SubstraitInclude=6 + SubstraitDependency=7 + FormatVersion=8 + DescriptionLine=9 + Define=10 + ErrorResult=11 + UndefineResult=12 + Overflow=13 + Rounding=14 + Error=15 + Saturate=16 + Silent=17 + TieToEven=18 + NaN=19 + AcceptNulls=20 + IgnoreNulls=21 + NullHandling=22 + SpacesOnly=23 + Truncate=24 + IntegerLiteral=25 + DecimalLiteral=26 + FloatLiteral=27 + BooleanLiteral=28 + TimestampTzLiteral=29 + TimestampLiteral=30 + TimeLiteral=31 + DateLiteral=32 + PeriodPrefix=33 + TimePrefix=34 + YearPrefix=35 + MSuffix=36 + DaySuffix=37 + HourSuffix=38 + SecondSuffix=39 + FractionalSecondSuffix=40 + OAngleBracket=41 + CAngleBracket=42 + IntervalYearLiteral=43 + IntervalDayLiteral=44 + NullLiteral=45 + StringLiteral=46 + ColumnName=47 + LineComment=48 + BlockComment=49 + If=50 + Then=51 + Else=52 + Func=53 + Boolean=54 + I8=55 + I16=56 + I32=57 + I64=58 + FP32=59 + FP64=60 + String=61 + Binary=62 + Timestamp=63 + Timestamp_TZ=64 + Date=65 + Time=66 + Interval_Year=67 + Interval_Day=68 + UUID=69 + Decimal=70 + Precision_Time=71 + Precision_Timestamp=72 + Precision_Timestamp_TZ=73 + FixedChar=74 + VarChar=75 + FixedBinary=76 + Struct=77 + NStruct=78 + List=79 + Map=80 + UserDefined=81 + Bool=82 + Str=83 + VBin=84 + Ts=85 + TsTZ=86 + IYear=87 + IDay=88 + Dec=89 + PT=90 + PTs=91 + PTsTZ=92 + FChar=93 + VChar=94 + FBin=95 + Any=96 + AnyVar=97 + DoubleColon=98 + Plus=99 + Minus=100 + Asterisk=101 + ForwardSlash=102 + Percent=103 + Eq=104 + Ne=105 + Gte=106 + Lte=107 + Gt=108 + Lt=109 + Bang=110 + OParen=111 + CParen=112 + OBracket=113 + CBracket=114 + Comma=115 + Colon=116 + QMark=117 + Hash=118 + Dot=119 + And=120 + Or=121 + Assign=122 + Arrow=123 + Number=124 + Identifier=125 + Newline=126 def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) @@ -585,18 +647,16 @@ def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser - def header(self): - return self.getTypedRuleContext(FuncTestCaseParser.HeaderContext,0) + def scalarDoc(self): + return self.getTypedRuleContext(FuncTestCaseParser.ScalarDocContext,0) - def EOF(self): - return self.getToken(FuncTestCaseParser.EOF, 0) + def aggregateDoc(self): + return self.getTypedRuleContext(FuncTestCaseParser.AggregateDocContext,0) - def testGroup(self, i:int=None): - if i is None: - return self.getTypedRuleContexts(FuncTestCaseParser.TestGroupContext) - else: - return self.getTypedRuleContext(FuncTestCaseParser.TestGroupContext,i) + + def tableDoc(self): + return self.getTypedRuleContext(FuncTestCaseParser.TableDocContext,0) def getRuleIndex(self): @@ -623,24 +683,101 @@ def doc(self): localctx = FuncTestCaseParser.DocContext(self, self._ctx, self.state) self.enterRule(localctx, 0, self.RULE_doc) + try: + self.state = 183 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,0,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 180 + self.scalarDoc() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 181 + self.aggregateDoc() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 182 + self.tableDoc() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ScalarDocContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def scalarHeader(self): + return self.getTypedRuleContext(FuncTestCaseParser.ScalarHeaderContext,0) + + + def EOF(self): + return self.getToken(FuncTestCaseParser.EOF, 0) + + def scalarTestGroup(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.ScalarTestGroupContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.ScalarTestGroupContext,i) + + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_scalarDoc + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterScalarDoc" ): + listener.enterScalarDoc(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitScalarDoc" ): + listener.exitScalarDoc(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitScalarDoc" ): + return visitor.visitScalarDoc(self) + else: + return visitor.visitChildren(self) + + + + + def scalarDoc(self): + + localctx = FuncTestCaseParser.ScalarDocContext(self, self._ctx, self.state) + self.enterRule(localctx, 2, self.RULE_scalarDoc) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 160 - self.header() - self.state = 162 + self.state = 185 + self.scalarHeader() + self.state = 187 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 161 - self.testGroup() - self.state = 164 + self.state = 186 + self.scalarTestGroup() + self.state = 189 self._errHandler.sync(self) _la = self._input.LA(1) - if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 8389376) != 0) or ((((_la - 110)) & ~0x3f) == 0 and ((1 << (_la - 110)) & 17921) != 0)): + if not (_la==9 or _la==24 or ((((_la - 120)) & ~0x3f) == 0 and ((1 << (_la - 120)) & 35) != 0)): break - self.state = 166 + self.state = 191 self.match(FuncTestCaseParser.EOF) except RecognitionException as re: localctx.exception = re @@ -651,17 +788,171 @@ def doc(self): return localctx - class HeaderContext(ParserRuleContext): + class AggregateDocContext(ParserRuleContext): __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser - def version(self): - return self.getTypedRuleContext(FuncTestCaseParser.VersionContext,0) + def aggregateHeader(self): + return self.getTypedRuleContext(FuncTestCaseParser.AggregateHeaderContext,0) + def EOF(self): + return self.getToken(FuncTestCaseParser.EOF, 0) + + def aggregateTestGroup(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.AggregateTestGroupContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.AggregateTestGroupContext,i) + + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_aggregateDoc + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAggregateDoc" ): + listener.enterAggregateDoc(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAggregateDoc" ): + listener.exitAggregateDoc(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAggregateDoc" ): + return visitor.visitAggregateDoc(self) + else: + return visitor.visitChildren(self) + + + + + def aggregateDoc(self): + + localctx = FuncTestCaseParser.AggregateDocContext(self, self._ctx, self.state) + self.enterRule(localctx, 4, self.RULE_aggregateDoc) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 193 + self.aggregateHeader() + self.state = 195 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 194 + self.aggregateTestGroup() + self.state = 197 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 16778752) != 0) or ((((_la - 111)) & ~0x3f) == 0 and ((1 << (_la - 111)) & 17921) != 0)): + break + + self.state = 199 + self.match(FuncTestCaseParser.EOF) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TableDocContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def tableHeader(self): + return self.getTypedRuleContext(FuncTestCaseParser.TableHeaderContext,0) + + + def EOF(self): + return self.getToken(FuncTestCaseParser.EOF, 0) + + def tableTestGroup(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.TableTestGroupContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.TableTestGroupContext,i) + + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_tableDoc + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTableDoc" ): + listener.enterTableDoc(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTableDoc" ): + listener.exitTableDoc(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTableDoc" ): + return visitor.visitTableDoc(self) + else: + return visitor.visitChildren(self) + + + + + def tableDoc(self): + + localctx = FuncTestCaseParser.TableDocContext(self, self._ctx, self.state) + self.enterRule(localctx, 6, self.RULE_tableDoc) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 201 + self.tableHeader() + self.state = 203 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 202 + self.tableTestGroup() + self.state = 205 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==9 or _la==24 or ((((_la - 120)) & ~0x3f) == 0 and ((1 << (_la - 120)) & 35) != 0)): + break + + self.state = 207 + self.match(FuncTestCaseParser.EOF) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ScalarHeaderContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def TripleHash(self): + return self.getToken(FuncTestCaseParser.TripleHash, 0) + + def SubstraitScalarTest(self): + return self.getToken(FuncTestCaseParser.SubstraitScalarTest, 0) + + def Colon(self): + return self.getToken(FuncTestCaseParser.Colon, 0) + + def FormatVersion(self): + return self.getToken(FuncTestCaseParser.FormatVersion, 0) + def include(self): return self.getTypedRuleContext(FuncTestCaseParser.IncludeContext,0) @@ -674,43 +965,49 @@ def dependency(self, i:int=None): def getRuleIndex(self): - return FuncTestCaseParser.RULE_header + return FuncTestCaseParser.RULE_scalarHeader def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterHeader" ): - listener.enterHeader(self) + if hasattr( listener, "enterScalarHeader" ): + listener.enterScalarHeader(self) def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitHeader" ): - listener.exitHeader(self) + if hasattr( listener, "exitScalarHeader" ): + listener.exitScalarHeader(self) def accept(self, visitor:ParseTreeVisitor): - if hasattr( visitor, "visitHeader" ): - return visitor.visitHeader(self) + if hasattr( visitor, "visitScalarHeader" ): + return visitor.visitScalarHeader(self) else: return visitor.visitChildren(self) - def header(self): + def scalarHeader(self): - localctx = FuncTestCaseParser.HeaderContext(self, self._ctx, self.state) - self.enterRule(localctx, 2, self.RULE_header) + localctx = FuncTestCaseParser.ScalarHeaderContext(self, self._ctx, self.state) + self.enterRule(localctx, 8, self.RULE_scalarHeader) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 168 - self.version() - self.state = 169 + self.state = 209 + self.match(FuncTestCaseParser.TripleHash) + self.state = 210 + self.match(FuncTestCaseParser.SubstraitScalarTest) + self.state = 211 + self.match(FuncTestCaseParser.Colon) + self.state = 212 + self.match(FuncTestCaseParser.FormatVersion) + self.state = 213 self.include() - self.state = 173 + self.state = 217 self._errHandler.sync(self) _la = self._input.LA(1) while _la==2: - self.state = 170 + self.state = 214 self.dependency() - self.state = 175 + self.state = 219 self._errHandler.sync(self) _la = self._input.LA(1) @@ -723,7 +1020,7 @@ def header(self): return localctx - class VersionContext(ParserRuleContext): + class AggregateHeaderContext(ParserRuleContext): __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): @@ -733,58 +1030,159 @@ def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): def TripleHash(self): return self.getToken(FuncTestCaseParser.TripleHash, 0) + def SubstraitAggregateTest(self): + return self.getToken(FuncTestCaseParser.SubstraitAggregateTest, 0) + def Colon(self): return self.getToken(FuncTestCaseParser.Colon, 0) def FormatVersion(self): return self.getToken(FuncTestCaseParser.FormatVersion, 0) - def SubstraitScalarTest(self): - return self.getToken(FuncTestCaseParser.SubstraitScalarTest, 0) + def include(self): + return self.getTypedRuleContext(FuncTestCaseParser.IncludeContext,0) + + + def dependency(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.DependencyContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.DependencyContext,i) - def SubstraitAggregateTest(self): - return self.getToken(FuncTestCaseParser.SubstraitAggregateTest, 0) def getRuleIndex(self): - return FuncTestCaseParser.RULE_version + return FuncTestCaseParser.RULE_aggregateHeader def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterVersion" ): - listener.enterVersion(self) + if hasattr( listener, "enterAggregateHeader" ): + listener.enterAggregateHeader(self) def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitVersion" ): - listener.exitVersion(self) + if hasattr( listener, "exitAggregateHeader" ): + listener.exitAggregateHeader(self) def accept(self, visitor:ParseTreeVisitor): - if hasattr( visitor, "visitVersion" ): - return visitor.visitVersion(self) + if hasattr( visitor, "visitAggregateHeader" ): + return visitor.visitAggregateHeader(self) else: return visitor.visitChildren(self) - def version(self): + def aggregateHeader(self): - localctx = FuncTestCaseParser.VersionContext(self, self._ctx, self.state) - self.enterRule(localctx, 4, self.RULE_version) + localctx = FuncTestCaseParser.AggregateHeaderContext(self, self._ctx, self.state) + self.enterRule(localctx, 10, self.RULE_aggregateHeader) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 176 + self.state = 220 self.match(FuncTestCaseParser.TripleHash) - self.state = 177 + self.state = 221 + self.match(FuncTestCaseParser.SubstraitAggregateTest) + self.state = 222 + self.match(FuncTestCaseParser.Colon) + self.state = 223 + self.match(FuncTestCaseParser.FormatVersion) + self.state = 224 + self.include() + self.state = 228 + self._errHandler.sync(self) _la = self._input.LA(1) - if not(_la==3 or _la==4): - self._errHandler.recoverInline(self) + while _la==2: + self.state = 225 + self.dependency() + self.state = 230 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TableHeaderContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def TripleHash(self): + return self.getToken(FuncTestCaseParser.TripleHash, 0) + + def SubstraitTableTest(self): + return self.getToken(FuncTestCaseParser.SubstraitTableTest, 0) + + def Colon(self): + return self.getToken(FuncTestCaseParser.Colon, 0) + + def FormatVersion(self): + return self.getToken(FuncTestCaseParser.FormatVersion, 0) + + def include(self): + return self.getTypedRuleContext(FuncTestCaseParser.IncludeContext,0) + + + def dependency(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.DependencyContext) else: - self._errHandler.reportMatch(self) - self.consume() - self.state = 178 + return self.getTypedRuleContext(FuncTestCaseParser.DependencyContext,i) + + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_tableHeader + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTableHeader" ): + listener.enterTableHeader(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTableHeader" ): + listener.exitTableHeader(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTableHeader" ): + return visitor.visitTableHeader(self) + else: + return visitor.visitChildren(self) + + + + + def tableHeader(self): + + localctx = FuncTestCaseParser.TableHeaderContext(self, self._ctx, self.state) + self.enterRule(localctx, 12, self.RULE_tableHeader) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 231 + self.match(FuncTestCaseParser.TripleHash) + self.state = 232 + self.match(FuncTestCaseParser.SubstraitTableTest) + self.state = 233 self.match(FuncTestCaseParser.Colon) - self.state = 179 + self.state = 234 self.match(FuncTestCaseParser.FormatVersion) + self.state = 235 + self.include() + self.state = 239 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==2: + self.state = 236 + self.dependency() + self.state = 241 + self._errHandler.sync(self) + _la = self._input.LA(1) + except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -845,27 +1243,27 @@ def accept(self, visitor:ParseTreeVisitor): def include(self): localctx = FuncTestCaseParser.IncludeContext(self, self._ctx, self.state) - self.enterRule(localctx, 6, self.RULE_include) + self.enterRule(localctx, 14, self.RULE_include) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 181 + self.state = 242 self.match(FuncTestCaseParser.TripleHash) - self.state = 182 + self.state = 243 self.match(FuncTestCaseParser.SubstraitInclude) - self.state = 183 + self.state = 244 self.match(FuncTestCaseParser.Colon) - self.state = 184 + self.state = 245 self.match(FuncTestCaseParser.StringLiteral) - self.state = 189 + self.state = 250 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 185 + while _la==115: + self.state = 246 self.match(FuncTestCaseParser.Comma) - self.state = 186 + self.state = 247 self.match(FuncTestCaseParser.StringLiteral) - self.state = 191 + self.state = 252 self._errHandler.sync(self) _la = self._input.LA(1) @@ -920,16 +1318,16 @@ def accept(self, visitor:ParseTreeVisitor): def dependency(self): localctx = FuncTestCaseParser.DependencyContext(self, self._ctx, self.state) - self.enterRule(localctx, 8, self.RULE_dependency) + self.enterRule(localctx, 16, self.RULE_dependency) try: self.enterOuterAlt(localctx, 1) - self.state = 192 + self.state = 253 self.match(FuncTestCaseParser.TripleHash) - self.state = 193 + self.state = 254 self.match(FuncTestCaseParser.SubstraitDependency) - self.state = 194 + self.state = 255 self.match(FuncTestCaseParser.Colon) - self.state = 195 + self.state = 256 self.match(FuncTestCaseParser.StringLiteral) except RecognitionException as re: localctx.exception = re @@ -973,10 +1371,10 @@ def accept(self, visitor:ParseTreeVisitor): def testGroupDescription(self): localctx = FuncTestCaseParser.TestGroupDescriptionContext(self, self._ctx, self.state) - self.enterRule(localctx, 10, self.RULE_testGroupDescription) + self.enterRule(localctx, 18, self.RULE_testGroupDescription) try: self.enterOuterAlt(localctx, 1) - self.state = 197 + self.state = 258 self.match(FuncTestCaseParser.DescriptionLine) except RecognitionException as re: localctx.exception = re @@ -1049,33 +1447,33 @@ def accept(self, visitor:ParseTreeVisitor): def testCase(self): localctx = FuncTestCaseParser.TestCaseContext(self, self._ctx, self.state) - self.enterRule(localctx, 12, self.RULE_testCase) + self.enterRule(localctx, 20, self.RULE_testCase) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 199 + self.state = 260 localctx.functionName = self.identifier() - self.state = 200 + self.state = 261 self.match(FuncTestCaseParser.OParen) - self.state = 201 + self.state = 262 self.arguments() - self.state = 202 + self.state = 263 self.match(FuncTestCaseParser.CParen) - self.state = 207 + self.state = 268 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 203 + if _la==113: + self.state = 264 self.match(FuncTestCaseParser.OBracket) - self.state = 204 + self.state = 265 self.funcOptions() - self.state = 205 + self.state = 266 self.match(FuncTestCaseParser.CBracket) - self.state = 209 + self.state = 270 self.match(FuncTestCaseParser.Eq) - self.state = 210 + self.state = 271 self.result() except RecognitionException as re: localctx.exception = re @@ -1086,32 +1484,17 @@ def testCase(self): return localctx - class TestGroupContext(ParserRuleContext): + class ScalarTestGroupContext(ParserRuleContext): __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser - - def getRuleIndex(self): - return FuncTestCaseParser.RULE_testGroup - - - def copyFrom(self, ctx:ParserRuleContext): - super().copyFrom(ctx) - - - - class ScalarFuncTestGroupContext(TestGroupContext): - - def __init__(self, parser, ctx:ParserRuleContext): # actually a FuncTestCaseParser.TestGroupContext - super().__init__(parser) - self.copyFrom(ctx) - def testGroupDescription(self): return self.getTypedRuleContext(FuncTestCaseParser.TestGroupDescriptionContext,0) + def testCase(self, i:int=None): if i is None: return self.getTypedRuleContexts(FuncTestCaseParser.TestCaseContext) @@ -1119,30 +1502,75 @@ def testCase(self, i:int=None): return self.getTypedRuleContext(FuncTestCaseParser.TestCaseContext,i) + def getRuleIndex(self): + return FuncTestCaseParser.RULE_scalarTestGroup + def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterScalarFuncTestGroup" ): - listener.enterScalarFuncTestGroup(self) + if hasattr( listener, "enterScalarTestGroup" ): + listener.enterScalarTestGroup(self) def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitScalarFuncTestGroup" ): - listener.exitScalarFuncTestGroup(self) + if hasattr( listener, "exitScalarTestGroup" ): + listener.exitScalarTestGroup(self) def accept(self, visitor:ParseTreeVisitor): - if hasattr( visitor, "visitScalarFuncTestGroup" ): - return visitor.visitScalarFuncTestGroup(self) + if hasattr( visitor, "visitScalarTestGroup" ): + return visitor.visitScalarTestGroup(self) else: return visitor.visitChildren(self) - class AggregateFuncTestGroupContext(TestGroupContext): - def __init__(self, parser, ctx:ParserRuleContext): # actually a FuncTestCaseParser.TestGroupContext - super().__init__(parser) - self.copyFrom(ctx) + + def scalarTestGroup(self): + + localctx = FuncTestCaseParser.ScalarTestGroupContext(self, self._ctx, self.state) + self.enterRule(localctx, 22, self.RULE_scalarTestGroup) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 274 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==9: + self.state = 273 + self.testGroupDescription() + + + self.state = 277 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 276 + self.testCase() + + else: + raise NoViableAltException(self) + self.state = 279 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,10,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AggregateTestGroupContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser def testGroupDescription(self): return self.getTypedRuleContext(FuncTestCaseParser.TestGroupDescriptionContext,0) + def aggFuncTestCase(self, i:int=None): if i is None: return self.getTypedRuleContexts(FuncTestCaseParser.AggFuncTestCaseContext) @@ -1150,86 +1578,131 @@ def aggFuncTestCase(self, i:int=None): return self.getTypedRuleContext(FuncTestCaseParser.AggFuncTestCaseContext,i) + def getRuleIndex(self): + return FuncTestCaseParser.RULE_aggregateTestGroup + def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAggregateFuncTestGroup" ): - listener.enterAggregateFuncTestGroup(self) + if hasattr( listener, "enterAggregateTestGroup" ): + listener.enterAggregateTestGroup(self) def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAggregateFuncTestGroup" ): - listener.exitAggregateFuncTestGroup(self) + if hasattr( listener, "exitAggregateTestGroup" ): + listener.exitAggregateTestGroup(self) def accept(self, visitor:ParseTreeVisitor): - if hasattr( visitor, "visitAggregateFuncTestGroup" ): - return visitor.visitAggregateFuncTestGroup(self) + if hasattr( visitor, "visitAggregateTestGroup" ): + return visitor.visitAggregateTestGroup(self) else: return visitor.visitChildren(self) - def testGroup(self): - localctx = FuncTestCaseParser.TestGroupContext(self, self._ctx, self.state) - self.enterRule(localctx, 14, self.RULE_testGroup) + def aggregateTestGroup(self): + + localctx = FuncTestCaseParser.AggregateTestGroupContext(self, self._ctx, self.state) + self.enterRule(localctx, 24, self.RULE_aggregateTestGroup) self._la = 0 # Token type try: - self.state = 228 + self.enterOuterAlt(localctx, 1) + self.state = 282 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,8,self._ctx) - if la_ == 1: - localctx = FuncTestCaseParser.ScalarFuncTestGroupContext(self, localctx) - self.enterOuterAlt(localctx, 1) - self.state = 213 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la==8: - self.state = 212 - self.testGroupDescription() + _la = self._input.LA(1) + if _la==9: + self.state = 281 + self.testGroupDescription() - self.state = 216 + self.state = 285 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 284 + self.aggFuncTestCase() + + else: + raise NoViableAltException(self) + self.state = 287 self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 215 - self.testCase() - - else: - raise NoViableAltException(self) - self.state = 218 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,5,self._ctx) + _alt = self._interp.adaptivePredict(self._input,12,self._ctx) - pass + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TableTestGroupContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def testGroupDescription(self): + return self.getTypedRuleContext(FuncTestCaseParser.TestGroupDescriptionContext,0) + + + def tableFuncTestCase(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.TableFuncTestCaseContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.TableFuncTestCaseContext,i) + + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_tableTestGroup + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTableTestGroup" ): + listener.enterTableTestGroup(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTableTestGroup" ): + listener.exitTableTestGroup(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTableTestGroup" ): + return visitor.visitTableTestGroup(self) + else: + return visitor.visitChildren(self) - elif la_ == 2: - localctx = FuncTestCaseParser.AggregateFuncTestGroupContext(self, localctx) - self.enterOuterAlt(localctx, 2) - self.state = 221 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la==8: - self.state = 220 - self.testGroupDescription() - self.state = 224 - self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 223 - self.aggFuncTestCase() - - else: - raise NoViableAltException(self) - self.state = 226 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,7,self._ctx) - pass + def tableTestGroup(self): + + localctx = FuncTestCaseParser.TableTestGroupContext(self, self._ctx, self.state) + self.enterRule(localctx, 26, self.RULE_tableTestGroup) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 290 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==9: + self.state = 289 + self.testGroupDescription() + self.state = 293 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 292 + self.tableFuncTestCase() + + else: + raise NoViableAltException(self) + self.state = 295 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,14,self._ctx) + except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -1282,21 +1755,21 @@ def accept(self, visitor:ParseTreeVisitor): def arguments(self): localctx = FuncTestCaseParser.ArgumentsContext(self, self._ctx, self.state) - self.enterRule(localctx, 16, self.RULE_arguments) + self.enterRule(localctx, 28, self.RULE_arguments) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 230 + self.state = 297 self.argument() - self.state = 235 + self.state = 302 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 231 + while _la==115: + self.state = 298 self.match(FuncTestCaseParser.Comma) - self.state = 232 + self.state = 299 self.argument() - self.state = 237 + self.state = 304 self._errHandler.sync(self) _la = self._input.LA(1) @@ -1347,19 +1820,19 @@ def accept(self, visitor:ParseTreeVisitor): def result(self): localctx = FuncTestCaseParser.ResultContext(self, self._ctx, self.state) - self.enterRule(localctx, 18, self.RULE_result) + self.enterRule(localctx, 30, self.RULE_result) try: - self.state = 240 + self.state = 307 self._errHandler.sync(self) token = self._input.LA(1) - if token in [18, 24, 25, 26, 27, 28, 29, 30, 31, 42, 43, 44, 45, 110, 112, 124]: + if token in [19, 25, 26, 27, 28, 29, 30, 31, 32, 43, 44, 45, 46, 111, 113, 125]: self.enterOuterAlt(localctx, 1) - self.state = 238 + self.state = 305 self.argument() pass - elif token in [10, 11]: + elif token in [11, 12]: self.enterOuterAlt(localctx, 2) - self.state = 239 + self.state = 306 self.substraitError() pass else: @@ -1487,134 +1960,134 @@ def accept(self, visitor:ParseTreeVisitor): def argument(self): localctx = FuncTestCaseParser.ArgumentContext(self, self._ctx, self.state) - self.enterRule(localctx, 20, self.RULE_argument) + self.enterRule(localctx, 32, self.RULE_argument) try: - self.state = 263 + self.state = 330 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,11,self._ctx) + la_ = self._interp.adaptivePredict(self._input,17,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 242 + self.state = 309 self.nullArg() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 243 + self.state = 310 self.intArg() pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 244 + self.state = 311 self.floatArg() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 245 + self.state = 312 self.booleanArg() pass elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 246 + self.state = 313 self.stringArg() pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 247 + self.state = 314 self.decimalArg() pass elif la_ == 7: self.enterOuterAlt(localctx, 7) - self.state = 248 + self.state = 315 self.dateArg() pass elif la_ == 8: self.enterOuterAlt(localctx, 8) - self.state = 249 + self.state = 316 self.timeArg() pass elif la_ == 9: self.enterOuterAlt(localctx, 9) - self.state = 250 + self.state = 317 self.timestampArg() pass elif la_ == 10: self.enterOuterAlt(localctx, 10) - self.state = 251 + self.state = 318 self.timestampTzArg() pass elif la_ == 11: self.enterOuterAlt(localctx, 11) - self.state = 252 + self.state = 319 self.intervalYearArg() pass elif la_ == 12: self.enterOuterAlt(localctx, 12) - self.state = 253 + self.state = 320 self.intervalDayArg() pass elif la_ == 13: self.enterOuterAlt(localctx, 13) - self.state = 254 + self.state = 321 self.fixedCharArg() pass elif la_ == 14: self.enterOuterAlt(localctx, 14) - self.state = 255 + self.state = 322 self.varCharArg() pass elif la_ == 15: self.enterOuterAlt(localctx, 15) - self.state = 256 + self.state = 323 self.fixedBinaryArg() pass elif la_ == 16: self.enterOuterAlt(localctx, 16) - self.state = 257 + self.state = 324 self.precisionTimeArg() pass elif la_ == 17: self.enterOuterAlt(localctx, 17) - self.state = 258 + self.state = 325 self.precisionTimestampArg() pass elif la_ == 18: self.enterOuterAlt(localctx, 18) - self.state = 259 + self.state = 326 self.precisionTimestampTZArg() pass elif la_ == 19: self.enterOuterAlt(localctx, 19) - self.state = 260 + self.state = 327 self.listArg() pass elif la_ == 20: self.enterOuterAlt(localctx, 20) - self.state = 261 + self.state = 328 self.lambdaArg() pass elif la_ == 21: self.enterOuterAlt(localctx, 21) - self.state = 262 + self.state = 329 self.match(FuncTestCaseParser.Identifier) pass @@ -1679,27 +2152,27 @@ def accept(self, visitor:ParseTreeVisitor): def aggFuncTestCase(self): localctx = FuncTestCaseParser.AggFuncTestCaseContext(self, self._ctx, self.state) - self.enterRule(localctx, 22, self.RULE_aggFuncTestCase) + self.enterRule(localctx, 34, self.RULE_aggFuncTestCase) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 265 + self.state = 332 self.aggFuncCall() - self.state = 270 + self.state = 337 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 266 + if _la==113: + self.state = 333 self.match(FuncTestCaseParser.OBracket) - self.state = 267 + self.state = 334 self.funcOptions() - self.state = 268 + self.state = 335 self.match(FuncTestCaseParser.CBracket) - self.state = 272 + self.state = 339 self.match(FuncTestCaseParser.Eq) - self.state = 273 + self.state = 340 self.result() except RecognitionException as re: localctx.exception = re @@ -1710,6 +2183,288 @@ def aggFuncTestCase(self): return localctx + class TableFuncTestCaseContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.functionName = None # IdentifierContext + + def OParen(self): + return self.getToken(FuncTestCaseParser.OParen, 0) + + def arguments(self): + return self.getTypedRuleContext(FuncTestCaseParser.ArgumentsContext,0) + + + def CParen(self): + return self.getToken(FuncTestCaseParser.CParen, 0) + + def Eq(self): + return self.getToken(FuncTestCaseParser.Eq, 0) + + def multiRowResult(self): + return self.getTypedRuleContext(FuncTestCaseParser.MultiRowResultContext,0) + + + def identifier(self): + return self.getTypedRuleContext(FuncTestCaseParser.IdentifierContext,0) + + + def OBracket(self): + return self.getToken(FuncTestCaseParser.OBracket, 0) + + def funcOptions(self): + return self.getTypedRuleContext(FuncTestCaseParser.FuncOptionsContext,0) + + + def CBracket(self): + return self.getToken(FuncTestCaseParser.CBracket, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_tableFuncTestCase + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTableFuncTestCase" ): + listener.enterTableFuncTestCase(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTableFuncTestCase" ): + listener.exitTableFuncTestCase(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTableFuncTestCase" ): + return visitor.visitTableFuncTestCase(self) + else: + return visitor.visitChildren(self) + + + + + def tableFuncTestCase(self): + + localctx = FuncTestCaseParser.TableFuncTestCaseContext(self, self._ctx, self.state) + self.enterRule(localctx, 36, self.RULE_tableFuncTestCase) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 342 + localctx.functionName = self.identifier() + self.state = 343 + self.match(FuncTestCaseParser.OParen) + self.state = 344 + self.arguments() + self.state = 345 + self.match(FuncTestCaseParser.CParen) + self.state = 350 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==113: + self.state = 346 + self.match(FuncTestCaseParser.OBracket) + self.state = 347 + self.funcOptions() + self.state = 348 + self.match(FuncTestCaseParser.CBracket) + + + self.state = 352 + self.match(FuncTestCaseParser.Eq) + self.state = 353 + self.multiRowResult() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class MultiRowResultContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + 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 DoubleColon(self): + return self.getToken(FuncTestCaseParser.DoubleColon, 0) + + def structType(self): + return self.getTypedRuleContext(FuncTestCaseParser.StructTypeContext,0) + + + def rowTuple(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.RowTupleContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.RowTupleContext,i) + + + 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_multiRowResult + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMultiRowResult" ): + listener.enterMultiRowResult(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMultiRowResult" ): + listener.exitMultiRowResult(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMultiRowResult" ): + return visitor.visitMultiRowResult(self) + else: + return visitor.visitChildren(self) + + + + + def multiRowResult(self): + + localctx = FuncTestCaseParser.MultiRowResultContext(self, self._ctx, self.state) + self.enterRule(localctx, 38, self.RULE_multiRowResult) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 355 + self.match(FuncTestCaseParser.OBracket) + self.state = 364 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==111: + self.state = 356 + self.rowTuple() + self.state = 361 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==115: + self.state = 357 + self.match(FuncTestCaseParser.Comma) + self.state = 358 + self.rowTuple() + self.state = 363 + self._errHandler.sync(self) + _la = self._input.LA(1) + + + + self.state = 366 + self.match(FuncTestCaseParser.CBracket) + self.state = 367 + self.match(FuncTestCaseParser.DoubleColon) + self.state = 368 + self.structType() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class RowTupleContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def OParen(self): + return self.getToken(FuncTestCaseParser.OParen, 0) + + def CParen(self): + return self.getToken(FuncTestCaseParser.CParen, 0) + + def literal(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.LiteralContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.LiteralContext,i) + + + 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_rowTuple + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRowTuple" ): + listener.enterRowTuple(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRowTuple" ): + listener.exitRowTuple(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitRowTuple" ): + return visitor.visitRowTuple(self) + else: + return visitor.visitChildren(self) + + + + + def rowTuple(self): + + localctx = FuncTestCaseParser.RowTupleContext(self, self._ctx, self.state) + self.enterRule(localctx, 40, self.RULE_rowTuple) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 370 + self.match(FuncTestCaseParser.OParen) + self.state = 379 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 131949952237568) != 0): + self.state = 371 + self.literal() + self.state = 376 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==115: + self.state = 372 + self.match(FuncTestCaseParser.Comma) + self.state = 373 + self.literal() + self.state = 378 + self._errHandler.sync(self) + _la = self._input.LA(1) + + + + self.state = 381 + self.match(FuncTestCaseParser.CParen) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class AggFuncCallContext(ParserRuleContext): __slots__ = 'parser' @@ -1836,62 +2591,62 @@ def accept(self, visitor:ParseTreeVisitor): def aggFuncCall(self): localctx = FuncTestCaseParser.AggFuncCallContext(self, self._ctx, self.state) - self.enterRule(localctx, 24, self.RULE_aggFuncCall) + self.enterRule(localctx, 42, self.RULE_aggFuncCall) self._la = 0 # Token type try: - self.state = 296 + self.state = 404 self._errHandler.sync(self) token = self._input.LA(1) - if token in [9]: + if token in [10]: localctx = FuncTestCaseParser.MultiArgAggregateFuncCallContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 275 + self.state = 383 self.tableData() - self.state = 276 + self.state = 384 localctx.funcName = self.identifier() - self.state = 277 + self.state = 385 self.match(FuncTestCaseParser.OParen) - self.state = 279 + self.state = 387 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 65974976118784) != 0) or ((((_la - 110)) & ~0x3f) == 0 and ((1 << (_la - 110)) & 16389) != 0): - self.state = 278 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 131949952237568) != 0) or ((((_la - 111)) & ~0x3f) == 0 and ((1 << (_la - 111)) & 16389) != 0): + self.state = 386 self.qualifiedAggregateFuncArgs() - self.state = 281 + self.state = 389 self.match(FuncTestCaseParser.CParen) pass - elif token in [110]: + elif token in [111]: localctx = FuncTestCaseParser.CompactAggregateFuncCallContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 283 + self.state = 391 self.tableRows() - self.state = 284 + self.state = 392 localctx.functName = self.identifier() - self.state = 285 + self.state = 393 self.match(FuncTestCaseParser.OParen) - self.state = 287 + self.state = 395 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 136343720296448) != 0) or ((((_la - 110)) & ~0x3f) == 0 and ((1 << (_la - 110)) & 16389) != 0): - self.state = 286 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 272687440592896) != 0) or ((((_la - 111)) & ~0x3f) == 0 and ((1 << (_la - 111)) & 16389) != 0): + self.state = 394 self.aggregateFuncArgs() - self.state = 289 + self.state = 397 self.match(FuncTestCaseParser.CParen) pass - elif token in [23, 119, 120, 124]: + elif token in [24, 120, 121, 125]: localctx = FuncTestCaseParser.SingleArgAggregateFuncCallContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 291 + self.state = 399 localctx.functName = self.identifier() - self.state = 292 + self.state = 400 self.match(FuncTestCaseParser.OParen) - self.state = 293 + self.state = 401 self.dataColumn() - self.state = 294 + self.state = 402 self.match(FuncTestCaseParser.CParen) pass else: @@ -1969,35 +2724,35 @@ def accept(self, visitor:ParseTreeVisitor): def tableData(self): localctx = FuncTestCaseParser.TableDataContext(self, self._ctx, self.state) - self.enterRule(localctx, 26, self.RULE_tableData) + self.enterRule(localctx, 44, self.RULE_tableData) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 298 + self.state = 406 self.match(FuncTestCaseParser.Define) - self.state = 299 + self.state = 407 localctx.tableName = self.match(FuncTestCaseParser.Identifier) - self.state = 300 + self.state = 408 self.match(FuncTestCaseParser.OParen) - self.state = 301 + self.state = 409 self.dataType() - self.state = 306 + self.state = 414 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 302 + while _la==115: + self.state = 410 self.match(FuncTestCaseParser.Comma) - self.state = 303 + self.state = 411 self.dataType() - self.state = 308 + self.state = 416 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 309 + self.state = 417 self.match(FuncTestCaseParser.CParen) - self.state = 310 + self.state = 418 self.match(FuncTestCaseParser.Eq) - self.state = 311 + self.state = 419 self.tableRows() except RecognitionException as re: localctx.exception = re @@ -2057,33 +2812,33 @@ def accept(self, visitor:ParseTreeVisitor): def tableRows(self): localctx = FuncTestCaseParser.TableRowsContext(self, self._ctx, self.state) - self.enterRule(localctx, 28, self.RULE_tableRows) + self.enterRule(localctx, 46, self.RULE_tableRows) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 313 + self.state = 421 self.match(FuncTestCaseParser.OParen) - self.state = 322 + self.state = 430 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==110: - self.state = 314 + if _la==111: + self.state = 422 self.columnValues() - self.state = 319 + self.state = 427 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 315 + while _la==115: + self.state = 423 self.match(FuncTestCaseParser.Comma) - self.state = 316 + self.state = 424 self.columnValues() - self.state = 321 + self.state = 429 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 324 + self.state = 432 self.match(FuncTestCaseParser.CParen) except RecognitionException as re: localctx.exception = re @@ -2135,14 +2890,14 @@ def accept(self, visitor:ParseTreeVisitor): def dataColumn(self): localctx = FuncTestCaseParser.DataColumnContext(self, self._ctx, self.state) - self.enterRule(localctx, 30, self.RULE_dataColumn) + self.enterRule(localctx, 48, self.RULE_dataColumn) try: self.enterOuterAlt(localctx, 1) - self.state = 326 + self.state = 434 self.columnValues() - self.state = 327 + self.state = 435 self.match(FuncTestCaseParser.DoubleColon) - self.state = 328 + self.state = 436 self.dataType() except RecognitionException as re: localctx.exception = re @@ -2202,33 +2957,33 @@ def accept(self, visitor:ParseTreeVisitor): def columnValues(self): localctx = FuncTestCaseParser.ColumnValuesContext(self, self._ctx, self.state) - self.enterRule(localctx, 32, self.RULE_columnValues) + self.enterRule(localctx, 50, self.RULE_columnValues) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 330 + self.state = 438 self.match(FuncTestCaseParser.OParen) - self.state = 339 + self.state = 447 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 65974976118784) != 0): - self.state = 331 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 131949952237568) != 0): + self.state = 439 self.literal() - self.state = 336 + self.state = 444 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 332 + while _la==115: + self.state = 440 self.match(FuncTestCaseParser.Comma) - self.state = 333 + self.state = 441 self.literal() - self.state = 338 + self.state = 446 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 341 + self.state = 449 self.match(FuncTestCaseParser.CParen) except RecognitionException as re: localctx.exception = re @@ -2300,59 +3055,59 @@ def accept(self, visitor:ParseTreeVisitor): def literal(self): localctx = FuncTestCaseParser.LiteralContext(self, self._ctx, self.state) - self.enterRule(localctx, 34, self.RULE_literal) + self.enterRule(localctx, 52, self.RULE_literal) try: - self.state = 353 + self.state = 461 self._errHandler.sync(self) token = self._input.LA(1) - if token in [44]: + if token in [45]: self.enterOuterAlt(localctx, 1) - self.state = 343 + self.state = 451 self.match(FuncTestCaseParser.NullLiteral) pass - elif token in [18, 24, 25, 26]: + elif token in [19, 25, 26, 27]: self.enterOuterAlt(localctx, 2) - self.state = 344 + self.state = 452 self.numericLiteral() pass - elif token in [27]: + elif token in [28]: self.enterOuterAlt(localctx, 3) - self.state = 345 + self.state = 453 self.match(FuncTestCaseParser.BooleanLiteral) pass - elif token in [45]: + elif token in [46]: self.enterOuterAlt(localctx, 4) - self.state = 346 + self.state = 454 self.match(FuncTestCaseParser.StringLiteral) pass - elif token in [31]: + elif token in [32]: self.enterOuterAlt(localctx, 5) - self.state = 347 + self.state = 455 self.match(FuncTestCaseParser.DateLiteral) pass - elif token in [30]: + elif token in [31]: self.enterOuterAlt(localctx, 6) - self.state = 348 + self.state = 456 self.match(FuncTestCaseParser.TimeLiteral) pass - elif token in [29]: + elif token in [30]: self.enterOuterAlt(localctx, 7) - self.state = 349 + self.state = 457 self.match(FuncTestCaseParser.TimestampLiteral) pass - elif token in [28]: + elif token in [29]: self.enterOuterAlt(localctx, 8) - self.state = 350 + self.state = 458 self.match(FuncTestCaseParser.TimestampTzLiteral) pass - elif token in [42]: + elif token in [43]: self.enterOuterAlt(localctx, 9) - self.state = 351 + self.state = 459 self.match(FuncTestCaseParser.IntervalYearLiteral) pass - elif token in [43]: + elif token in [44]: self.enterOuterAlt(localctx, 10) - self.state = 352 + self.state = 460 self.match(FuncTestCaseParser.IntervalDayLiteral) pass else: @@ -2410,21 +3165,21 @@ def accept(self, visitor:ParseTreeVisitor): def qualifiedAggregateFuncArgs(self): localctx = FuncTestCaseParser.QualifiedAggregateFuncArgsContext(self, self._ctx, self.state) - self.enterRule(localctx, 36, self.RULE_qualifiedAggregateFuncArgs) + self.enterRule(localctx, 54, self.RULE_qualifiedAggregateFuncArgs) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 355 + self.state = 463 self.qualifiedAggregateFuncArg() - self.state = 360 + self.state = 468 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 356 + while _la==115: + self.state = 464 self.match(FuncTestCaseParser.Comma) - self.state = 357 + self.state = 465 self.qualifiedAggregateFuncArg() - self.state = 362 + self.state = 470 self._errHandler.sync(self) _la = self._input.LA(1) @@ -2480,21 +3235,21 @@ def accept(self, visitor:ParseTreeVisitor): def aggregateFuncArgs(self): localctx = FuncTestCaseParser.AggregateFuncArgsContext(self, self._ctx, self.state) - self.enterRule(localctx, 38, self.RULE_aggregateFuncArgs) + self.enterRule(localctx, 56, self.RULE_aggregateFuncArgs) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 363 + self.state = 471 self.aggregateFuncArg() - self.state = 368 + self.state = 476 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 364 + while _la==115: + self.state = 472 self.match(FuncTestCaseParser.Comma) - self.state = 365 + self.state = 473 self.aggregateFuncArg() - self.state = 370 + self.state = 478 self._errHandler.sync(self) _la = self._input.LA(1) @@ -2551,24 +3306,24 @@ def accept(self, visitor:ParseTreeVisitor): def qualifiedAggregateFuncArg(self): localctx = FuncTestCaseParser.QualifiedAggregateFuncArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 40, self.RULE_qualifiedAggregateFuncArg) + self.enterRule(localctx, 58, self.RULE_qualifiedAggregateFuncArg) try: - self.state = 375 + self.state = 483 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,24,self._ctx) + la_ = self._interp.adaptivePredict(self._input,35,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 371 + self.state = 479 localctx.tableName = self.match(FuncTestCaseParser.Identifier) - self.state = 372 + self.state = 480 self.match(FuncTestCaseParser.Dot) - self.state = 373 + self.state = 481 self.match(FuncTestCaseParser.ColumnName) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 374 + self.state = 482 self.argument() pass @@ -2626,23 +3381,23 @@ def accept(self, visitor:ParseTreeVisitor): def aggregateFuncArg(self): localctx = FuncTestCaseParser.AggregateFuncArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 42, self.RULE_aggregateFuncArg) + self.enterRule(localctx, 60, self.RULE_aggregateFuncArg) try: - self.state = 381 + self.state = 489 self._errHandler.sync(self) token = self._input.LA(1) - if token in [46]: + if token in [47]: self.enterOuterAlt(localctx, 1) - self.state = 377 + self.state = 485 self.match(FuncTestCaseParser.ColumnName) - self.state = 378 + self.state = 486 self.match(FuncTestCaseParser.DoubleColon) - self.state = 379 + self.state = 487 self.dataType() pass - elif token in [18, 24, 25, 26, 27, 28, 29, 30, 31, 42, 43, 44, 45, 110, 112, 124]: + elif token in [19, 25, 26, 27, 28, 29, 30, 31, 32, 43, 44, 45, 46, 111, 113, 125]: self.enterOuterAlt(localctx, 2) - self.state = 380 + self.state = 488 self.argument() pass else: @@ -2697,24 +3452,24 @@ def accept(self, visitor:ParseTreeVisitor): def numericLiteral(self): localctx = FuncTestCaseParser.NumericLiteralContext(self, self._ctx, self.state) - self.enterRule(localctx, 44, self.RULE_numericLiteral) + self.enterRule(localctx, 62, self.RULE_numericLiteral) try: - self.state = 386 + self.state = 494 self._errHandler.sync(self) token = self._input.LA(1) - if token in [25]: + if token in [26]: self.enterOuterAlt(localctx, 1) - self.state = 383 + self.state = 491 self.match(FuncTestCaseParser.DecimalLiteral) pass - elif token in [24]: + elif token in [25]: self.enterOuterAlt(localctx, 2) - self.state = 384 + self.state = 492 self.match(FuncTestCaseParser.IntegerLiteral) pass - elif token in [18, 26]: + elif token in [19, 27]: self.enterOuterAlt(localctx, 3) - self.state = 385 + self.state = 493 self.floatLiteral() pass else: @@ -2765,13 +3520,13 @@ def accept(self, visitor:ParseTreeVisitor): def floatLiteral(self): localctx = FuncTestCaseParser.FloatLiteralContext(self, self._ctx, self.state) - self.enterRule(localctx, 46, self.RULE_floatLiteral) + self.enterRule(localctx, 64, self.RULE_floatLiteral) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 388 + self.state = 496 _la = self._input.LA(1) - if not(_la==18 or _la==26): + if not(_la==19 or _la==27): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -2825,14 +3580,14 @@ def accept(self, visitor:ParseTreeVisitor): def nullArg(self): localctx = FuncTestCaseParser.NullArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 48, self.RULE_nullArg) + self.enterRule(localctx, 66, self.RULE_nullArg) try: self.enterOuterAlt(localctx, 1) - self.state = 390 + self.state = 498 self.match(FuncTestCaseParser.NullLiteral) - self.state = 391 + self.state = 499 self.match(FuncTestCaseParser.DoubleColon) - self.state = 392 + self.state = 500 self.dataType() except RecognitionException as re: localctx.exception = re @@ -2883,14 +3638,14 @@ def accept(self, visitor:ParseTreeVisitor): def intArg(self): localctx = FuncTestCaseParser.IntArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 50, self.RULE_intArg) + self.enterRule(localctx, 68, self.RULE_intArg) try: self.enterOuterAlt(localctx, 1) - self.state = 394 + self.state = 502 self.match(FuncTestCaseParser.IntegerLiteral) - self.state = 395 + self.state = 503 self.match(FuncTestCaseParser.DoubleColon) - self.state = 396 + self.state = 504 self.intType() except RecognitionException as re: localctx.exception = re @@ -2942,14 +3697,14 @@ def accept(self, visitor:ParseTreeVisitor): def floatArg(self): localctx = FuncTestCaseParser.FloatArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 52, self.RULE_floatArg) + self.enterRule(localctx, 70, self.RULE_floatArg) try: self.enterOuterAlt(localctx, 1) - self.state = 398 + self.state = 506 self.numericLiteral() - self.state = 399 + self.state = 507 self.match(FuncTestCaseParser.DoubleColon) - self.state = 400 + self.state = 508 self.floatType() except RecognitionException as re: localctx.exception = re @@ -3001,14 +3756,14 @@ def accept(self, visitor:ParseTreeVisitor): def decimalArg(self): localctx = FuncTestCaseParser.DecimalArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 54, self.RULE_decimalArg) + self.enterRule(localctx, 72, self.RULE_decimalArg) try: self.enterOuterAlt(localctx, 1) - self.state = 402 + self.state = 510 self.numericLiteral() - self.state = 403 + self.state = 511 self.match(FuncTestCaseParser.DoubleColon) - self.state = 404 + self.state = 512 self.decimalType() except RecognitionException as re: localctx.exception = re @@ -3059,14 +3814,14 @@ def accept(self, visitor:ParseTreeVisitor): def booleanArg(self): localctx = FuncTestCaseParser.BooleanArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 56, self.RULE_booleanArg) + self.enterRule(localctx, 74, self.RULE_booleanArg) try: self.enterOuterAlt(localctx, 1) - self.state = 406 + self.state = 514 self.match(FuncTestCaseParser.BooleanLiteral) - self.state = 407 + self.state = 515 self.match(FuncTestCaseParser.DoubleColon) - self.state = 408 + self.state = 516 self.booleanType() except RecognitionException as re: localctx.exception = re @@ -3117,14 +3872,14 @@ def accept(self, visitor:ParseTreeVisitor): def stringArg(self): localctx = FuncTestCaseParser.StringArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 58, self.RULE_stringArg) + self.enterRule(localctx, 76, self.RULE_stringArg) try: self.enterOuterAlt(localctx, 1) - self.state = 410 + self.state = 518 self.match(FuncTestCaseParser.StringLiteral) - self.state = 411 + self.state = 519 self.match(FuncTestCaseParser.DoubleColon) - self.state = 412 + self.state = 520 self.stringType() except RecognitionException as re: localctx.exception = re @@ -3175,14 +3930,14 @@ def accept(self, visitor:ParseTreeVisitor): def dateArg(self): localctx = FuncTestCaseParser.DateArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 60, self.RULE_dateArg) + self.enterRule(localctx, 78, self.RULE_dateArg) try: self.enterOuterAlt(localctx, 1) - self.state = 414 + self.state = 522 self.match(FuncTestCaseParser.DateLiteral) - self.state = 415 + self.state = 523 self.match(FuncTestCaseParser.DoubleColon) - self.state = 416 + self.state = 524 self.dateType() except RecognitionException as re: localctx.exception = re @@ -3233,14 +3988,14 @@ def accept(self, visitor:ParseTreeVisitor): def timeArg(self): localctx = FuncTestCaseParser.TimeArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 62, self.RULE_timeArg) + self.enterRule(localctx, 80, self.RULE_timeArg) try: self.enterOuterAlt(localctx, 1) - self.state = 418 + self.state = 526 self.match(FuncTestCaseParser.TimeLiteral) - self.state = 419 + self.state = 527 self.match(FuncTestCaseParser.DoubleColon) - self.state = 420 + self.state = 528 self.timeType() except RecognitionException as re: localctx.exception = re @@ -3291,14 +4046,14 @@ def accept(self, visitor:ParseTreeVisitor): def timestampArg(self): localctx = FuncTestCaseParser.TimestampArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 64, self.RULE_timestampArg) + self.enterRule(localctx, 82, self.RULE_timestampArg) try: self.enterOuterAlt(localctx, 1) - self.state = 422 + self.state = 530 self.match(FuncTestCaseParser.TimestampLiteral) - self.state = 423 + self.state = 531 self.match(FuncTestCaseParser.DoubleColon) - self.state = 424 + self.state = 532 self.timestampType() except RecognitionException as re: localctx.exception = re @@ -3349,14 +4104,14 @@ def accept(self, visitor:ParseTreeVisitor): def timestampTzArg(self): localctx = FuncTestCaseParser.TimestampTzArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 66, self.RULE_timestampTzArg) + self.enterRule(localctx, 84, self.RULE_timestampTzArg) try: self.enterOuterAlt(localctx, 1) - self.state = 426 + self.state = 534 self.match(FuncTestCaseParser.TimestampTzLiteral) - self.state = 427 + self.state = 535 self.match(FuncTestCaseParser.DoubleColon) - self.state = 428 + self.state = 536 self.timestampTZType() except RecognitionException as re: localctx.exception = re @@ -3407,14 +4162,14 @@ def accept(self, visitor:ParseTreeVisitor): def intervalYearArg(self): localctx = FuncTestCaseParser.IntervalYearArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 68, self.RULE_intervalYearArg) + self.enterRule(localctx, 86, self.RULE_intervalYearArg) try: self.enterOuterAlt(localctx, 1) - self.state = 430 + self.state = 538 self.match(FuncTestCaseParser.IntervalYearLiteral) - self.state = 431 + self.state = 539 self.match(FuncTestCaseParser.DoubleColon) - self.state = 432 + self.state = 540 self.intervalYearType() except RecognitionException as re: localctx.exception = re @@ -3465,14 +4220,14 @@ def accept(self, visitor:ParseTreeVisitor): def intervalDayArg(self): localctx = FuncTestCaseParser.IntervalDayArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 70, self.RULE_intervalDayArg) + self.enterRule(localctx, 88, self.RULE_intervalDayArg) try: self.enterOuterAlt(localctx, 1) - self.state = 434 + self.state = 542 self.match(FuncTestCaseParser.IntervalDayLiteral) - self.state = 435 + self.state = 543 self.match(FuncTestCaseParser.DoubleColon) - self.state = 436 + self.state = 544 self.intervalDayType() except RecognitionException as re: localctx.exception = re @@ -3523,14 +4278,14 @@ def accept(self, visitor:ParseTreeVisitor): def fixedCharArg(self): localctx = FuncTestCaseParser.FixedCharArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 72, self.RULE_fixedCharArg) + self.enterRule(localctx, 90, self.RULE_fixedCharArg) try: self.enterOuterAlt(localctx, 1) - self.state = 438 + self.state = 546 self.match(FuncTestCaseParser.StringLiteral) - self.state = 439 + self.state = 547 self.match(FuncTestCaseParser.DoubleColon) - self.state = 440 + self.state = 548 self.fixedCharType() except RecognitionException as re: localctx.exception = re @@ -3581,14 +4336,14 @@ def accept(self, visitor:ParseTreeVisitor): def varCharArg(self): localctx = FuncTestCaseParser.VarCharArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 74, self.RULE_varCharArg) + self.enterRule(localctx, 92, self.RULE_varCharArg) try: self.enterOuterAlt(localctx, 1) - self.state = 442 + self.state = 550 self.match(FuncTestCaseParser.StringLiteral) - self.state = 443 + self.state = 551 self.match(FuncTestCaseParser.DoubleColon) - self.state = 444 + self.state = 552 self.varCharType() except RecognitionException as re: localctx.exception = re @@ -3639,14 +4394,14 @@ def accept(self, visitor:ParseTreeVisitor): def fixedBinaryArg(self): localctx = FuncTestCaseParser.FixedBinaryArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 76, self.RULE_fixedBinaryArg) + self.enterRule(localctx, 94, self.RULE_fixedBinaryArg) try: self.enterOuterAlt(localctx, 1) - self.state = 446 + self.state = 554 self.match(FuncTestCaseParser.StringLiteral) - self.state = 447 + self.state = 555 self.match(FuncTestCaseParser.DoubleColon) - self.state = 448 + self.state = 556 self.fixedBinaryType() except RecognitionException as re: localctx.exception = re @@ -3697,14 +4452,14 @@ def accept(self, visitor:ParseTreeVisitor): def precisionTimeArg(self): localctx = FuncTestCaseParser.PrecisionTimeArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 78, self.RULE_precisionTimeArg) + self.enterRule(localctx, 96, self.RULE_precisionTimeArg) try: self.enterOuterAlt(localctx, 1) - self.state = 450 + self.state = 558 self.match(FuncTestCaseParser.TimeLiteral) - self.state = 451 + self.state = 559 self.match(FuncTestCaseParser.DoubleColon) - self.state = 452 + self.state = 560 self.precisionTimeType() except RecognitionException as re: localctx.exception = re @@ -3755,14 +4510,14 @@ def accept(self, visitor:ParseTreeVisitor): def precisionTimestampArg(self): localctx = FuncTestCaseParser.PrecisionTimestampArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 80, self.RULE_precisionTimestampArg) + self.enterRule(localctx, 98, self.RULE_precisionTimestampArg) try: self.enterOuterAlt(localctx, 1) - self.state = 454 + self.state = 562 self.match(FuncTestCaseParser.TimestampLiteral) - self.state = 455 + self.state = 563 self.match(FuncTestCaseParser.DoubleColon) - self.state = 456 + self.state = 564 self.precisionTimestampType() except RecognitionException as re: localctx.exception = re @@ -3813,14 +4568,14 @@ def accept(self, visitor:ParseTreeVisitor): def precisionTimestampTZArg(self): localctx = FuncTestCaseParser.PrecisionTimestampTZArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 82, self.RULE_precisionTimestampTZArg) + self.enterRule(localctx, 100, self.RULE_precisionTimestampTZArg) try: self.enterOuterAlt(localctx, 1) - self.state = 458 + self.state = 566 self.match(FuncTestCaseParser.TimestampTzLiteral) - self.state = 459 + self.state = 567 self.match(FuncTestCaseParser.DoubleColon) - self.state = 460 + self.state = 568 self.precisionTimestampTZType() except RecognitionException as re: localctx.exception = re @@ -3872,14 +4627,14 @@ def accept(self, visitor:ParseTreeVisitor): def listArg(self): localctx = FuncTestCaseParser.ListArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 84, self.RULE_listArg) + self.enterRule(localctx, 102, self.RULE_listArg) try: self.enterOuterAlt(localctx, 1) - self.state = 462 + self.state = 570 self.literalList() - self.state = 463 + self.state = 571 self.match(FuncTestCaseParser.DoubleColon) - self.state = 464 + self.state = 572 self.listType() except RecognitionException as re: localctx.exception = re @@ -3931,14 +4686,14 @@ def accept(self, visitor:ParseTreeVisitor): def lambdaArg(self): localctx = FuncTestCaseParser.LambdaArgContext(self, self._ctx, self.state) - self.enterRule(localctx, 86, self.RULE_lambdaArg) + self.enterRule(localctx, 104, self.RULE_lambdaArg) try: self.enterOuterAlt(localctx, 1) - self.state = 466 + self.state = 574 self.literalLambda() - self.state = 467 + self.state = 575 self.match(FuncTestCaseParser.DoubleColon) - self.state = 468 + self.state = 576 self.funcType() except RecognitionException as re: localctx.exception = re @@ -3998,33 +4753,33 @@ def accept(self, visitor:ParseTreeVisitor): def literalList(self): localctx = FuncTestCaseParser.LiteralListContext(self, self._ctx, self.state) - self.enterRule(localctx, 88, self.RULE_literalList) + self.enterRule(localctx, 106, self.RULE_literalList) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 470 + self.state = 578 self.match(FuncTestCaseParser.OBracket) - self.state = 479 + self.state = 587 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 65974976118784) != 0): - self.state = 471 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 131949952237568) != 0): + self.state = 579 self.literal() - self.state = 476 + self.state = 584 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 472 + while _la==115: + self.state = 580 self.match(FuncTestCaseParser.Comma) - self.state = 473 + self.state = 581 self.literal() - self.state = 478 + self.state = 586 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 481 + self.state = 589 self.match(FuncTestCaseParser.CBracket) except RecognitionException as re: localctx.exception = re @@ -4082,18 +4837,18 @@ def accept(self, visitor:ParseTreeVisitor): def literalLambda(self): localctx = FuncTestCaseParser.LiteralLambdaContext(self, self._ctx, self.state) - self.enterRule(localctx, 90, self.RULE_literalLambda) + self.enterRule(localctx, 108, self.RULE_literalLambda) try: self.enterOuterAlt(localctx, 1) - self.state = 483 + self.state = 591 self.match(FuncTestCaseParser.OParen) - self.state = 484 + self.state = 592 self.lambdaParameters() - self.state = 485 + self.state = 593 self.match(FuncTestCaseParser.Arrow) - self.state = 486 + self.state = 594 self.lambdaBody() - self.state = 487 + self.state = 595 self.match(FuncTestCaseParser.CParen) except RecognitionException as re: localctx.exception = re @@ -4185,40 +4940,40 @@ def accept(self, visitor:ParseTreeVisitor): def lambdaParameters(self): localctx = FuncTestCaseParser.LambdaParametersContext(self, self._ctx, self.state) - self.enterRule(localctx, 92, self.RULE_lambdaParameters) + self.enterRule(localctx, 110, self.RULE_lambdaParameters) self._la = 0 # Token type try: - self.state = 499 + self.state = 607 self._errHandler.sync(self) token = self._input.LA(1) - if token in [124]: + if token in [125]: localctx = FuncTestCaseParser.SingleParamContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 489 + self.state = 597 self.match(FuncTestCaseParser.Identifier) pass - elif token in [110]: + elif token in [111]: localctx = FuncTestCaseParser.TupleParamsContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 490 + self.state = 598 self.match(FuncTestCaseParser.OParen) - self.state = 491 + self.state = 599 self.match(FuncTestCaseParser.Identifier) - self.state = 494 + self.state = 602 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 492 + self.state = 600 self.match(FuncTestCaseParser.Comma) - self.state = 493 + self.state = 601 self.match(FuncTestCaseParser.Identifier) - self.state = 496 + self.state = 604 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==114): + if not (_la==115): break - self.state = 498 + self.state = 606 self.match(FuncTestCaseParser.CParen) pass else: @@ -4277,16 +5032,16 @@ def accept(self, visitor:ParseTreeVisitor): def lambdaBody(self): localctx = FuncTestCaseParser.LambdaBodyContext(self, self._ctx, self.state) - self.enterRule(localctx, 94, self.RULE_lambdaBody) + self.enterRule(localctx, 112, self.RULE_lambdaBody) try: self.enterOuterAlt(localctx, 1) - self.state = 501 + self.state = 609 self.identifier() - self.state = 502 + self.state = 610 self.match(FuncTestCaseParser.OParen) - self.state = 503 + self.state = 611 self.arguments() - self.state = 504 + self.state = 612 self.match(FuncTestCaseParser.CParen) except RecognitionException as re: localctx.exception = re @@ -4335,19 +5090,19 @@ def accept(self, visitor:ParseTreeVisitor): def dataType(self): localctx = FuncTestCaseParser.DataTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 96, self.RULE_dataType) + self.enterRule(localctx, 114, self.RULE_dataType) try: - self.state = 508 + self.state = 616 self._errHandler.sync(self) token = self._input.LA(1) - if token in [53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 80, 81, 82, 83, 84, 85, 86]: + if token in [54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 81, 82, 83, 84, 85, 86, 87]: self.enterOuterAlt(localctx, 1) - self.state = 506 + self.state = 614 self.scalarType() pass - elif token in [52, 67, 69, 70, 71, 72, 73, 74, 75, 87, 88, 89, 90, 91, 92, 93, 94]: + elif token in [53, 68, 70, 71, 72, 73, 74, 75, 76, 77, 88, 89, 90, 91, 92, 93, 94, 95]: self.enterOuterAlt(localctx, 2) - self.state = 507 + self.state = 615 self.parameterizedType() pass else: @@ -4689,98 +5444,98 @@ def accept(self, visitor:ParseTreeVisitor): def scalarType(self): localctx = FuncTestCaseParser.ScalarTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 98, self.RULE_scalarType) + self.enterRule(localctx, 116, self.RULE_scalarType) self._la = 0 # Token type try: - self.state = 529 + self.state = 637 self._errHandler.sync(self) token = self._input.LA(1) - if token in [53, 81]: + if token in [54, 82]: localctx = FuncTestCaseParser.BooleanContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 510 + self.state = 618 self.booleanType() pass - elif token in [54, 55, 56, 57]: + elif token in [55, 56, 57, 58]: localctx = FuncTestCaseParser.IntContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 511 + self.state = 619 self.intType() pass - elif token in [58, 59]: + elif token in [59, 60]: localctx = FuncTestCaseParser.FloatContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 512 + self.state = 620 self.floatType() pass - elif token in [60, 82]: + elif token in [61, 83]: localctx = FuncTestCaseParser.StringContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 513 + self.state = 621 self.stringType() pass - elif token in [61, 83]: + elif token in [62, 84]: localctx = FuncTestCaseParser.BinaryContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 514 + self.state = 622 self.binaryType() pass - elif token in [62, 84]: + elif token in [63, 85]: localctx = FuncTestCaseParser.TimestampContext(self, localctx) self.enterOuterAlt(localctx, 6) - self.state = 515 + self.state = 623 self.timestampType() pass - elif token in [63, 85]: + elif token in [64, 86]: localctx = FuncTestCaseParser.TimestampTzContext(self, localctx) self.enterOuterAlt(localctx, 7) - self.state = 516 + self.state = 624 self.timestampTZType() pass - elif token in [64]: + elif token in [65]: localctx = FuncTestCaseParser.DateContext(self, localctx) self.enterOuterAlt(localctx, 8) - self.state = 517 + self.state = 625 self.dateType() pass - elif token in [65]: + elif token in [66]: localctx = FuncTestCaseParser.TimeContext(self, localctx) self.enterOuterAlt(localctx, 9) - self.state = 518 + self.state = 626 self.timeType() pass - elif token in [66, 86]: + elif token in [67, 87]: localctx = FuncTestCaseParser.IntervalYearContext(self, localctx) self.enterOuterAlt(localctx, 10) - self.state = 519 + self.state = 627 self.intervalYearType() pass - elif token in [68]: + elif token in [69]: localctx = FuncTestCaseParser.UuidContext(self, localctx) self.enterOuterAlt(localctx, 11) - self.state = 520 + self.state = 628 self.match(FuncTestCaseParser.UUID) - self.state = 522 + self.state = 630 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 521 + if _la==117: + self.state = 629 localctx.isnull = self.match(FuncTestCaseParser.QMark) pass - elif token in [80]: + elif token in [81]: localctx = FuncTestCaseParser.UserDefinedContext(self, localctx) self.enterOuterAlt(localctx, 12) - self.state = 524 + self.state = 632 self.match(FuncTestCaseParser.UserDefined) - self.state = 525 + self.state = 633 self.match(FuncTestCaseParser.Identifier) - self.state = 527 + self.state = 635 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 526 + if _la==117: + self.state = 634 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -4837,22 +5592,22 @@ def accept(self, visitor:ParseTreeVisitor): def booleanType(self): localctx = FuncTestCaseParser.BooleanTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 100, self.RULE_booleanType) + self.enterRule(localctx, 118, self.RULE_booleanType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 531 + self.state = 639 _la = self._input.LA(1) - if not(_la==53 or _la==81): + if not(_la==54 or _la==82): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 533 + self.state = 641 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 532 + if _la==117: + self.state = 640 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -4905,22 +5660,22 @@ def accept(self, visitor:ParseTreeVisitor): def stringType(self): localctx = FuncTestCaseParser.StringTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 102, self.RULE_stringType) + self.enterRule(localctx, 120, self.RULE_stringType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 535 + self.state = 643 _la = self._input.LA(1) - if not(_la==60 or _la==82): + if not(_la==61 or _la==83): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 537 + self.state = 645 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 536 + if _la==117: + self.state = 644 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -4973,22 +5728,22 @@ def accept(self, visitor:ParseTreeVisitor): def binaryType(self): localctx = FuncTestCaseParser.BinaryTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 104, self.RULE_binaryType) + self.enterRule(localctx, 122, self.RULE_binaryType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 539 + self.state = 647 _la = self._input.LA(1) - if not(_la==61 or _la==83): + if not(_la==62 or _la==84): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 541 + self.state = 649 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 540 + if _la==117: + self.state = 648 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -5047,22 +5802,22 @@ def accept(self, visitor:ParseTreeVisitor): def intType(self): localctx = FuncTestCaseParser.IntTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 106, self.RULE_intType) + self.enterRule(localctx, 124, self.RULE_intType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 543 + self.state = 651 _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 270215977642229760) != 0)): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 540431955284459520) != 0)): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 545 + self.state = 653 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 544 + if _la==117: + self.state = 652 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -5115,22 +5870,22 @@ def accept(self, visitor:ParseTreeVisitor): def floatType(self): localctx = FuncTestCaseParser.FloatTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 108, self.RULE_floatType) + self.enterRule(localctx, 126, self.RULE_floatType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 547 + self.state = 655 _la = self._input.LA(1) - if not(_la==58 or _la==59): + if not(_la==59 or _la==60): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 549 + self.state = 657 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 548 + if _la==117: + self.state = 656 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -5180,17 +5935,17 @@ def accept(self, visitor:ParseTreeVisitor): def dateType(self): localctx = FuncTestCaseParser.DateTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 110, self.RULE_dateType) + self.enterRule(localctx, 128, self.RULE_dateType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 551 + self.state = 659 self.match(FuncTestCaseParser.Date) - self.state = 553 + self.state = 661 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 552 + if _la==117: + self.state = 660 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -5240,17 +5995,17 @@ def accept(self, visitor:ParseTreeVisitor): def timeType(self): localctx = FuncTestCaseParser.TimeTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 112, self.RULE_timeType) + self.enterRule(localctx, 130, self.RULE_timeType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 555 + self.state = 663 self.match(FuncTestCaseParser.Time) - self.state = 557 + self.state = 665 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 556 + if _la==117: + self.state = 664 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -5303,22 +6058,22 @@ def accept(self, visitor:ParseTreeVisitor): def timestampType(self): localctx = FuncTestCaseParser.TimestampTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 114, self.RULE_timestampType) + self.enterRule(localctx, 132, self.RULE_timestampType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 559 + self.state = 667 _la = self._input.LA(1) - if not(_la==62 or _la==84): + if not(_la==63 or _la==85): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 561 + self.state = 669 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 560 + if _la==117: + self.state = 668 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -5371,22 +6126,22 @@ def accept(self, visitor:ParseTreeVisitor): def timestampTZType(self): localctx = FuncTestCaseParser.TimestampTZTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 116, self.RULE_timestampTZType) + self.enterRule(localctx, 134, self.RULE_timestampTZType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 563 + self.state = 671 _la = self._input.LA(1) - if not(_la==63 or _la==85): + if not(_la==64 or _la==86): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 565 + self.state = 673 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 564 + if _la==117: + self.state = 672 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -5439,22 +6194,22 @@ def accept(self, visitor:ParseTreeVisitor): def intervalYearType(self): localctx = FuncTestCaseParser.IntervalYearTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 118, self.RULE_intervalYearType) + self.enterRule(localctx, 136, self.RULE_intervalYearType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 567 + self.state = 675 _la = self._input.LA(1) - if not(_la==66 or _la==86): + if not(_la==67 or _la==87): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 569 + self.state = 677 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 568 + if _la==117: + self.state = 676 localctx.isnull = self.match(FuncTestCaseParser.QMark) @@ -5518,34 +6273,34 @@ def accept(self, visitor:ParseTreeVisitor): def intervalDayType(self): localctx = FuncTestCaseParser.IntervalDayTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 120, self.RULE_intervalDayType) + self.enterRule(localctx, 138, self.RULE_intervalDayType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 571 + self.state = 679 _la = self._input.LA(1) - if not(_la==67 or _la==87): + if not(_la==68 or _la==88): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 573 + self.state = 681 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 572 + if _la==117: + self.state = 680 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 579 + self.state = 687 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==40: - self.state = 575 + if _la==41: + self.state = 683 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 576 + self.state = 684 localctx.len_ = self.numericParameter() - self.state = 577 + self.state = 685 self.match(FuncTestCaseParser.CAngleBracket) @@ -5609,30 +6364,30 @@ def accept(self, visitor:ParseTreeVisitor): def fixedCharType(self): localctx = FuncTestCaseParser.FixedCharTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 122, self.RULE_fixedCharType) + self.enterRule(localctx, 140, self.RULE_fixedCharType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 581 + self.state = 689 _la = self._input.LA(1) - if not(_la==73 or _la==92): + if not(_la==74 or _la==93): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 583 + self.state = 691 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 582 + if _la==117: + self.state = 690 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 585 + self.state = 693 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 586 + self.state = 694 localctx.len_ = self.numericParameter() - self.state = 587 + self.state = 695 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -5694,30 +6449,30 @@ def accept(self, visitor:ParseTreeVisitor): def varCharType(self): localctx = FuncTestCaseParser.VarCharTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 124, self.RULE_varCharType) + self.enterRule(localctx, 142, self.RULE_varCharType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 589 + self.state = 697 _la = self._input.LA(1) - if not(_la==74 or _la==93): + if not(_la==75 or _la==94): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 591 + self.state = 699 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 590 + if _la==117: + self.state = 698 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 593 + self.state = 701 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 594 + self.state = 702 localctx.len_ = self.numericParameter() - self.state = 595 + self.state = 703 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -5779,30 +6534,30 @@ def accept(self, visitor:ParseTreeVisitor): def fixedBinaryType(self): localctx = FuncTestCaseParser.FixedBinaryTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 126, self.RULE_fixedBinaryType) + self.enterRule(localctx, 144, self.RULE_fixedBinaryType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 597 + self.state = 705 _la = self._input.LA(1) - if not(_la==75 or _la==94): + if not(_la==76 or _la==95): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 599 + self.state = 707 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 598 + if _la==117: + self.state = 706 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 601 + self.state = 709 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 602 + self.state = 710 localctx.len_ = self.numericParameter() - self.state = 603 + self.state = 711 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -5871,38 +6626,38 @@ def accept(self, visitor:ParseTreeVisitor): def decimalType(self): localctx = FuncTestCaseParser.DecimalTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 128, self.RULE_decimalType) + self.enterRule(localctx, 146, self.RULE_decimalType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 605 + self.state = 713 _la = self._input.LA(1) - if not(_la==69 or _la==88): + if not(_la==70 or _la==89): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 607 + self.state = 715 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 606 + if _la==117: + self.state = 714 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 615 + self.state = 723 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==40: - self.state = 609 + if _la==41: + self.state = 717 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 610 + self.state = 718 localctx.precision = self.numericParameter() - self.state = 611 + self.state = 719 self.match(FuncTestCaseParser.Comma) - self.state = 612 + self.state = 720 localctx.scale = self.numericParameter() - self.state = 613 + self.state = 721 self.match(FuncTestCaseParser.CAngleBracket) @@ -5966,30 +6721,30 @@ def accept(self, visitor:ParseTreeVisitor): def precisionTimeType(self): localctx = FuncTestCaseParser.PrecisionTimeTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 130, self.RULE_precisionTimeType) + self.enterRule(localctx, 148, self.RULE_precisionTimeType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 617 + self.state = 725 _la = self._input.LA(1) - if not(_la==70 or _la==89): + if not(_la==71 or _la==90): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 619 + self.state = 727 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 618 + if _la==117: + self.state = 726 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 621 + self.state = 729 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 622 + self.state = 730 localctx.precision = self.numericParameter() - self.state = 623 + self.state = 731 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -6051,30 +6806,30 @@ def accept(self, visitor:ParseTreeVisitor): def precisionTimestampType(self): localctx = FuncTestCaseParser.PrecisionTimestampTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 132, self.RULE_precisionTimestampType) + self.enterRule(localctx, 150, self.RULE_precisionTimestampType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 625 + self.state = 733 _la = self._input.LA(1) - if not(_la==71 or _la==90): + if not(_la==72 or _la==91): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 627 + self.state = 735 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 626 + if _la==117: + self.state = 734 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 629 + self.state = 737 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 630 + self.state = 738 localctx.precision = self.numericParameter() - self.state = 631 + self.state = 739 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -6136,30 +6891,30 @@ def accept(self, visitor:ParseTreeVisitor): def precisionTimestampTZType(self): localctx = FuncTestCaseParser.PrecisionTimestampTZTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 134, self.RULE_precisionTimestampTZType) + self.enterRule(localctx, 152, self.RULE_precisionTimestampTZType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 633 + self.state = 741 _la = self._input.LA(1) - if not(_la==72 or _la==91): + if not(_la==73 or _la==92): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 635 + self.state = 743 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 634 + if _la==117: + self.state = 742 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 637 + self.state = 745 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 638 + self.state = 746 localctx.precision = self.numericParameter() - self.state = 639 + self.state = 747 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -6226,26 +6981,26 @@ def accept(self, visitor:ParseTreeVisitor): def listType(self): localctx = FuncTestCaseParser.ListTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 136, self.RULE_listType) + self.enterRule(localctx, 154, self.RULE_listType) self._la = 0 # Token type try: localctx = FuncTestCaseParser.ListContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 641 + self.state = 749 self.match(FuncTestCaseParser.List) - self.state = 643 + self.state = 751 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 642 + if _la==117: + self.state = 750 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 645 + self.state = 753 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 646 + self.state = 754 localctx.elemType = self.dataType() - self.state = 647 + self.state = 755 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -6312,29 +7067,29 @@ def accept(self, visitor:ParseTreeVisitor): def funcType(self): localctx = FuncTestCaseParser.FuncTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 138, self.RULE_funcType) + self.enterRule(localctx, 156, self.RULE_funcType) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 649 + self.state = 757 self.match(FuncTestCaseParser.Func) - self.state = 651 + self.state = 759 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==116: - self.state = 650 + if _la==117: + self.state = 758 localctx.isnull = self.match(FuncTestCaseParser.QMark) - self.state = 653 + self.state = 761 self.match(FuncTestCaseParser.OAngleBracket) - self.state = 654 + self.state = 762 localctx.params = self.funcParameters() - self.state = 655 + self.state = 763 self.match(FuncTestCaseParser.Arrow) - self.state = 656 + self.state = 764 localctx.returnType = self.dataType() - self.state = 657 + self.state = 765 self.match(FuncTestCaseParser.CAngleBracket) except RecognitionException as re: localctx.exception = re @@ -6428,38 +7183,38 @@ def accept(self, visitor:ParseTreeVisitor): def funcParameters(self): localctx = FuncTestCaseParser.FuncParametersContext(self, self._ctx, self.state) - self.enterRule(localctx, 140, self.RULE_funcParameters) + self.enterRule(localctx, 158, self.RULE_funcParameters) self._la = 0 # Token type try: - self.state = 671 + self.state = 779 self._errHandler.sync(self) token = self._input.LA(1) - if token in [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94]: + if token in [53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95]: localctx = FuncTestCaseParser.SingleFuncParamContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 659 + self.state = 767 self.dataType() pass - elif token in [110]: + elif token in [111]: localctx = FuncTestCaseParser.FuncParamsWithParensContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 660 + self.state = 768 self.match(FuncTestCaseParser.OParen) - self.state = 661 + self.state = 769 self.dataType() - self.state = 666 + self.state = 774 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 662 + while _la==115: + self.state = 770 self.match(FuncTestCaseParser.Comma) - self.state = 663 + self.state = 771 self.dataType() - self.state = 668 + self.state = 776 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 669 + self.state = 777 self.match(FuncTestCaseParser.CParen) pass else: @@ -6517,6 +7272,10 @@ def funcType(self): return self.getTypedRuleContext(FuncTestCaseParser.FuncTypeContext,0) + def structType(self): + return self.getTypedRuleContext(FuncTestCaseParser.StructTypeContext,0) + + def getRuleIndex(self): return FuncTestCaseParser.RULE_parameterizedType @@ -6540,56 +7299,61 @@ def accept(self, visitor:ParseTreeVisitor): def parameterizedType(self): localctx = FuncTestCaseParser.ParameterizedTypeContext(self, self._ctx, self.state) - self.enterRule(localctx, 142, self.RULE_parameterizedType) + self.enterRule(localctx, 160, self.RULE_parameterizedType) try: - self.state = 682 + self.state = 791 self._errHandler.sync(self) token = self._input.LA(1) - if token in [73, 92]: + if token in [74, 93]: self.enterOuterAlt(localctx, 1) - self.state = 673 + self.state = 781 self.fixedCharType() pass - elif token in [74, 93]: + elif token in [75, 94]: self.enterOuterAlt(localctx, 2) - self.state = 674 + self.state = 782 self.varCharType() pass - elif token in [75, 94]: + elif token in [76, 95]: self.enterOuterAlt(localctx, 3) - self.state = 675 + self.state = 783 self.fixedBinaryType() pass - elif token in [69, 88]: + elif token in [70, 89]: self.enterOuterAlt(localctx, 4) - self.state = 676 + self.state = 784 self.decimalType() pass - elif token in [67, 87]: + elif token in [68, 88]: self.enterOuterAlt(localctx, 5) - self.state = 677 + self.state = 785 self.intervalDayType() pass - elif token in [70, 89]: + elif token in [71, 90]: self.enterOuterAlt(localctx, 6) - self.state = 678 + self.state = 786 self.precisionTimeType() pass - elif token in [71, 90]: + elif token in [72, 91]: self.enterOuterAlt(localctx, 7) - self.state = 679 + self.state = 787 self.precisionTimestampType() pass - elif token in [72, 91]: + elif token in [73, 92]: self.enterOuterAlt(localctx, 8) - self.state = 680 + self.state = 788 self.precisionTimestampTZType() pass - elif token in [52]: + elif token in [53]: self.enterOuterAlt(localctx, 9) - self.state = 681 + self.state = 789 self.funcType() pass + elif token in [77]: + self.enterOuterAlt(localctx, 10) + self.state = 790 + self.structType() + pass else: raise NoViableAltException(self) @@ -6602,6 +7366,103 @@ def parameterizedType(self): return localctx + class StructTypeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.isnull = None # Token + + def Struct(self): + return self.getToken(FuncTestCaseParser.Struct, 0) + + def OAngleBracket(self): + return self.getToken(FuncTestCaseParser.OAngleBracket, 0) + + def dataType(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(FuncTestCaseParser.DataTypeContext) + else: + return self.getTypedRuleContext(FuncTestCaseParser.DataTypeContext,i) + + + def CAngleBracket(self): + return self.getToken(FuncTestCaseParser.CAngleBracket, 0) + + def Comma(self, i:int=None): + if i is None: + return self.getTokens(FuncTestCaseParser.Comma) + else: + return self.getToken(FuncTestCaseParser.Comma, i) + + def QMark(self): + return self.getToken(FuncTestCaseParser.QMark, 0) + + def getRuleIndex(self): + return FuncTestCaseParser.RULE_structType + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStructType" ): + listener.enterStructType(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStructType" ): + listener.exitStructType(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitStructType" ): + return visitor.visitStructType(self) + else: + return visitor.visitChildren(self) + + + + + def structType(self): + + localctx = FuncTestCaseParser.StructTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 162, self.RULE_structType) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 793 + self.match(FuncTestCaseParser.Struct) + self.state = 795 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==117: + self.state = 794 + localctx.isnull = self.match(FuncTestCaseParser.QMark) + + + self.state = 797 + self.match(FuncTestCaseParser.OAngleBracket) + self.state = 798 + self.dataType() + self.state = 803 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==115: + self.state = 799 + self.match(FuncTestCaseParser.Comma) + self.state = 800 + self.dataType() + self.state = 805 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 806 + self.match(FuncTestCaseParser.CAngleBracket) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class NumericParameterContext(ParserRuleContext): __slots__ = 'parser' @@ -6647,11 +7508,11 @@ def accept(self, visitor:ParseTreeVisitor): def numericParameter(self): localctx = FuncTestCaseParser.NumericParameterContext(self, self._ctx, self.state) - self.enterRule(localctx, 144, self.RULE_numericParameter) + self.enterRule(localctx, 164, self.RULE_numericParameter) try: localctx = FuncTestCaseParser.IntegerLiteralContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 684 + self.state = 808 self.match(FuncTestCaseParser.IntegerLiteral) except RecognitionException as re: localctx.exception = re @@ -6698,13 +7559,13 @@ def accept(self, visitor:ParseTreeVisitor): def substraitError(self): localctx = FuncTestCaseParser.SubstraitErrorContext(self, self._ctx, self.state) - self.enterRule(localctx, 146, self.RULE_substraitError) + self.enterRule(localctx, 166, self.RULE_substraitError) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 686 + self.state = 810 _la = self._input.LA(1) - if not(_la==10 or _la==11): + if not(_la==11 or _la==12): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -6759,14 +7620,14 @@ def accept(self, visitor:ParseTreeVisitor): def funcOption(self): localctx = FuncTestCaseParser.FuncOptionContext(self, self._ctx, self.state) - self.enterRule(localctx, 148, self.RULE_funcOption) + self.enterRule(localctx, 168, self.RULE_funcOption) try: self.enterOuterAlt(localctx, 1) - self.state = 688 + self.state = 812 self.optionName() - self.state = 689 + self.state = 813 self.match(FuncTestCaseParser.Colon) - self.state = 690 + self.state = 814 self.optionValue() except RecognitionException as re: localctx.exception = re @@ -6822,13 +7683,13 @@ def accept(self, visitor:ParseTreeVisitor): def optionName(self): localctx = FuncTestCaseParser.OptionNameContext(self, self._ctx, self.state) - self.enterRule(localctx, 150, self.RULE_optionName) + self.enterRule(localctx, 170, self.RULE_optionName) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 692 + self.state = 816 _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 6303744) != 0) or _la==124): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 12607488) != 0) or _la==125): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -6905,13 +7766,13 @@ def accept(self, visitor:ParseTreeVisitor): def optionValue(self): localctx = FuncTestCaseParser.OptionValueContext(self, self._ctx, self.state) - self.enterRule(localctx, 152, self.RULE_optionValue) + self.enterRule(localctx, 172, self.RULE_optionValue) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 694 + self.state = 818 _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 17592330731520) != 0) or _la==124): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 35184661463040) != 0) or _la==125): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -6968,21 +7829,21 @@ def accept(self, visitor:ParseTreeVisitor): def funcOptions(self): localctx = FuncTestCaseParser.FuncOptionsContext(self, self._ctx, self.state) - self.enterRule(localctx, 154, self.RULE_funcOptions) + self.enterRule(localctx, 174, self.RULE_funcOptions) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 696 + self.state = 820 self.funcOption() - self.state = 701 + self.state = 825 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==114: - self.state = 697 + while _la==115: + self.state = 821 self.match(FuncTestCaseParser.Comma) - self.state = 698 + self.state = 822 self.funcOption() - self.state = 703 + self.state = 827 self._errHandler.sync(self) _la = self._input.LA(1) @@ -7034,13 +7895,13 @@ def accept(self, visitor:ParseTreeVisitor): def nonReserved(self): localctx = FuncTestCaseParser.NonReservedContext(self, self._ctx, self.state) - self.enterRule(localctx, 156, self.RULE_nonReserved) + self.enterRule(localctx, 176, self.RULE_nonReserved) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 704 + self.state = 828 _la = self._input.LA(1) - if not(_la==23 or _la==119 or _la==120): + if not(_la==24 or _la==120 or _la==121): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -7091,19 +7952,19 @@ def accept(self, visitor:ParseTreeVisitor): def identifier(self): localctx = FuncTestCaseParser.IdentifierContext(self, self._ctx, self.state) - self.enterRule(localctx, 158, self.RULE_identifier) + self.enterRule(localctx, 178, self.RULE_identifier) try: - self.state = 708 + self.state = 832 self._errHandler.sync(self) token = self._input.LA(1) - if token in [23, 119, 120]: + if token in [24, 120, 121]: self.enterOuterAlt(localctx, 1) - self.state = 706 + self.state = 830 self.nonReserved() pass - elif token in [124]: + elif token in [125]: self.enterOuterAlt(localctx, 2) - self.state = 707 + self.state = 831 self.match(FuncTestCaseParser.Identifier) pass else: diff --git a/tests/coverage/antlr_parser/FuncTestCaseParserListener.py b/tests/coverage/antlr_parser/FuncTestCaseParserListener.py index 7531b452a..31d16e413 100644 --- a/tests/coverage/antlr_parser/FuncTestCaseParserListener.py +++ b/tests/coverage/antlr_parser/FuncTestCaseParserListener.py @@ -18,21 +18,57 @@ def exitDoc(self, ctx:FuncTestCaseParser.DocContext): pass - # Enter a parse tree produced by FuncTestCaseParser#header. - def enterHeader(self, ctx:FuncTestCaseParser.HeaderContext): + # Enter a parse tree produced by FuncTestCaseParser#scalarDoc. + def enterScalarDoc(self, ctx:FuncTestCaseParser.ScalarDocContext): pass - # Exit a parse tree produced by FuncTestCaseParser#header. - def exitHeader(self, ctx:FuncTestCaseParser.HeaderContext): + # Exit a parse tree produced by FuncTestCaseParser#scalarDoc. + def exitScalarDoc(self, ctx:FuncTestCaseParser.ScalarDocContext): pass - # Enter a parse tree produced by FuncTestCaseParser#version. - def enterVersion(self, ctx:FuncTestCaseParser.VersionContext): + # Enter a parse tree produced by FuncTestCaseParser#aggregateDoc. + def enterAggregateDoc(self, ctx:FuncTestCaseParser.AggregateDocContext): pass - # Exit a parse tree produced by FuncTestCaseParser#version. - def exitVersion(self, ctx:FuncTestCaseParser.VersionContext): + # Exit a parse tree produced by FuncTestCaseParser#aggregateDoc. + def exitAggregateDoc(self, ctx:FuncTestCaseParser.AggregateDocContext): + pass + + + # Enter a parse tree produced by FuncTestCaseParser#tableDoc. + def enterTableDoc(self, ctx:FuncTestCaseParser.TableDocContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#tableDoc. + def exitTableDoc(self, ctx:FuncTestCaseParser.TableDocContext): + pass + + + # Enter a parse tree produced by FuncTestCaseParser#scalarHeader. + def enterScalarHeader(self, ctx:FuncTestCaseParser.ScalarHeaderContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#scalarHeader. + def exitScalarHeader(self, ctx:FuncTestCaseParser.ScalarHeaderContext): + pass + + + # Enter a parse tree produced by FuncTestCaseParser#aggregateHeader. + def enterAggregateHeader(self, ctx:FuncTestCaseParser.AggregateHeaderContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#aggregateHeader. + def exitAggregateHeader(self, ctx:FuncTestCaseParser.AggregateHeaderContext): + pass + + + # Enter a parse tree produced by FuncTestCaseParser#tableHeader. + def enterTableHeader(self, ctx:FuncTestCaseParser.TableHeaderContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#tableHeader. + def exitTableHeader(self, ctx:FuncTestCaseParser.TableHeaderContext): pass @@ -72,21 +108,30 @@ def exitTestCase(self, ctx:FuncTestCaseParser.TestCaseContext): pass - # Enter a parse tree produced by FuncTestCaseParser#scalarFuncTestGroup. - def enterScalarFuncTestGroup(self, ctx:FuncTestCaseParser.ScalarFuncTestGroupContext): + # Enter a parse tree produced by FuncTestCaseParser#scalarTestGroup. + def enterScalarTestGroup(self, ctx:FuncTestCaseParser.ScalarTestGroupContext): pass - # Exit a parse tree produced by FuncTestCaseParser#scalarFuncTestGroup. - def exitScalarFuncTestGroup(self, ctx:FuncTestCaseParser.ScalarFuncTestGroupContext): + # Exit a parse tree produced by FuncTestCaseParser#scalarTestGroup. + def exitScalarTestGroup(self, ctx:FuncTestCaseParser.ScalarTestGroupContext): pass - # Enter a parse tree produced by FuncTestCaseParser#aggregateFuncTestGroup. - def enterAggregateFuncTestGroup(self, ctx:FuncTestCaseParser.AggregateFuncTestGroupContext): + # Enter a parse tree produced by FuncTestCaseParser#aggregateTestGroup. + def enterAggregateTestGroup(self, ctx:FuncTestCaseParser.AggregateTestGroupContext): pass - # Exit a parse tree produced by FuncTestCaseParser#aggregateFuncTestGroup. - def exitAggregateFuncTestGroup(self, ctx:FuncTestCaseParser.AggregateFuncTestGroupContext): + # Exit a parse tree produced by FuncTestCaseParser#aggregateTestGroup. + def exitAggregateTestGroup(self, ctx:FuncTestCaseParser.AggregateTestGroupContext): + pass + + + # Enter a parse tree produced by FuncTestCaseParser#tableTestGroup. + def enterTableTestGroup(self, ctx:FuncTestCaseParser.TableTestGroupContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#tableTestGroup. + def exitTableTestGroup(self, ctx:FuncTestCaseParser.TableTestGroupContext): pass @@ -126,6 +171,33 @@ def exitAggFuncTestCase(self, ctx:FuncTestCaseParser.AggFuncTestCaseContext): pass + # Enter a parse tree produced by FuncTestCaseParser#tableFuncTestCase. + def enterTableFuncTestCase(self, ctx:FuncTestCaseParser.TableFuncTestCaseContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#tableFuncTestCase. + def exitTableFuncTestCase(self, ctx:FuncTestCaseParser.TableFuncTestCaseContext): + pass + + + # Enter a parse tree produced by FuncTestCaseParser#multiRowResult. + def enterMultiRowResult(self, ctx:FuncTestCaseParser.MultiRowResultContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#multiRowResult. + def exitMultiRowResult(self, ctx:FuncTestCaseParser.MultiRowResultContext): + pass + + + # Enter a parse tree produced by FuncTestCaseParser#rowTuple. + def enterRowTuple(self, ctx:FuncTestCaseParser.RowTupleContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#rowTuple. + def exitRowTuple(self, ctx:FuncTestCaseParser.RowTupleContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#multiArgAggregateFuncCall. def enterMultiArgAggregateFuncCall(self, ctx:FuncTestCaseParser.MultiArgAggregateFuncCallContext): pass @@ -801,6 +873,15 @@ def exitParameterizedType(self, ctx:FuncTestCaseParser.ParameterizedTypeContext) pass + # Enter a parse tree produced by FuncTestCaseParser#structType. + def enterStructType(self, ctx:FuncTestCaseParser.StructTypeContext): + pass + + # Exit a parse tree produced by FuncTestCaseParser#structType. + def exitStructType(self, ctx:FuncTestCaseParser.StructTypeContext): + pass + + # Enter a parse tree produced by FuncTestCaseParser#integerLiteral. def enterIntegerLiteral(self, ctx:FuncTestCaseParser.IntegerLiteralContext): pass diff --git a/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py b/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py index 5b759586e..048050210 100644 --- a/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py +++ b/tests/coverage/antlr_parser/FuncTestCaseParserVisitor.py @@ -15,13 +15,33 @@ def visitDoc(self, ctx:FuncTestCaseParser.DocContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#header. - def visitHeader(self, ctx:FuncTestCaseParser.HeaderContext): + # Visit a parse tree produced by FuncTestCaseParser#scalarDoc. + def visitScalarDoc(self, ctx:FuncTestCaseParser.ScalarDocContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#version. - def visitVersion(self, ctx:FuncTestCaseParser.VersionContext): + # Visit a parse tree produced by FuncTestCaseParser#aggregateDoc. + def visitAggregateDoc(self, ctx:FuncTestCaseParser.AggregateDocContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by FuncTestCaseParser#tableDoc. + def visitTableDoc(self, ctx:FuncTestCaseParser.TableDocContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by FuncTestCaseParser#scalarHeader. + def visitScalarHeader(self, ctx:FuncTestCaseParser.ScalarHeaderContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by FuncTestCaseParser#aggregateHeader. + def visitAggregateHeader(self, ctx:FuncTestCaseParser.AggregateHeaderContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by FuncTestCaseParser#tableHeader. + def visitTableHeader(self, ctx:FuncTestCaseParser.TableHeaderContext): return self.visitChildren(ctx) @@ -45,13 +65,18 @@ def visitTestCase(self, ctx:FuncTestCaseParser.TestCaseContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#scalarFuncTestGroup. - def visitScalarFuncTestGroup(self, ctx:FuncTestCaseParser.ScalarFuncTestGroupContext): + # Visit a parse tree produced by FuncTestCaseParser#scalarTestGroup. + def visitScalarTestGroup(self, ctx:FuncTestCaseParser.ScalarTestGroupContext): return self.visitChildren(ctx) - # Visit a parse tree produced by FuncTestCaseParser#aggregateFuncTestGroup. - def visitAggregateFuncTestGroup(self, ctx:FuncTestCaseParser.AggregateFuncTestGroupContext): + # Visit a parse tree produced by FuncTestCaseParser#aggregateTestGroup. + def visitAggregateTestGroup(self, ctx:FuncTestCaseParser.AggregateTestGroupContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by FuncTestCaseParser#tableTestGroup. + def visitTableTestGroup(self, ctx:FuncTestCaseParser.TableTestGroupContext): return self.visitChildren(ctx) @@ -75,6 +100,21 @@ def visitAggFuncTestCase(self, ctx:FuncTestCaseParser.AggFuncTestCaseContext): return self.visitChildren(ctx) + # Visit a parse tree produced by FuncTestCaseParser#tableFuncTestCase. + def visitTableFuncTestCase(self, ctx:FuncTestCaseParser.TableFuncTestCaseContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by FuncTestCaseParser#multiRowResult. + def visitMultiRowResult(self, ctx:FuncTestCaseParser.MultiRowResultContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by FuncTestCaseParser#rowTuple. + def visitRowTuple(self, ctx:FuncTestCaseParser.RowTupleContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#multiArgAggregateFuncCall. def visitMultiArgAggregateFuncCall(self, ctx:FuncTestCaseParser.MultiArgAggregateFuncCallContext): return self.visitChildren(ctx) @@ -450,6 +490,11 @@ def visitParameterizedType(self, ctx:FuncTestCaseParser.ParameterizedTypeContext return self.visitChildren(ctx) + # Visit a parse tree produced by FuncTestCaseParser#structType. + def visitStructType(self, ctx:FuncTestCaseParser.StructTypeContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by FuncTestCaseParser#integerLiteral. def visitIntegerLiteral(self, ctx:FuncTestCaseParser.IntegerLiteralContext): return self.visitChildren(ctx) diff --git a/tests/coverage/extensions.py b/tests/coverage/extensions.py index 208be9b5e..df220acd2 100644 --- a/tests/coverage/extensions.py +++ b/tests/coverage/extensions.py @@ -75,6 +75,9 @@ def get_short_type(long_type): short_type = type_to_short_type.get(long_type, None) if short_type is None: + # For struct types, preserve the full parameterized type + if long_type.startswith("struct<"): + return long_type # remove the type parameters and try again if "<" in long_type: long_type = long_type[: long_type.find("<")].rstrip("?") @@ -157,6 +160,7 @@ def read_substrait_extensions(dir_path: str): scalar_functions = {} aggregate_functions = {} window_functions = {} + table_functions = {} dependencies = {} # convert yaml file to a python dictionary for extension in extensions: @@ -194,9 +198,21 @@ def read_substrait_extensions(dir_path: str): extension, uri, ) + if "table_functions" in data: + Extension.add_functions_to_map( + data["table_functions"], + table_functions, + suffix, + extension, + uri, + ) return FunctionRegistry( - scalar_functions, aggregate_functions, window_functions, dependencies + scalar_functions, + aggregate_functions, + window_functions, + table_functions, + dependencies, ) @@ -204,6 +220,7 @@ class FunctionType: SCALAR = 1 AGGREGATE = 2 WINDOW = 3 + TABLE = 4 class FunctionVariant: @@ -243,18 +260,26 @@ class FunctionRegistry: scalar_functions = dict() aggregate_functions = dict() window_functions = dict() + table_functions = dict() extensions = set() def __init__( - self, scalar_functions, aggregate_functions, window_functions, dependencies + self, + scalar_functions, + aggregate_functions, + window_functions, + table_functions, + dependencies, ): self.dependencies = dependencies self.scalar_functions = scalar_functions self.aggregate_functions = aggregate_functions self.window_functions = window_functions + self.table_functions = table_functions self.add_functions(scalar_functions, FunctionType.SCALAR) self.add_functions(aggregate_functions, FunctionType.AGGREGATE) self.add_functions(window_functions, FunctionType.WINDOW) + self.add_functions(table_functions, FunctionType.TABLE) def add_functions(self, functions, func_type): for func in functions.values(): @@ -281,6 +306,11 @@ def is_type_any(func_arg_type): @staticmethod def is_same_type(func_arg_type, arg_type): arg_type_base = arg_type.split("<")[0] + func_arg_type_base = func_arg_type.split("<")[0] + + # If base types match, that's good enough for now + if func_arg_type_base == arg_type_base: + return True if func_arg_type == arg_type_base: return True return FunctionRegistry.is_type_any(func_arg_type) diff --git a/tests/coverage/nodes.py b/tests/coverage/nodes.py index 0694d235b..e13a94a54 100644 --- a/tests/coverage/nodes.py +++ b/tests/coverage/nodes.py @@ -28,6 +28,22 @@ def get_base_type(self): return type_str +@dataclass +class MultiRowResult: + """Represents the result of a table function: a list of rows (tuples).""" + + rows: List[List] # List of rows, each row is a list of values + type: str # The struct type, e.g., "struct" or "struct" + + def get_base_type(self): + type_str = self.type + if "<" in type_str: + type_str = type_str[: type_str.find("<")] + if type_str.endswith("?"): + return type_str[:-1] + return type_str + + @dataclass class AggregateArgument: column_name: str @@ -44,11 +60,11 @@ class TestCase: options: dict rows: List[List] | None args: List[CaseLiteral] | List[AggregateArgument] - result: CaseLiteral | str | SubstraitError + result: CaseLiteral | str | SubstraitError | MultiRowResult comment: str def get_return_type(self): - if isinstance(self.result, CaseLiteral): + if isinstance(self.result, (CaseLiteral, MultiRowResult)): return self.result.type return self.result diff --git a/tests/coverage/visitor.py b/tests/coverage/visitor.py index 3cb17cf75..f3d76eb67 100644 --- a/tests/coverage/visitor.py +++ b/tests/coverage/visitor.py @@ -10,6 +10,7 @@ TestCase, CaseLiteral, SubstraitError, + MultiRowResult, ) @@ -18,26 +19,69 @@ def __init__(self, file_path): self.file_path = file_path def visitDoc(self, ctx: FuncTestCaseParser.DocContext): - version, include, dependencies = self.visitHeader(ctx.header()) + # Delegate to the specific doc type visitor + if ctx.scalarDoc() is not None: + return self.visitScalarDoc(ctx.scalarDoc()) + elif ctx.aggregateDoc() is not None: + return self.visitAggregateDoc(ctx.aggregateDoc()) + elif ctx.tableDoc() is not None: + return self.visitTableDoc(ctx.tableDoc()) + + def visitScalarDoc(self, ctx: FuncTestCaseParser.ScalarDocContext): + version, include, dependencies = self.visitScalarHeader(ctx.scalarHeader()) testcases = [] - for group in ctx.testGroup(): - _, group_tests = self.visit(group) + for group in ctx.scalarTestGroup(): + _, group_tests = self.visitScalarTestGroup(group) for test_case in group_tests: test_case.base_uri = include testcases.extend(group_tests) + return TestFile(self.file_path, version, include, dependencies, testcases) + + def visitAggregateDoc(self, ctx: FuncTestCaseParser.AggregateDocContext): + version, include, dependencies = self.visitAggregateHeader( + ctx.aggregateHeader() + ) + testcases = [] + for group in ctx.aggregateTestGroup(): + _, group_tests = self.visitAggregateTestGroup(group) + for test_case in group_tests: + test_case.base_uri = include + testcases.extend(group_tests) + return TestFile(self.file_path, version, include, dependencies, testcases) + def visitTableDoc(self, ctx: FuncTestCaseParser.TableDocContext): + version, include, dependencies = self.visitTableHeader(ctx.tableHeader()) + testcases = [] + for group in ctx.tableTestGroup(): + _, group_tests = self.visitTableTestGroup(group) + for test_case in group_tests: + test_case.base_uri = include + testcases.extend(group_tests) return TestFile(self.file_path, version, include, dependencies, testcases) - def visitHeader(self, ctx: FuncTestCaseParser.HeaderContext): - version = self.visitVersion(ctx.version()) + def visitScalarHeader(self, ctx: FuncTestCaseParser.ScalarHeaderContext): + version = ctx.FormatVersion().getText() include = self.visitInclude(ctx.include()) dependencies = [] for dependency_ctx in ctx.dependency(): dependencies.extend(self.visitDependency(dependency_ctx)) return version, include, dependencies - def visitVersion(self, ctx: FuncTestCaseParser.VersionContext): - return ctx.FormatVersion().getText() + def visitAggregateHeader(self, ctx: FuncTestCaseParser.AggregateHeaderContext): + version = ctx.FormatVersion().getText() + include = self.visitInclude(ctx.include()) + dependencies = [] + for dependency_ctx in ctx.dependency(): + dependencies.extend(self.visitDependency(dependency_ctx)) + return version, include, dependencies + + def visitTableHeader(self, ctx: FuncTestCaseParser.TableHeaderContext): + version = ctx.FormatVersion().getText() + include = self.visitInclude(ctx.include()) + dependencies = [] + for dependency_ctx in ctx.dependency(): + dependencies.extend(self.visitDependency(dependency_ctx)) + return version, include, dependencies def visitInclude(self, ctx: FuncTestCaseParser.IncludeContext): # TODO handle multiple includes @@ -55,9 +99,7 @@ def visitTestGroupDescription( else: return CaseGroup("", "") - def visitScalarFuncTestGroup( - self, ctx: FuncTestCaseParser.ScalarFuncTestGroupContext - ): + def visitScalarTestGroup(self, ctx: FuncTestCaseParser.ScalarTestGroupContext): group = self.visitTestGroupDescription(ctx.testGroupDescription()) test_cases = [] for test_case in ctx.testCase(): @@ -66,8 +108,8 @@ def visitScalarFuncTestGroup( test_cases.append(testcase) return group, test_cases - def visitAggregateFuncTestGroup( - self, ctx: FuncTestCaseParser.AggregateFuncTestGroupContext + def visitAggregateTestGroup( + self, ctx: FuncTestCaseParser.AggregateTestGroupContext ): group = self.visitTestGroupDescription(ctx.testGroupDescription()) test_cases = [] @@ -77,6 +119,15 @@ def visitAggregateFuncTestGroup( test_cases.append(testcase) return group, test_cases + def visitTableTestGroup(self, ctx: FuncTestCaseParser.TableTestGroupContext): + group = self.visitTestGroupDescription(ctx.testGroupDescription()) + test_cases = [] + for test_case in ctx.tableFuncTestCase(): + testcase = self.visitTableFuncTestCase(test_case) + testcase.group = group + test_cases.append(testcase) + return group, test_cases + def visitTestCase(self, ctx: FuncTestCaseParser.TestCaseContext): # TODO Implement this method args = self.visitArguments(ctx.arguments()) @@ -102,6 +153,23 @@ def visitAggFuncTestCase(self, ctx: FuncTestCaseParser.AggFuncTestCaseContext): testcase.options = self.visitFuncOptions(ctx.funcOptions()) return testcase + def visitTableFuncTestCase(self, ctx: FuncTestCaseParser.TableFuncTestCaseContext): + args = self.visitArguments(ctx.arguments()) + result = self.visitMultiRowResult(ctx.multiRowResult()) + options = dict() + if ctx.funcOptions() is not None: + options = self.visitFuncOptions(ctx.funcOptions()) + return TestCase( + func_name=ctx.identifier().getText(), + base_uri="", + group=None, + options=options, + rows=None, + args=args, + result=result, + comment="", + ) + def visitSingleArgAggregateFuncCall( self, ctx: FuncTestCaseParser.SingleArgAggregateFuncCallContext ): @@ -393,6 +461,26 @@ def visitSubstraitError(self, ctx: FuncTestCaseParser.SubstraitErrorContext): return SubstraitError("undefined") return SubstraitError("unknown_error") + def visitMultiRowResult(self, ctx: FuncTestCaseParser.MultiRowResultContext): + """Visit multi-row result: [(val1), (val2), ...] :: struct.""" + rows = [] + for row_tuple_ctx in ctx.rowTuple(): + rows.append(self.visitRowTuple(row_tuple_ctx)) + struct_type = ctx.structType().getText() + return MultiRowResult(rows=rows, type=struct_type) + + def visitRowTuple(self, ctx: FuncTestCaseParser.RowTupleContext): + """Visit a single row tuple: (val1, val2, ...).""" + values = [] + for literal in ctx.literal(): + value, _ = self.visitLiteral(literal) + values.append(value) + return values + + def visitDataType(self, ctx): + """Visit a dataType context and return its text representation.""" + return ctx.getText() + class ParseError(Exception): def __init__(self, message="Parsing error occurred"): diff --git a/text/simple_extensions_schema.yaml b/text/simple_extensions_schema.yaml index a7f5b6faa..ac4e7ce01 100644 --- a/text/simple_extensions_schema.yaml +++ b/text/simple_extensions_schema.yaml @@ -68,6 +68,10 @@ properties: type: array items: $ref: "#/$defs/windowFunction" + table_functions: + type: array + items: + $ref: "#/$defs/tableFunction" $defs: type: @@ -316,3 +320,37 @@ $defs: window_type: type: string enum: [STREAMING, PARTITION] + + tableFunction: + type: object + additionalProperties: false + required: [name, impls] + properties: + name: + type: string + description: + type: string + impls: + type: array + minItems: 1 + items: + type: object + additionalProperties: false + required: [return] + properties: + args: + $ref: "#/$defs/arguments" + options: + $ref: "#/$defs/options" + variadic: + $ref: "#/$defs/variadicBehavior" + sessionDependent: + $ref: "#/$defs/sessionDependent" + deterministic: + $ref: "#/$defs/deterministic" + nullability: + $ref: "#/$defs/nullabilityHandling" + return: + $ref: "#/$defs/returnValue" + implementation: + $ref: "#/$defs/implementation"