diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6dd4da6..2a5d3ff 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,7 +14,7 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "uv venv --clear && uv sync --extra test", + "postCreateCommand": "uv venv --clear && uv sync --extra test --extra gen_proto", // Configure tool-specific properties. "customizations": { diff --git a/.github/workflows/codegen-check.yml b/.github/workflows/codegen-check.yml new file mode 100644 index 0000000..33bebbc --- /dev/null +++ b/.github/workflows/codegen-check.yml @@ -0,0 +1,44 @@ +name: Code Generation Check + +on: + pull_request: + +permissions: + contents: read + +jobs: + codegen-check: + name: Verify Code Generation + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + submodules: recursive + + - name: Run code generation in devcontainer + uses: devcontainers/ci@v0.3 + with: + runCmd: | + # Ensure dependencies are installed + uv sync --extra test --extra gen_proto + # Run all code generation steps + make antlr + ./gen_proto.sh + make codegen-extensions + + - name: Check for uncommitted changes + run: | + # Check for diffs, ignoring timestamp lines + if ! git diff --quiet --exit-code src/substrait/gen/; then + echo "Code generation produced changes. Generated code is out of sync!" + echo "" + git diff src/substrait/gen/ + echo "" + echo "To fix this, run:" + echo " make antlr" + echo " ./gen_proto.sh" + echo " make codegen-extensions" + echo "Then commit the changes." + exit 1 + fi diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml new file mode 100644 index 0000000..bc5822d --- /dev/null +++ b/.github/workflows/example.yml @@ -0,0 +1,36 @@ +name: Run examples + +on: + pull_request: + push: + branches: [ main ] + +permissions: + contents: read + +jobs: + example: + name: Run ${{ matrix.example }} + runs-on: ubuntu-latest + strategy: + matrix: + example: + - builder_example.py + - duckdb_example.py + - adbc_example.py + - pyarrow_example.py + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + submodules: recursive + - name: Install uv with python + uses: astral-sh/setup-uv@v7 + with: + python-version: "3.10" + - name: Install package dependencies + run: | + uv sync --frozen --extra extensions + - name: Run ${{ matrix.example }} + run: | + uv run examples/${{ matrix.example }} diff --git a/Makefile b/Makefile index 54782b1..4e95eb6 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,8 @@ codegen-extensions: --input-file-type jsonschema \ --input third_party/substrait/text/simple_extensions_schema.yaml \ --output src/substrait/gen/json/simple_extensions.py \ - --output-model-type dataclasses.dataclass + --output-model-type dataclasses.dataclass \ + --disable-timestamp lint: uvx ruff@0.11.11 check diff --git a/examples/adbc_example.py b/examples/adbc_example.py index 10994f6..532033a 100644 --- a/examples/adbc_example.py +++ b/examples/adbc_example.py @@ -45,7 +45,7 @@ def read_adbc_named_table(name: str, conn): table = filter( table, expression=scalar_function( - "functions_comparison.yaml", + "extension:io.substrait:functions_comparison", "gte", expressions=[column("ints"), literal(3, i64())], ), diff --git a/examples/builder_example.py b/examples/builder_example.py index ced6e7e..b4f0cf3 100644 --- a/examples/builder_example.py +++ b/examples/builder_example.py @@ -21,7 +21,7 @@ def basic_example(): ns = named_struct( names=["id", "is_applicable"], - struct=struct(types=[i64(nullable=False), boolean()]), + struct=struct(types=[i64(nullable=False), boolean()], nullable=False), ) table = read_named_table("example_table", ns) @@ -29,9 +29,9 @@ def basic_example(): table = filter( table, expression=scalar_function( - "functions_comparison.yaml", + "extension:io.substrait:functions_comparison", "lt", - expressions=[column("id"), literal(100, i64())], + expressions=[column("id"), literal(100, i64(nullable=False))], ), ) table = project(table, expressions=[column("id")]) @@ -41,14 +41,15 @@ def basic_example(): """ extension_uris { - extension_uri_anchor: 13 - uri: "functions_comparison.yaml" + extension_uri_anchor: 2 + uri: "https://github.com/substrait-io/substrait/blob/main/extensions/functions_comparison.yaml" } extensions { extension_function { - extension_uri_reference: 13 - function_anchor: 495 - name: "lt" + extension_uri_reference: 2 + function_anchor: 124 + name: "lt:any_any" + extension_urn_reference: 2 } } relations { @@ -84,7 +85,7 @@ def basic_example(): nullability: NULLABILITY_NULLABLE } } - nullability: NULLABILITY_NULLABLE + nullability: NULLABILITY_REQUIRED } } named_table { @@ -107,10 +108,10 @@ def basic_example(): } condition { scalar_function { - function_reference: 495 + function_reference: 124 output_type { bool { - nullability: NULLABILITY_NULLABLE + nullability: NULLABILITY_REQUIRED } } arguments { @@ -129,7 +130,6 @@ def basic_example(): value { literal { i64: 100 - nullable: true } } } @@ -152,7 +152,11 @@ def basic_example(): names: "id" } } - """ + extension_urns { + extension_urn_anchor: 2 + urn: "extension:io.substrait:functions_comparison" + } + """ def advanced_example(): @@ -160,7 +164,7 @@ def advanced_example(): # Simple example (original) ns = named_struct( names=["id", "is_applicable"], - struct=struct(types=[i64(nullable=False), boolean()]), + struct=struct(types=[i64(nullable=False), boolean()], nullable=False), ) table = read_named_table("example_table", ns) @@ -168,9 +172,9 @@ def advanced_example(): table = filter( table, expression=scalar_function( - "functions_comparison.yaml", + "extension:io.substrait:functions_comparison", "lt", - expressions=[column("id"), literal(100, i64())], + expressions=[column("id"), literal(100, i64(nullable=False))], ), ) table = project(table, expressions=[column("id")]) @@ -190,7 +194,8 @@ def advanced_example(): string(nullable=False), # name i64(nullable=False), # age fp64(nullable=False), # salary - ] + ], + nullable=False, ), ) @@ -200,7 +205,7 @@ def advanced_example(): adult_users = filter( users, expression=scalar_function( - "functions_comparison.yaml", + "extension:io.substrait:functions_comparison", "gt", expressions=[column("age"), literal(25, i64())], ), @@ -216,7 +221,7 @@ def advanced_example(): column("salary"), # Add a calculated field (this would show function options if available) scalar_function( - "functions_arithmetic.yaml", + "extension:io.substrait:functions_arithmetic", "multiply", expressions=[column("salary"), literal(1.1, fp64())], alias="salary_with_bonus", @@ -238,7 +243,8 @@ def advanced_example(): i64(nullable=False), # order_id fp64(nullable=False), # amount string(nullable=False), # status - ] + ], + nullable=False, ), ) @@ -248,7 +254,7 @@ def advanced_example(): high_value_orders = filter( orders, expression=scalar_function( - "functions_comparison.yaml", + "extension:io.substrait:functions_comparison", "gt", expressions=[column("amount"), literal(50.0, fp64())], ), @@ -280,16 +286,16 @@ def expression_only_example(): print("=== Expression-Only Example ===") # Show complex expression structure complex_expr = scalar_function( - "functions_arithmetic.yaml", + "extension:io.substrait:functions_arithmetic", "multiply", expressions=[ scalar_function( - "functions_arithmetic.yaml", + "extension:io.substrait:functions_arithmetic", "add", expressions=[ column("base_salary"), scalar_function( - "functions_arithmetic.yaml", + "extension:io.substrait:functions_arithmetic", "multiply", expressions=[ column("base_salary"), @@ -299,7 +305,7 @@ def expression_only_example(): ], ), scalar_function( - "functions_arithmetic.yaml", + "extension:io.substrait:functions_arithmetic", "subtract", expressions=[ literal(1.0, fp64()), @@ -312,7 +318,8 @@ def expression_only_example(): print("Complex salary calculation expression:") # Create a simple plan to wrap the expression dummy_schema = named_struct( - names=["base_salary"], struct=struct(types=[fp64(nullable=False)]) + names=["base_salary"], + struct=struct(types=[fp64(nullable=False)], nullable=False), ) dummy_table = read_named_table("dummy", dummy_schema) dummy_plan = project(dummy_table, expressions=[complex_expr]) diff --git a/examples/duckdb_example.py b/examples/duckdb_example.py index 8aacaec..ccd8172 100644 --- a/examples/duckdb_example.py +++ b/examples/duckdb_example.py @@ -13,7 +13,6 @@ from substrait.builders.extended_expression import column, scalar_function, literal from substrait.builders.type import i32 from substrait.extension_registry import ExtensionRegistry -from substrait.json import dump_json import pyarrow.substrait as pa_substrait try: @@ -42,7 +41,7 @@ def read_duckdb_named_table(name: str, conn): table = filter( table, expression=scalar_function( - "functions_comparison.yaml", + "extension:io.substrait:functions_comparison", "equal", expressions=[column("c_nationkey"), literal(3, i32())], ), @@ -50,6 +49,5 @@ def read_duckdb_named_table(name: str, conn): table = project( table, expressions=[column("c_name"), column("c_address"), column("c_nationkey")] ) - -sql = f"CALL from_substrait_json('{dump_json(table(registry))}')" -print(duckdb.sql(sql)) +sql = "CALL from_substrait(?)" +print(duckdb.sql(sql, params=[table(registry).SerializeToString()])) diff --git a/gen_proto.sh b/gen_proto.sh index e7e846b..e047ad3 100755 --- a/gen_proto.sh +++ b/gen_proto.sh @@ -18,7 +18,7 @@ rm -rf "$dest_dir/proto" # Generate the new python protobuf files buf generate -protol --in-place --create-package --python-out "$dest_dir" buf +uv run protol --in-place --create-package --python-out "$dest_dir" buf # Remove the old extension files rm -rf "$extension_dir" diff --git a/src/substrait/__init__.py b/src/substrait/__init__.py index 26ec2ec..5d1a625 100644 --- a/src/substrait/__init__.py +++ b/src/substrait/__init__.py @@ -3,6 +3,6 @@ except ImportError: pass -__substrait_version__ = "0.74.0" -__substrait_hash__ = "793c64b" +__substrait_version__ = "0.77.0" +__substrait_hash__ = "3c25b1b" __minimum_substrait_version__ = "0.30.0" diff --git a/src/substrait/bimap.py b/src/substrait/bimap.py new file mode 100644 index 0000000..7bf0c0a --- /dev/null +++ b/src/substrait/bimap.py @@ -0,0 +1,102 @@ +""" +Bidirectional map for URI <-> URN conversion during the migration period. + +This module provides a UriUrnBiDiMap class that maintains a bidirectional mapping +between URIs and URNs. + +NOTE: This file is temporary and can be removed once the URI -> URN migration +is complete across all Substrait implementations. At that point, only URN-based +extension references will be used. +""" + +from typing import Optional + + +class UriUrnBiDiMap: + """Bidirectional map for URI <-> URN mappings. + + Maintains two internal dictionaries to enable O(1) lookups in both directions. + Enforces that each URI maps to exactly one URN and vice versa. + """ + + def __init__(self): + self._uri_to_urn: dict[str, str] = {} + self._urn_to_uri: dict[str, str] = {} + + def put(self, uri: str, urn: str) -> None: + """Add a bidirectional URI <-> URN mapping. + + Args: + uri: The extension URI (e.g., "https://github.com/.../functions_arithmetic.yaml") + urn: The extension URN (e.g., "extension:io.substrait:functions_arithmetic") + + Raises: + ValueError: If the URI or URN already exists with a different mapping + """ + # Check for conflicts + if self.contains_uri(uri): + existing_urn = self.get_urn(uri) + if existing_urn != urn: + raise ValueError( + f"URI '{uri}' is already mapped to URN '{existing_urn}', " + f"cannot remap to '{urn}'" + ) + # Already have this exact mapping, nothing to do + return + + if self.contains_urn(urn): + existing_uri = self.get_uri(urn) + if existing_uri != uri: + raise ValueError( + f"URN '{urn}' is already mapped to URI '{existing_uri}', " + f"cannot remap to '{uri}'" + ) + # Already have this exact mapping, nothing to do + return + + self._uri_to_urn[uri] = urn + self._urn_to_uri[urn] = uri + + def get_urn(self, uri: str) -> Optional[str]: + """Convert a URI to its corresponding URN. + + Args: + uri: The extension URI to look up + + Returns: + The corresponding URN, or None if the URI is not in the map + """ + return self._uri_to_urn.get(uri) + + def get_uri(self, urn: str) -> Optional[str]: + """Convert a URN to its corresponding URI. + + Args: + urn: The extension URN to look up + + Returns: + The corresponding URI, or None if the URN is not in the map + """ + return self._urn_to_uri.get(urn) + + def contains_uri(self, uri: str) -> bool: + """Check if a URI exists in the map. + + Args: + uri: The URI to check + + Returns: + True if the URI is in the map, False otherwise + """ + return uri in self._uri_to_urn + + def contains_urn(self, urn: str) -> bool: + """Check if a URN exists in the map. + + Args: + urn: The URN to check + + Returns: + True if the URN is in the map, False otherwise + """ + return urn in self._urn_to_uri diff --git a/src/substrait/builders/extended_expression.py b/src/substrait/builders/extended_expression.py index 98ac445..abda416 100644 --- a/src/substrait/builders/extended_expression.py +++ b/src/substrait/builders/extended_expression.py @@ -7,6 +7,7 @@ from substrait.extension_registry import ExtensionRegistry from substrait.utils import ( type_num_names, + merge_extension_urns, merge_extension_uris, merge_extension_declarations, ) @@ -204,7 +205,7 @@ def resolve( def scalar_function( - uri: str, + urn: str, function: str, expressions: Iterable[ExtendedExpressionOrUnbound], alias: Union[Iterable[str], str] = None, @@ -224,27 +225,44 @@ def resolve( signature = [typ for es in expression_schemas for typ in es.types] - func = registry.lookup_function(uri, function, signature) + func = registry.lookup_function(urn, function, signature) if not func: raise Exception(f"Unknown function {function} for {signature}") - func_extension_uris = [ - ste.SimpleExtensionURI( - extension_uri_anchor=registry.lookup_uri(uri), uri=uri + func_extension_urns = [ + ste.SimpleExtensionURN( + extension_urn_anchor=registry.lookup_urn(urn), urn=urn ) ] + # Create URI extension for backwards compatibility during URI -> URN migration + uri = registry._uri_urn_bimap.get_uri(urn) + func_extension_uris = [] + if uri: + uri_anchor = registry.lookup_uri_anchor(uri) + if uri_anchor: + func_extension_uris = [ + ste.SimpleExtensionURI(extension_uri_anchor=uri_anchor, uri=uri) + ] + func_extensions = [ ste.SimpleExtensionDeclaration( extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( - extension_uri_reference=registry.lookup_uri(uri), + extension_urn_reference=registry.lookup_urn(urn), + extension_uri_reference=registry.lookup_uri_anchor(uri) + if uri + else 0, function_anchor=func[0].anchor, name=str(func[0]), ) ) ] + extension_urns = merge_extension_urns( + func_extension_urns, *[b.extension_urns for b in bound_expressions] + ) + extension_uris = merge_extension_uris( func_extension_uris, *[b.extension_uris for b in bound_expressions] ) @@ -276,6 +294,7 @@ def resolve( ) ], base_schema=base_schema, + extension_urns=extension_urns, extension_uris=extension_uris, extensions=extensions, ) @@ -284,7 +303,7 @@ def resolve( def aggregate_function( - uri: str, + urn: str, function: str, expressions: Iterable[ExtendedExpressionOrUnbound], alias: Union[Iterable[str], str] = None, @@ -304,27 +323,44 @@ def resolve( signature = [typ for es in expression_schemas for typ in es.types] - func = registry.lookup_function(uri, function, signature) + func = registry.lookup_function(urn, function, signature) if not func: raise Exception(f"Unknown function {function} for {signature}") - func_extension_uris = [ - ste.SimpleExtensionURI( - extension_uri_anchor=registry.lookup_uri(uri), uri=uri + func_extension_urns = [ + ste.SimpleExtensionURN( + extension_urn_anchor=registry.lookup_urn(urn), urn=urn ) ] + # Create URI extension for backwards compatibility during URI -> URN migration + uri = registry._uri_urn_bimap.get_uri(urn) + func_extension_uris = [] + if uri: + uri_anchor = registry.lookup_uri_anchor(uri) + if uri_anchor: + func_extension_uris = [ + ste.SimpleExtensionURI(extension_uri_anchor=uri_anchor, uri=uri) + ] + func_extensions = [ ste.SimpleExtensionDeclaration( extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( - extension_uri_reference=registry.lookup_uri(uri), + extension_urn_reference=registry.lookup_urn(urn), + extension_uri_reference=registry.lookup_uri_anchor(uri) + if uri + else 0, function_anchor=func[0].anchor, name=str(func[0]), ) ) ] + extension_urns = merge_extension_urns( + func_extension_urns, *[b.extension_urns for b in bound_expressions] + ) + extension_uris = merge_extension_uris( func_extension_uris, *[b.extension_uris for b in bound_expressions] ) @@ -352,6 +388,7 @@ def resolve( ) ], base_schema=base_schema, + extension_urns=extension_urns, extension_uris=extension_uris, extensions=extensions, ) @@ -361,7 +398,7 @@ def resolve( # TODO bounds, sorts def window_function( - uri: str, + urn: str, function: str, expressions: Iterable[ExtendedExpressionOrUnbound], partitions: Iterable[ExtendedExpressionOrUnbound] = [], @@ -386,27 +423,46 @@ def resolve( signature = [typ for es in expression_schemas for typ in es.types] - func = registry.lookup_function(uri, function, signature) + func = registry.lookup_function(urn, function, signature) if not func: raise Exception(f"Unknown function {function} for {signature}") - func_extension_uris = [ - ste.SimpleExtensionURI( - extension_uri_anchor=registry.lookup_uri(uri), uri=uri + func_extension_urns = [ + ste.SimpleExtensionURN( + extension_urn_anchor=registry.lookup_urn(urn), urn=urn ) ] + # Create URI extension for backwards compatibility during URI -> URN migration + uri = registry._uri_urn_bimap.get_uri(urn) + func_extension_uris = [] + if uri: + uri_anchor = registry.lookup_uri_anchor(uri) + if uri_anchor: + func_extension_uris = [ + ste.SimpleExtensionURI(extension_uri_anchor=uri_anchor, uri=uri) + ] + func_extensions = [ ste.SimpleExtensionDeclaration( extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( - extension_uri_reference=registry.lookup_uri(uri), + extension_urn_reference=registry.lookup_urn(urn), + extension_uri_reference=registry.lookup_uri_anchor(uri) + if uri + else 0, function_anchor=func[0].anchor, name=str(func[0]), ) ) ] + extension_urns = merge_extension_urns( + func_extension_urns, + *[b.extension_urns for b in bound_expressions], + *[b.extension_urns for b in bound_partitions], + ) + extension_uris = merge_extension_uris( func_extension_uris, *[b.extension_uris for b in bound_expressions], @@ -445,6 +501,7 @@ def resolve( ) ], base_schema=base_schema, + extension_urns=extension_urns, extension_uris=extension_uris, extensions=extensions, ) @@ -478,6 +535,12 @@ def resolve( bound_else.extension_uris, ) + extension_urns = merge_extension_urns( + *[b[0].extension_urns for b in bound_ifs], + *[b[1].extension_urns for b in bound_ifs], + bound_else.extension_urns, + ) + extensions = merge_extension_declarations( *[b[0].extensions for b in bound_ifs], *[b[1].extensions for b in bound_ifs], @@ -524,6 +587,7 @@ def resolve( ], base_schema=base_schema, extension_uris=extension_uris, + extension_urns=extension_urns, extensions=extensions, ) @@ -556,6 +620,12 @@ def resolve( bound_else.extension_uris, ) + extension_urns = merge_extension_urns( + bound_match.extension_urns, + *[b.extension_urns for _, b in bound_ifs], + bound_else.extension_urns, + ) + extensions = merge_extension_declarations( bound_match.extensions, *[b.extensions for _, b in bound_ifs], @@ -584,6 +654,7 @@ def resolve( ) ], base_schema=base_schema, + extension_urns=extension_urns, extension_uris=extension_uris, extensions=extensions, ) @@ -606,6 +677,10 @@ def resolve( bound_value.extension_uris, *[b.extension_uris for b in bound_options] ) + extension_urns = merge_extension_urns( + bound_value.extension_urns, *[b.extension_urns for b in bound_options] + ) + extensions = merge_extension_declarations( bound_value.extensions, *[b.extensions for b in bound_options] ) @@ -627,6 +702,7 @@ def resolve( ) ], base_schema=base_schema, + extension_urns=extension_urns, extension_uris=extension_uris, extensions=extensions, ) @@ -653,7 +729,12 @@ def resolve( *[e.extension_uris for b in bound_options for e in b], ) - extensions = merge_extension_uris( + extension_urns = merge_extension_urns( + *[b.extension_urns for b in bound_value], + *[e.extension_urns for b in bound_options for e in b], + ) + + extensions = merge_extension_declarations( *[b.extensions for b in bound_value], *[e.extensions for b in bound_options for e in b], ) @@ -678,6 +759,7 @@ def resolve( ) ], base_schema=base_schema, + extension_urns=extension_urns, extension_uris=extension_uris, extensions=extensions, ) @@ -707,6 +789,7 @@ def resolve( ) ], base_schema=base_schema, + extension_urns=bound_input.extension_urns, extension_uris=bound_input.extension_uris, extensions=bound_input.extensions, ) diff --git a/src/substrait/builders/plan.py b/src/substrait/builders/plan.py index 9f852eb..a4a2180 100644 --- a/src/substrait/builders/plan.py +++ b/src/substrait/builders/plan.py @@ -18,7 +18,11 @@ resolve_expression, ) from substrait.type_inference import infer_plan_schema -from substrait.utils import merge_extension_declarations, merge_extension_uris +from substrait.utils import ( + merge_extension_declarations, + merge_extension_urns, + merge_extension_uris, +) UnboundPlan = Callable[[ExtensionRegistry], stp.Plan] @@ -26,8 +30,14 @@ def _merge_extensions(*objs): + """Merge extension URIs, URNs, and declarations from multiple plan/expression objects. + + During the URI -> URN migration period, we maintain both URI and URN references + for backwards compatibility. + """ return { "extension_uris": merge_extension_uris(*[b.extension_uris for b in objs if b]), + "extension_urns": merge_extension_urns(*[b.extension_urns for b in objs if b]), "extensions": merge_extension_declarations(*[b.extensions for b in objs if b]), } diff --git a/src/substrait/extension_registry.py b/src/substrait/extension_registry.py index 0e90bf3..c854c02 100644 --- a/src/substrait/extension_registry.py +++ b/src/substrait/extension_registry.py @@ -1,5 +1,6 @@ import yaml import itertools +import re from substrait.gen.proto.type_pb2 import Type from importlib.resources import files as importlib_files from collections import defaultdict @@ -9,9 +10,14 @@ from substrait.gen.antlr.SubstraitTypeParser import SubstraitTypeParser from substrait.gen.json import simple_extensions as se from substrait.simple_extension_utils import build_simple_extensions +from .bimap import UriUrnBiDiMap -DEFAULT_URI_PREFIX = "https://github.com/substrait-io/substrait/blob/main/extensions" +DEFAULT_URN_PREFIX = "https://github.com/substrait-io/substrait/blob/main/extensions" + +# Format: extension:: +# Example: extension:io.substrait:functions_arithmetic +URN_PATTERN = re.compile(r"^extension:[^:]+:[^:]+$") # mapping from argument types to shortened signature names: https://substrait.io/extensions/#function-signature-compound-names @@ -167,12 +173,12 @@ def covers( class FunctionEntry: def __init__( - self, uri: str, name: str, impl: Union[se.Impl, se.Impl1, se.Impl2], anchor: int + self, urn: str, name: str, impl: Union[se.Impl, se.Impl1, se.Impl2], anchor: int ) -> None: self.name = name self.impl = impl self.normalized_inputs: list = [] - self.uri: str = uri + self.urn: str = urn self.anchor = anchor self.arguments = [] self.nullability = ( @@ -244,35 +250,57 @@ def satisfies_signature(self, signature: tuple) -> Optional[str]: class ExtensionRegistry: def __init__(self, load_default_extensions=True) -> None: - self._uri_mapping: dict = defaultdict(dict) - self._uri_id_generator = itertools.count(1) + self._urn_mapping: dict = defaultdict(dict) # URN -> anchor ID + # NOTE: during the URI -> URN migration, we only need an id generator for URN. We can use the same anchor for plan construction for URIs. + self._urn_id_generator = itertools.count(1) self._function_mapping: dict = defaultdict(dict) self._id_generator = itertools.count(1) - self._uri_aliases = {} + # Bidirectional URI <-> URN mapping (temporary during migration) + self._uri_urn_bimap = UriUrnBiDiMap() if load_default_extensions: for fpath in importlib_files("substrait.extensions").glob( # type: ignore "functions*.yaml" ): - uri = f"{DEFAULT_URI_PREFIX}/{fpath.name}" - self._uri_aliases[fpath.name] = uri - self.register_extension_yaml(fpath, uri) + # Derive URI from DEFAULT_URN_PREFIX and filename + uri = f"{DEFAULT_URN_PREFIX}/{fpath.name}" + self.register_extension_yaml(fpath, uri=uri) def register_extension_yaml( self, fname: Union[str, Path], uri: str, ) -> None: + """Register extensions from a YAML file. + + Args: + fname: Path to the YAML file + uri: URI for the extension (this is required during the URI -> URN migration) + """ fname = Path(fname) with open(fname) as f: # type: ignore extension_definitions = yaml.safe_load(f) - self.register_extension_dict(extension_definitions, uri) + self.register_extension_dict(extension_definitions, uri=uri) def register_extension_dict(self, definitions: dict, uri: str) -> None: - self._uri_mapping[uri] = next(self._uri_id_generator) + """Register extensions from a dictionary (parsed YAML). + + Args: + definitions: The extension definitions dictionary + uri: URI for the extension (for URI/URN bimap) + """ + urn = definitions.get("urn") + if not urn: + raise ValueError("Extension definitions must contain a 'urn' field") + + self._validate_urn_format(urn) + + self._urn_mapping[urn] = next(self._urn_id_generator) + + self._uri_urn_bimap.put(uri, urn) simple_extensions = build_simple_extensions(definitions) @@ -286,28 +314,26 @@ def register_extension_dict(self, definitions: dict, uri: str) -> None: for function in functions: for impl in function.impls: func = FunctionEntry( - uri, function.name, impl, next(self._id_generator) + urn, function.name, impl, next(self._id_generator) ) if ( - func.uri in self._function_mapping - and function.name in self._function_mapping[func.uri] + func.urn in self._function_mapping + and function.name in self._function_mapping[func.urn] ): - self._function_mapping[func.uri][function.name].append(func) + self._function_mapping[func.urn][function.name].append(func) else: - self._function_mapping[func.uri][function.name] = [func] + self._function_mapping[func.urn][function.name] = [func] # TODO add an optional return type check def lookup_function( - self, uri: str, function_name: str, signature: tuple + self, urn: str, function_name: str, signature: tuple ) -> Optional[tuple[FunctionEntry, Type]]: - uri = self._uri_aliases.get(uri, uri) - if ( - uri not in self._function_mapping - or function_name not in self._function_mapping[uri] + urn not in self._function_mapping + or function_name not in self._function_mapping[urn] ): return None - functions = self._function_mapping[uri][function_name] + functions = self._function_mapping[urn][function_name] for f in functions: assert isinstance(f, FunctionEntry) rtn = f.satisfies_signature(signature) @@ -316,6 +342,41 @@ def lookup_function( return None - def lookup_uri(self, uri: str) -> Optional[int]: - uri = self._uri_aliases.get(uri, uri) - return self._uri_mapping.get(uri, None) + def lookup_urn(self, urn: str) -> Optional[int]: + return self._urn_mapping.get(urn, None) + + def lookup_uri_anchor(self, uri: str) -> Optional[int]: + """Look up the anchor ID for a URI. + + During the migration period, URI and URN share the same anchor. + This method converts the URI to its URN and returns the URN's anchor. + + Args: + uri: The extension URI to look up + + Returns: + The anchor ID for the URI (same as its corresponding URN), or None if not found + """ + urn = self._uri_urn_bimap.get_urn(uri) + if urn: + return self._urn_mapping.get(urn) + return None + + def _validate_urn_format(self, urn: str) -> None: + """Validate that a URN follows the expected format. + + Expected format: extension:: + Example: extension:io.substrait:functions_arithmetic + + Args: + urn: The URN to validate + + Raises: + ValueError: If the URN format is invalid + """ + if not URN_PATTERN.match(urn): + raise ValueError( + f"Invalid URN format: '{urn}'. " + f"Expected format: extension:: " + f"(e.g., 'extension:io.substrait:functions_arithmetic')" + ) diff --git a/src/substrait/extensions/extension_types.yaml b/src/substrait/extensions/extension_types.yaml index e03073c..5360992 100644 --- a/src/substrait/extensions/extension_types.yaml +++ b/src/substrait/extensions/extension_types.yaml @@ -1,4 +1,5 @@ --- +urn: extension:io.substrait:extension_types types: - name: point structure: diff --git a/src/substrait/extensions/functions_aggregate_approx.yaml b/src/substrait/extensions/functions_aggregate_approx.yaml index c77caec..d858acc 100644 --- a/src/substrait/extensions/functions_aggregate_approx.yaml +++ b/src/substrait/extensions/functions_aggregate_approx.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_aggregate_approx aggregate_functions: - name: "approx_count_distinct" description: >- diff --git a/src/substrait/extensions/functions_aggregate_decimal_output.yaml b/src/substrait/extensions/functions_aggregate_decimal_output.yaml index 13a3b2e..85a1959 100644 --- a/src/substrait/extensions/functions_aggregate_decimal_output.yaml +++ b/src/substrait/extensions/functions_aggregate_decimal_output.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_aggregate_decimal_output aggregate_functions: - name: "count" description: Count a set of values. Result is returned as a decimal instead of i64. diff --git a/src/substrait/extensions/functions_aggregate_generic.yaml b/src/substrait/extensions/functions_aggregate_generic.yaml index 4db63ec..63553f3 100644 --- a/src/substrait/extensions/functions_aggregate_generic.yaml +++ b/src/substrait/extensions/functions_aggregate_generic.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_aggregate_generic aggregate_functions: - name: "count" description: Count a set of values diff --git a/src/substrait/extensions/functions_arithmetic.yaml b/src/substrait/extensions/functions_arithmetic.yaml index 940bb06..8746f03 100644 --- a/src/substrait/extensions/functions_arithmetic.yaml +++ b/src/substrait/extensions/functions_arithmetic.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_arithmetic scalar_functions: - name: "add" diff --git a/src/substrait/extensions/functions_arithmetic_decimal.yaml b/src/substrait/extensions/functions_arithmetic_decimal.yaml index 57cdbe3..bc131a2 100644 --- a/src/substrait/extensions/functions_arithmetic_decimal.yaml +++ b/src/substrait/extensions/functions_arithmetic_decimal.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_arithmetic_decimal scalar_functions: - name: "add" diff --git a/src/substrait/extensions/functions_boolean.yaml b/src/substrait/extensions/functions_boolean.yaml index 22ae296..fcbe56c 100644 --- a/src/substrait/extensions/functions_boolean.yaml +++ b/src/substrait/extensions/functions_boolean.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_boolean scalar_functions: - name: or diff --git a/src/substrait/extensions/functions_comparison.yaml b/src/substrait/extensions/functions_comparison.yaml index 517f8e3..69d8906 100644 --- a/src/substrait/extensions/functions_comparison.yaml +++ b/src/substrait/extensions/functions_comparison.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_comparison scalar_functions: - name: "not_equal" diff --git a/src/substrait/extensions/functions_datetime.yaml b/src/substrait/extensions/functions_datetime.yaml index 20e90e9..3f19ded 100644 --- a/src/substrait/extensions/functions_datetime.yaml +++ b/src/substrait/extensions/functions_datetime.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_datetime scalar_functions: - name: extract diff --git a/src/substrait/extensions/functions_geometry.yaml b/src/substrait/extensions/functions_geometry.yaml index cc494c3..127978c 100644 --- a/src/substrait/extensions/functions_geometry.yaml +++ b/src/substrait/extensions/functions_geometry.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_geometry types: - name: geometry structure: "BINARY" diff --git a/src/substrait/extensions/functions_logarithmic.yaml b/src/substrait/extensions/functions_logarithmic.yaml index b46f3d3..d1f8dd9 100644 --- a/src/substrait/extensions/functions_logarithmic.yaml +++ b/src/substrait/extensions/functions_logarithmic.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_logarithmic scalar_functions: - name: "ln" diff --git a/src/substrait/extensions/functions_rounding.yaml b/src/substrait/extensions/functions_rounding.yaml index 09309f2..0ca8713 100644 --- a/src/substrait/extensions/functions_rounding.yaml +++ b/src/substrait/extensions/functions_rounding.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_rounding scalar_functions: - name: "ceil" diff --git a/src/substrait/extensions/functions_rounding_decimal.yaml b/src/substrait/extensions/functions_rounding_decimal.yaml index b445069..057dc60 100644 --- a/src/substrait/extensions/functions_rounding_decimal.yaml +++ b/src/substrait/extensions/functions_rounding_decimal.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_rounding_decimal scalar_functions: - name: "ceil" diff --git a/src/substrait/extensions/functions_set.yaml b/src/substrait/extensions/functions_set.yaml index 58b9642..3331b29 100644 --- a/src/substrait/extensions/functions_set.yaml +++ b/src/substrait/extensions/functions_set.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_set scalar_functions: - name: "index_in" diff --git a/src/substrait/extensions/functions_string.yaml b/src/substrait/extensions/functions_string.yaml index 399fb37..2cd5f84 100644 --- a/src/substrait/extensions/functions_string.yaml +++ b/src/substrait/extensions/functions_string.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:functions_string scalar_functions: - name: concat diff --git a/src/substrait/extensions/type_variations.yaml b/src/substrait/extensions/type_variations.yaml index f6f96d5..6f129b5 100644 --- a/src/substrait/extensions/type_variations.yaml +++ b/src/substrait/extensions/type_variations.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:type_variations type_variations: - parent: string name: dict4 diff --git a/src/substrait/extensions/unknown.yaml b/src/substrait/extensions/unknown.yaml index 3b0e6c1..3603d68 100644 --- a/src/substrait/extensions/unknown.yaml +++ b/src/substrait/extensions/unknown.yaml @@ -1,5 +1,6 @@ %YAML 1.2 --- +urn: extension:io.substrait:unknown types: - name: unknown scalar_functions: diff --git a/src/substrait/gen/antlr/SubstraitTypeLexer.py b/src/substrait/gen/antlr/SubstraitTypeLexer.py index dd8cc53..6a5a3cb 100644 --- a/src/substrait/gen/antlr/SubstraitTypeLexer.py +++ b/src/substrait/gen/antlr/SubstraitTypeLexer.py @@ -1,4 +1,4 @@ -# Generated from SubstraitType.g4 by ANTLR 4.13.1 +# Generated from SubstraitType.g4 by ANTLR 4.13.2 from antlr4 import * from io import StringIO import sys @@ -10,7 +10,7 @@ def serializedATN(): return [ - 4,0,78,604,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, + 4,0,80,626,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,2, @@ -22,56 +22,58 @@ def serializedATN(): 58,2,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,2,80,7,80,1,0,1,0,1,0,1,0,5,0,168,8,0,10,0,12, - 0,171,9,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,4,1,180,8,1,11,1,12,1,181, - 1,1,3,1,185,8,1,1,1,5,1,188,8,1,10,1,12,1,191,9,1,1,1,1,1,1,1,1, - 1,1,1,1,2,4,2,199,8,2,11,2,12,2,200,1,2,1,2,1,3,1,3,1,4,1,4,1,4, - 1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7, - 1,7,1,7,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,11,1,11, - 1,11,1,11,1,12,1,12,1,12,1,12,1,12,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,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,17,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,18,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,21,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,24,1,24,1,24,1,24,1,24, + 78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,1,0,1,0,1,0,1,0, + 5,0,172,8,0,10,0,12,0,175,9,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,4,1,184, + 8,1,11,1,12,1,185,1,1,3,1,189,8,1,1,1,5,1,192,8,1,10,1,12,1,195, + 9,1,1,1,1,1,1,1,1,1,1,1,1,2,4,2,203,8,2,11,2,12,2,204,1,2,1,2,1, + 3,1,3,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,10,1,10, + 1,10,1,10,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,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,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,17,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,18,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,21,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,24, 1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24, - 1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25, - 1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,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,1,27,1,27,1,27,1,27, - 1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28, - 1,28,1,28,1,28,1,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,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32, - 1,32,1,33,1,33,1,33,1,34,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,36,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38, - 1,39,1,39,1,39,1,39,1,39,1,39,1,40,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,43,1,43,1,44, - 1,44,1,44,1,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,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,49,1,49,1,49, - 1,50,1,50,1,51,1,51,1,52,1,52,1,53,1,53,1,54,1,54,1,55,1,55,1,56, - 1,56,1,56,1,57,1,57,1,57,1,58,1,58,1,58,1,59,1,59,1,60,1,60,1,61, - 1,61,1,62,1,62,1,63,1,63,1,64,1,64,1,65,1,65,1,66,1,66,1,67,1,67, - 1,68,1,68,1,69,1,69,1,70,1,70,1,71,1,71,1,72,1,72,1,73,1,73,1,73, - 1,73,1,74,1,74,1,74,1,75,1,75,1,75,1,76,1,76,5,76,575,8,76,10,76, - 12,76,578,9,76,1,76,3,76,581,8,76,1,77,1,77,1,78,3,78,586,8,78,1, - 78,1,78,1,79,1,79,1,79,5,79,593,8,79,10,79,12,79,596,9,79,1,80,1, - 80,3,80,600,8,80,1,80,3,80,603,8,80,0,0,81,1,1,3,2,5,3,7,0,9,4,11, - 5,13,6,15,7,17,8,19,9,21,10,23,11,25,12,27,13,29,14,31,15,33,16, - 35,17,37,18,39,19,41,20,43,21,45,22,47,23,49,24,51,25,53,26,55,27, - 57,28,59,29,61,30,63,31,65,32,67,33,69,34,71,35,73,36,75,37,77,38, - 79,39,81,40,83,41,85,42,87,43,89,44,91,45,93,46,95,47,97,48,99,49, - 101,50,103,51,105,52,107,53,109,54,111,55,113,56,115,57,117,58,119, - 59,121,60,123,61,125,62,127,63,129,64,131,65,133,66,135,67,137,68, - 139,69,141,70,143,71,145,72,147,73,149,74,151,75,153,0,155,0,157, - 76,159,77,161,78,1,0,28,2,0,10,10,13,13,1,0,42,42,2,0,42,42,47,47, - 3,0,9,9,13,13,32,32,1,0,48,57,2,0,73,73,105,105,2,0,70,70,102,102, + 1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25, + 1,25,1,25,1,25,1,25,1,25,1,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,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26, + 1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27, + 1,27,1,27,1,28,1,28,1,28,1,28,1,28,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,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,32,1,32, + 1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,35,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,37,1,38,1,38, + 1,38,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,41, + 1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,44,1,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, + 1,46,1,47,1,47,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49, + 1,49,1,49,1,49,1,50,1,50,1,50,1,51,1,51,1,51,1,52,1,52,1,53,1,53, + 1,54,1,54,1,55,1,55,1,56,1,56,1,57,1,57,1,58,1,58,1,58,1,59,1,59, + 1,59,1,60,1,60,1,60,1,61,1,61,1,62,1,62,1,63,1,63,1,64,1,64,1,65, + 1,65,1,66,1,66,1,67,1,67,1,68,1,68,1,69,1,69,1,70,1,70,1,71,1,71, + 1,72,1,72,1,73,1,73,1,74,1,74,1,75,1,75,1,75,1,75,1,76,1,76,1,76, + 1,77,1,77,1,77,1,78,1,78,5,78,597,8,78,10,78,12,78,600,9,78,1,78, + 3,78,603,8,78,1,79,1,79,1,80,3,80,608,8,80,1,80,1,80,1,81,1,81,1, + 81,5,81,615,8,81,10,81,12,81,618,9,81,1,82,1,82,3,82,622,8,82,1, + 82,3,82,625,8,82,0,0,83,1,1,3,2,5,3,7,0,9,4,11,5,13,6,15,7,17,8, + 19,9,21,10,23,11,25,12,27,13,29,14,31,15,33,16,35,17,37,18,39,19, + 41,20,43,21,45,22,47,23,49,24,51,25,53,26,55,27,57,28,59,29,61,30, + 63,31,65,32,67,33,69,34,71,35,73,36,75,37,77,38,79,39,81,40,83,41, + 85,42,87,43,89,44,91,45,93,46,95,47,97,48,99,49,101,50,103,51,105, + 52,107,53,109,54,111,55,113,56,115,57,117,58,119,59,121,60,123,61, + 125,62,127,63,129,64,131,65,133,66,135,67,137,68,139,69,141,70,143, + 71,145,72,147,73,149,74,151,75,153,76,155,77,157,0,159,0,161,78, + 163,79,165,80,1,0,28,2,0,10,10,13,13,1,0,42,42,2,0,42,42,47,47,3, + 0,9,9,13,13,32,32,1,0,48,57,2,0,73,73,105,105,2,0,70,70,102,102, 2,0,84,84,116,116,2,0,72,72,104,104,2,0,69,69,101,101,2,0,78,78, 110,110,2,0,76,76,108,108,2,0,83,83,115,115,2,0,66,66,98,98,2,0, 79,79,111,111,2,0,65,65,97,97,2,0,80,80,112,112,2,0,82,82,114,114, 2,0,71,71,103,103,2,0,89,89,121,121,2,0,77,77,109,109,2,0,90,90, 122,122,2,0,68,68,100,100,2,0,86,86,118,118,2,0,85,85,117,117,2, - 0,67,67,99,99,2,0,88,88,120,120,4,0,36,36,65,90,95,95,97,122,612, + 0,67,67,99,99,2,0,88,88,120,120,4,0,36,36,65,90,95,95,97,122,634, 0,1,1,0,0,0,0,3,1,0,0,0,0,5,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, @@ -87,142 +89,147 @@ def serializedATN(): 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,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0, - 1,163,1,0,0,0,3,174,1,0,0,0,5,198,1,0,0,0,7,204,1,0,0,0,9,206,1, - 0,0,0,11,209,1,0,0,0,13,214,1,0,0,0,15,219,1,0,0,0,17,227,1,0,0, - 0,19,230,1,0,0,0,21,234,1,0,0,0,23,238,1,0,0,0,25,242,1,0,0,0,27, - 247,1,0,0,0,29,252,1,0,0,0,31,259,1,0,0,0,33,266,1,0,0,0,35,276, - 1,0,0,0,37,289,1,0,0,0,39,294,1,0,0,0,41,299,1,0,0,0,43,313,1,0, - 0,0,45,326,1,0,0,0,47,331,1,0,0,0,49,339,1,0,0,0,51,359,1,0,0,0, - 53,382,1,0,0,0,55,392,1,0,0,0,57,400,1,0,0,0,59,412,1,0,0,0,61,419, - 1,0,0,0,63,427,1,0,0,0,65,432,1,0,0,0,67,436,1,0,0,0,69,439,1,0, - 0,0,71,444,1,0,0,0,73,448,1,0,0,0,75,453,1,0,0,0,77,456,1,0,0,0, - 79,461,1,0,0,0,81,467,1,0,0,0,83,472,1,0,0,0,85,476,1,0,0,0,87,480, - 1,0,0,0,89,486,1,0,0,0,91,492,1,0,0,0,93,498,1,0,0,0,95,503,1,0, - 0,0,97,507,1,0,0,0,99,510,1,0,0,0,101,513,1,0,0,0,103,515,1,0,0, - 0,105,517,1,0,0,0,107,519,1,0,0,0,109,521,1,0,0,0,111,523,1,0,0, - 0,113,525,1,0,0,0,115,528,1,0,0,0,117,531,1,0,0,0,119,534,1,0,0, - 0,121,536,1,0,0,0,123,538,1,0,0,0,125,540,1,0,0,0,127,542,1,0,0, - 0,129,544,1,0,0,0,131,546,1,0,0,0,133,548,1,0,0,0,135,550,1,0,0, - 0,137,552,1,0,0,0,139,554,1,0,0,0,141,556,1,0,0,0,143,558,1,0,0, - 0,145,560,1,0,0,0,147,562,1,0,0,0,149,566,1,0,0,0,151,569,1,0,0, - 0,153,580,1,0,0,0,155,582,1,0,0,0,157,585,1,0,0,0,159,589,1,0,0, - 0,161,602,1,0,0,0,163,164,5,47,0,0,164,165,5,47,0,0,165,169,1,0, - 0,0,166,168,8,0,0,0,167,166,1,0,0,0,168,171,1,0,0,0,169,167,1,0, - 0,0,169,170,1,0,0,0,170,172,1,0,0,0,171,169,1,0,0,0,172,173,6,0, - 0,0,173,2,1,0,0,0,174,175,5,47,0,0,175,176,5,42,0,0,176,184,1,0, - 0,0,177,185,8,1,0,0,178,180,5,42,0,0,179,178,1,0,0,0,180,181,1,0, - 0,0,181,179,1,0,0,0,181,182,1,0,0,0,182,183,1,0,0,0,183,185,8,2, - 0,0,184,177,1,0,0,0,184,179,1,0,0,0,185,189,1,0,0,0,186,188,5,42, - 0,0,187,186,1,0,0,0,188,191,1,0,0,0,189,187,1,0,0,0,189,190,1,0, - 0,0,190,192,1,0,0,0,191,189,1,0,0,0,192,193,5,42,0,0,193,194,5,47, - 0,0,194,195,1,0,0,0,195,196,6,1,0,0,196,4,1,0,0,0,197,199,7,3,0, - 0,198,197,1,0,0,0,199,200,1,0,0,0,200,198,1,0,0,0,200,201,1,0,0, - 0,201,202,1,0,0,0,202,203,6,2,0,0,203,6,1,0,0,0,204,205,7,4,0,0, - 205,8,1,0,0,0,206,207,7,5,0,0,207,208,7,6,0,0,208,10,1,0,0,0,209, - 210,7,7,0,0,210,211,7,8,0,0,211,212,7,9,0,0,212,213,7,10,0,0,213, - 12,1,0,0,0,214,215,7,9,0,0,215,216,7,11,0,0,216,217,7,12,0,0,217, - 218,7,9,0,0,218,14,1,0,0,0,219,220,7,13,0,0,220,221,7,14,0,0,221, - 222,7,14,0,0,222,223,7,11,0,0,223,224,7,9,0,0,224,225,7,15,0,0,225, - 226,7,10,0,0,226,16,1,0,0,0,227,228,7,5,0,0,228,229,5,56,0,0,229, - 18,1,0,0,0,230,231,7,5,0,0,231,232,5,49,0,0,232,233,5,54,0,0,233, - 20,1,0,0,0,234,235,7,5,0,0,235,236,5,51,0,0,236,237,5,50,0,0,237, - 22,1,0,0,0,238,239,7,5,0,0,239,240,5,54,0,0,240,241,5,52,0,0,241, - 24,1,0,0,0,242,243,7,6,0,0,243,244,7,16,0,0,244,245,5,51,0,0,245, - 246,5,50,0,0,246,26,1,0,0,0,247,248,7,6,0,0,248,249,7,16,0,0,249, - 250,5,54,0,0,250,251,5,52,0,0,251,28,1,0,0,0,252,253,7,12,0,0,253, - 254,7,7,0,0,254,255,7,17,0,0,255,256,7,5,0,0,256,257,7,10,0,0,257, - 258,7,18,0,0,258,30,1,0,0,0,259,260,7,13,0,0,260,261,7,5,0,0,261, - 262,7,10,0,0,262,263,7,15,0,0,263,264,7,17,0,0,264,265,7,19,0,0, - 265,32,1,0,0,0,266,267,7,7,0,0,267,268,7,5,0,0,268,269,7,20,0,0, - 269,270,7,9,0,0,270,271,7,12,0,0,271,272,7,7,0,0,272,273,7,15,0, - 0,273,274,7,20,0,0,274,275,7,16,0,0,275,34,1,0,0,0,276,277,7,7,0, - 0,277,278,7,5,0,0,278,279,7,20,0,0,279,280,7,9,0,0,280,281,7,12, - 0,0,281,282,7,7,0,0,282,283,7,15,0,0,283,284,7,20,0,0,284,285,7, - 16,0,0,285,286,5,95,0,0,286,287,7,7,0,0,287,288,7,21,0,0,288,36, - 1,0,0,0,289,290,7,22,0,0,290,291,7,15,0,0,291,292,7,7,0,0,292,293, - 7,9,0,0,293,38,1,0,0,0,294,295,7,7,0,0,295,296,7,5,0,0,296,297,7, - 20,0,0,297,298,7,9,0,0,298,40,1,0,0,0,299,300,7,5,0,0,300,301,7, - 10,0,0,301,302,7,7,0,0,302,303,7,9,0,0,303,304,7,17,0,0,304,305, - 7,23,0,0,305,306,7,15,0,0,306,307,7,11,0,0,307,308,5,95,0,0,308, - 309,7,19,0,0,309,310,7,9,0,0,310,311,7,15,0,0,311,312,7,17,0,0,312, - 42,1,0,0,0,313,314,7,5,0,0,314,315,7,10,0,0,315,316,7,7,0,0,316, - 317,7,9,0,0,317,318,7,17,0,0,318,319,7,23,0,0,319,320,7,15,0,0,320, - 321,7,11,0,0,321,322,5,95,0,0,322,323,7,22,0,0,323,324,7,15,0,0, - 324,325,7,19,0,0,325,44,1,0,0,0,326,327,7,24,0,0,327,328,7,24,0, - 0,328,329,7,5,0,0,329,330,7,22,0,0,330,46,1,0,0,0,331,332,7,22,0, - 0,332,333,7,9,0,0,333,334,7,25,0,0,334,335,7,5,0,0,335,336,7,20, - 0,0,336,337,7,15,0,0,337,338,7,11,0,0,338,48,1,0,0,0,339,340,7,16, - 0,0,340,341,7,17,0,0,341,342,7,9,0,0,342,343,7,25,0,0,343,344,7, - 5,0,0,344,345,7,12,0,0,345,346,7,5,0,0,346,347,7,14,0,0,347,348, - 7,10,0,0,348,349,5,95,0,0,349,350,7,7,0,0,350,351,7,5,0,0,351,352, - 7,20,0,0,352,353,7,9,0,0,353,354,7,12,0,0,354,355,7,7,0,0,355,356, - 7,15,0,0,356,357,7,20,0,0,357,358,7,16,0,0,358,50,1,0,0,0,359,360, - 7,16,0,0,360,361,7,17,0,0,361,362,7,9,0,0,362,363,7,25,0,0,363,364, - 7,5,0,0,364,365,7,12,0,0,365,366,7,5,0,0,366,367,7,14,0,0,367,368, - 7,10,0,0,368,369,5,95,0,0,369,370,7,7,0,0,370,371,7,5,0,0,371,372, - 7,20,0,0,372,373,7,9,0,0,373,374,7,12,0,0,374,375,7,7,0,0,375,376, - 7,15,0,0,376,377,7,20,0,0,377,378,7,16,0,0,378,379,5,95,0,0,379, - 380,7,7,0,0,380,381,7,21,0,0,381,52,1,0,0,0,382,383,7,6,0,0,383, - 384,7,5,0,0,384,385,7,26,0,0,385,386,7,9,0,0,386,387,7,22,0,0,387, - 388,7,25,0,0,388,389,7,8,0,0,389,390,7,15,0,0,390,391,7,17,0,0,391, - 54,1,0,0,0,392,393,7,23,0,0,393,394,7,15,0,0,394,395,7,17,0,0,395, - 396,7,25,0,0,396,397,7,8,0,0,397,398,7,15,0,0,398,399,7,17,0,0,399, - 56,1,0,0,0,400,401,7,6,0,0,401,402,7,5,0,0,402,403,7,26,0,0,403, - 404,7,9,0,0,404,405,7,22,0,0,405,406,7,13,0,0,406,407,7,5,0,0,407, - 408,7,10,0,0,408,409,7,15,0,0,409,410,7,17,0,0,410,411,7,19,0,0, - 411,58,1,0,0,0,412,413,7,12,0,0,413,414,7,7,0,0,414,415,7,17,0,0, - 415,416,7,24,0,0,416,417,7,25,0,0,417,418,7,7,0,0,418,60,1,0,0,0, - 419,420,7,10,0,0,420,421,7,12,0,0,421,422,7,7,0,0,422,423,7,17,0, - 0,423,424,7,24,0,0,424,425,7,25,0,0,425,426,7,7,0,0,426,62,1,0,0, - 0,427,428,7,11,0,0,428,429,7,5,0,0,429,430,7,12,0,0,430,431,7,7, - 0,0,431,64,1,0,0,0,432,433,7,20,0,0,433,434,7,15,0,0,434,435,7,16, - 0,0,435,66,1,0,0,0,436,437,7,24,0,0,437,438,5,33,0,0,438,68,1,0, - 0,0,439,440,7,13,0,0,440,441,7,14,0,0,441,442,7,14,0,0,442,443,7, - 11,0,0,443,70,1,0,0,0,444,445,7,12,0,0,445,446,7,7,0,0,446,447,7, - 17,0,0,447,72,1,0,0,0,448,449,7,23,0,0,449,450,7,13,0,0,450,451, - 7,5,0,0,451,452,7,10,0,0,452,74,1,0,0,0,453,454,7,7,0,0,454,455, - 7,12,0,0,455,76,1,0,0,0,456,457,7,7,0,0,457,458,7,12,0,0,458,459, - 7,7,0,0,459,460,7,21,0,0,460,78,1,0,0,0,461,462,7,5,0,0,462,463, - 7,19,0,0,463,464,7,9,0,0,464,465,7,15,0,0,465,466,7,17,0,0,466,80, - 1,0,0,0,467,468,7,5,0,0,468,469,7,22,0,0,469,470,7,15,0,0,470,471, - 7,19,0,0,471,82,1,0,0,0,472,473,7,22,0,0,473,474,7,9,0,0,474,475, - 7,25,0,0,475,84,1,0,0,0,476,477,7,16,0,0,477,478,7,7,0,0,478,479, - 7,12,0,0,479,86,1,0,0,0,480,481,7,16,0,0,481,482,7,7,0,0,482,483, - 7,12,0,0,483,484,7,7,0,0,484,485,7,21,0,0,485,88,1,0,0,0,486,487, - 7,6,0,0,487,488,7,25,0,0,488,489,7,8,0,0,489,490,7,15,0,0,490,491, - 7,17,0,0,491,90,1,0,0,0,492,493,7,23,0,0,493,494,7,25,0,0,494,495, - 7,8,0,0,495,496,7,15,0,0,496,497,7,17,0,0,497,92,1,0,0,0,498,499, - 7,6,0,0,499,500,7,13,0,0,500,501,7,5,0,0,501,502,7,10,0,0,502,94, - 1,0,0,0,503,504,7,15,0,0,504,505,7,10,0,0,505,506,7,19,0,0,506,96, - 1,0,0,0,507,508,3,95,47,0,508,509,7,4,0,0,509,98,1,0,0,0,510,511, - 5,58,0,0,511,512,5,58,0,0,512,100,1,0,0,0,513,514,5,43,0,0,514,102, - 1,0,0,0,515,516,5,45,0,0,516,104,1,0,0,0,517,518,5,42,0,0,518,106, - 1,0,0,0,519,520,5,47,0,0,520,108,1,0,0,0,521,522,5,37,0,0,522,110, - 1,0,0,0,523,524,5,61,0,0,524,112,1,0,0,0,525,526,5,33,0,0,526,527, - 5,61,0,0,527,114,1,0,0,0,528,529,5,62,0,0,529,530,5,61,0,0,530,116, - 1,0,0,0,531,532,5,60,0,0,532,533,5,61,0,0,533,118,1,0,0,0,534,535, - 5,62,0,0,535,120,1,0,0,0,536,537,5,60,0,0,537,122,1,0,0,0,538,539, - 5,33,0,0,539,124,1,0,0,0,540,541,3,121,60,0,541,126,1,0,0,0,542, - 543,3,119,59,0,543,128,1,0,0,0,544,545,5,40,0,0,545,130,1,0,0,0, - 546,547,5,41,0,0,547,132,1,0,0,0,548,549,5,91,0,0,549,134,1,0,0, - 0,550,551,5,93,0,0,551,136,1,0,0,0,552,553,5,44,0,0,553,138,1,0, - 0,0,554,555,5,58,0,0,555,140,1,0,0,0,556,557,5,63,0,0,557,142,1, - 0,0,0,558,559,5,35,0,0,559,144,1,0,0,0,560,561,5,46,0,0,561,146, - 1,0,0,0,562,563,7,15,0,0,563,564,7,10,0,0,564,565,7,22,0,0,565,148, - 1,0,0,0,566,567,7,14,0,0,567,568,7,17,0,0,568,150,1,0,0,0,569,570, - 5,58,0,0,570,571,5,61,0,0,571,152,1,0,0,0,572,576,2,49,57,0,573, - 575,3,155,77,0,574,573,1,0,0,0,575,578,1,0,0,0,576,574,1,0,0,0,576, - 577,1,0,0,0,577,581,1,0,0,0,578,576,1,0,0,0,579,581,5,48,0,0,580, - 572,1,0,0,0,580,579,1,0,0,0,581,154,1,0,0,0,582,583,2,48,57,0,583, - 156,1,0,0,0,584,586,5,45,0,0,585,584,1,0,0,0,585,586,1,0,0,0,586, - 587,1,0,0,0,587,588,3,153,76,0,588,158,1,0,0,0,589,594,7,27,0,0, - 590,593,7,27,0,0,591,593,3,155,77,0,592,590,1,0,0,0,592,591,1,0, - 0,0,593,596,1,0,0,0,594,592,1,0,0,0,594,595,1,0,0,0,595,160,1,0, - 0,0,596,594,1,0,0,0,597,599,5,13,0,0,598,600,5,10,0,0,599,598,1, - 0,0,0,599,600,1,0,0,0,600,603,1,0,0,0,601,603,5,10,0,0,602,597,1, - 0,0,0,602,601,1,0,0,0,603,162,1,0,0,0,13,0,169,181,184,189,200,576, - 580,585,592,594,599,602,1,0,1,0 + 1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,161,1,0,0,0, + 0,163,1,0,0,0,0,165,1,0,0,0,1,167,1,0,0,0,3,178,1,0,0,0,5,202,1, + 0,0,0,7,208,1,0,0,0,9,210,1,0,0,0,11,213,1,0,0,0,13,218,1,0,0,0, + 15,223,1,0,0,0,17,231,1,0,0,0,19,234,1,0,0,0,21,238,1,0,0,0,23,242, + 1,0,0,0,25,246,1,0,0,0,27,251,1,0,0,0,29,256,1,0,0,0,31,263,1,0, + 0,0,33,270,1,0,0,0,35,280,1,0,0,0,37,293,1,0,0,0,39,298,1,0,0,0, + 41,303,1,0,0,0,43,317,1,0,0,0,45,330,1,0,0,0,47,335,1,0,0,0,49,343, + 1,0,0,0,51,358,1,0,0,0,53,378,1,0,0,0,55,401,1,0,0,0,57,411,1,0, + 0,0,59,419,1,0,0,0,61,431,1,0,0,0,63,438,1,0,0,0,65,446,1,0,0,0, + 67,451,1,0,0,0,69,455,1,0,0,0,71,458,1,0,0,0,73,463,1,0,0,0,75,467, + 1,0,0,0,77,472,1,0,0,0,79,475,1,0,0,0,81,480,1,0,0,0,83,486,1,0, + 0,0,85,491,1,0,0,0,87,495,1,0,0,0,89,498,1,0,0,0,91,502,1,0,0,0, + 93,508,1,0,0,0,95,514,1,0,0,0,97,520,1,0,0,0,99,525,1,0,0,0,101, + 529,1,0,0,0,103,532,1,0,0,0,105,535,1,0,0,0,107,537,1,0,0,0,109, + 539,1,0,0,0,111,541,1,0,0,0,113,543,1,0,0,0,115,545,1,0,0,0,117, + 547,1,0,0,0,119,550,1,0,0,0,121,553,1,0,0,0,123,556,1,0,0,0,125, + 558,1,0,0,0,127,560,1,0,0,0,129,562,1,0,0,0,131,564,1,0,0,0,133, + 566,1,0,0,0,135,568,1,0,0,0,137,570,1,0,0,0,139,572,1,0,0,0,141, + 574,1,0,0,0,143,576,1,0,0,0,145,578,1,0,0,0,147,580,1,0,0,0,149, + 582,1,0,0,0,151,584,1,0,0,0,153,588,1,0,0,0,155,591,1,0,0,0,157, + 602,1,0,0,0,159,604,1,0,0,0,161,607,1,0,0,0,163,611,1,0,0,0,165, + 624,1,0,0,0,167,168,5,47,0,0,168,169,5,47,0,0,169,173,1,0,0,0,170, + 172,8,0,0,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,176,1,0,0,0,175,173,1,0,0,0,176,177,6,0,0,0,177, + 2,1,0,0,0,178,179,5,47,0,0,179,180,5,42,0,0,180,188,1,0,0,0,181, + 189,8,1,0,0,182,184,5,42,0,0,183,182,1,0,0,0,184,185,1,0,0,0,185, + 183,1,0,0,0,185,186,1,0,0,0,186,187,1,0,0,0,187,189,8,2,0,0,188, + 181,1,0,0,0,188,183,1,0,0,0,189,193,1,0,0,0,190,192,5,42,0,0,191, + 190,1,0,0,0,192,195,1,0,0,0,193,191,1,0,0,0,193,194,1,0,0,0,194, + 196,1,0,0,0,195,193,1,0,0,0,196,197,5,42,0,0,197,198,5,47,0,0,198, + 199,1,0,0,0,199,200,6,1,0,0,200,4,1,0,0,0,201,203,7,3,0,0,202,201, + 1,0,0,0,203,204,1,0,0,0,204,202,1,0,0,0,204,205,1,0,0,0,205,206, + 1,0,0,0,206,207,6,2,0,0,207,6,1,0,0,0,208,209,7,4,0,0,209,8,1,0, + 0,0,210,211,7,5,0,0,211,212,7,6,0,0,212,10,1,0,0,0,213,214,7,7,0, + 0,214,215,7,8,0,0,215,216,7,9,0,0,216,217,7,10,0,0,217,12,1,0,0, + 0,218,219,7,9,0,0,219,220,7,11,0,0,220,221,7,12,0,0,221,222,7,9, + 0,0,222,14,1,0,0,0,223,224,7,13,0,0,224,225,7,14,0,0,225,226,7,14, + 0,0,226,227,7,11,0,0,227,228,7,9,0,0,228,229,7,15,0,0,229,230,7, + 10,0,0,230,16,1,0,0,0,231,232,7,5,0,0,232,233,5,56,0,0,233,18,1, + 0,0,0,234,235,7,5,0,0,235,236,5,49,0,0,236,237,5,54,0,0,237,20,1, + 0,0,0,238,239,7,5,0,0,239,240,5,51,0,0,240,241,5,50,0,0,241,22,1, + 0,0,0,242,243,7,5,0,0,243,244,5,54,0,0,244,245,5,52,0,0,245,24,1, + 0,0,0,246,247,7,6,0,0,247,248,7,16,0,0,248,249,5,51,0,0,249,250, + 5,50,0,0,250,26,1,0,0,0,251,252,7,6,0,0,252,253,7,16,0,0,253,254, + 5,54,0,0,254,255,5,52,0,0,255,28,1,0,0,0,256,257,7,12,0,0,257,258, + 7,7,0,0,258,259,7,17,0,0,259,260,7,5,0,0,260,261,7,10,0,0,261,262, + 7,18,0,0,262,30,1,0,0,0,263,264,7,13,0,0,264,265,7,5,0,0,265,266, + 7,10,0,0,266,267,7,15,0,0,267,268,7,17,0,0,268,269,7,19,0,0,269, + 32,1,0,0,0,270,271,7,7,0,0,271,272,7,5,0,0,272,273,7,20,0,0,273, + 274,7,9,0,0,274,275,7,12,0,0,275,276,7,7,0,0,276,277,7,15,0,0,277, + 278,7,20,0,0,278,279,7,16,0,0,279,34,1,0,0,0,280,281,7,7,0,0,281, + 282,7,5,0,0,282,283,7,20,0,0,283,284,7,9,0,0,284,285,7,12,0,0,285, + 286,7,7,0,0,286,287,7,15,0,0,287,288,7,20,0,0,288,289,7,16,0,0,289, + 290,5,95,0,0,290,291,7,7,0,0,291,292,7,21,0,0,292,36,1,0,0,0,293, + 294,7,22,0,0,294,295,7,15,0,0,295,296,7,7,0,0,296,297,7,9,0,0,297, + 38,1,0,0,0,298,299,7,7,0,0,299,300,7,5,0,0,300,301,7,20,0,0,301, + 302,7,9,0,0,302,40,1,0,0,0,303,304,7,5,0,0,304,305,7,10,0,0,305, + 306,7,7,0,0,306,307,7,9,0,0,307,308,7,17,0,0,308,309,7,23,0,0,309, + 310,7,15,0,0,310,311,7,11,0,0,311,312,5,95,0,0,312,313,7,19,0,0, + 313,314,7,9,0,0,314,315,7,15,0,0,315,316,7,17,0,0,316,42,1,0,0,0, + 317,318,7,5,0,0,318,319,7,10,0,0,319,320,7,7,0,0,320,321,7,9,0,0, + 321,322,7,17,0,0,322,323,7,23,0,0,323,324,7,15,0,0,324,325,7,11, + 0,0,325,326,5,95,0,0,326,327,7,22,0,0,327,328,7,15,0,0,328,329,7, + 19,0,0,329,44,1,0,0,0,330,331,7,24,0,0,331,332,7,24,0,0,332,333, + 7,5,0,0,333,334,7,22,0,0,334,46,1,0,0,0,335,336,7,22,0,0,336,337, + 7,9,0,0,337,338,7,25,0,0,338,339,7,5,0,0,339,340,7,20,0,0,340,341, + 7,15,0,0,341,342,7,11,0,0,342,48,1,0,0,0,343,344,7,16,0,0,344,345, + 7,17,0,0,345,346,7,9,0,0,346,347,7,25,0,0,347,348,7,5,0,0,348,349, + 7,12,0,0,349,350,7,5,0,0,350,351,7,14,0,0,351,352,7,10,0,0,352,353, + 5,95,0,0,353,354,7,7,0,0,354,355,7,5,0,0,355,356,7,20,0,0,356,357, + 7,9,0,0,357,50,1,0,0,0,358,359,7,16,0,0,359,360,7,17,0,0,360,361, + 7,9,0,0,361,362,7,25,0,0,362,363,7,5,0,0,363,364,7,12,0,0,364,365, + 7,5,0,0,365,366,7,14,0,0,366,367,7,10,0,0,367,368,5,95,0,0,368,369, + 7,7,0,0,369,370,7,5,0,0,370,371,7,20,0,0,371,372,7,9,0,0,372,373, + 7,12,0,0,373,374,7,7,0,0,374,375,7,15,0,0,375,376,7,20,0,0,376,377, + 7,16,0,0,377,52,1,0,0,0,378,379,7,16,0,0,379,380,7,17,0,0,380,381, + 7,9,0,0,381,382,7,25,0,0,382,383,7,5,0,0,383,384,7,12,0,0,384,385, + 7,5,0,0,385,386,7,14,0,0,386,387,7,10,0,0,387,388,5,95,0,0,388,389, + 7,7,0,0,389,390,7,5,0,0,390,391,7,20,0,0,391,392,7,9,0,0,392,393, + 7,12,0,0,393,394,7,7,0,0,394,395,7,15,0,0,395,396,7,20,0,0,396,397, + 7,16,0,0,397,398,5,95,0,0,398,399,7,7,0,0,399,400,7,21,0,0,400,54, + 1,0,0,0,401,402,7,6,0,0,402,403,7,5,0,0,403,404,7,26,0,0,404,405, + 7,9,0,0,405,406,7,22,0,0,406,407,7,25,0,0,407,408,7,8,0,0,408,409, + 7,15,0,0,409,410,7,17,0,0,410,56,1,0,0,0,411,412,7,23,0,0,412,413, + 7,15,0,0,413,414,7,17,0,0,414,415,7,25,0,0,415,416,7,8,0,0,416,417, + 7,15,0,0,417,418,7,17,0,0,418,58,1,0,0,0,419,420,7,6,0,0,420,421, + 7,5,0,0,421,422,7,26,0,0,422,423,7,9,0,0,423,424,7,22,0,0,424,425, + 7,13,0,0,425,426,7,5,0,0,426,427,7,10,0,0,427,428,7,15,0,0,428,429, + 7,17,0,0,429,430,7,19,0,0,430,60,1,0,0,0,431,432,7,12,0,0,432,433, + 7,7,0,0,433,434,7,17,0,0,434,435,7,24,0,0,435,436,7,25,0,0,436,437, + 7,7,0,0,437,62,1,0,0,0,438,439,7,10,0,0,439,440,7,12,0,0,440,441, + 7,7,0,0,441,442,7,17,0,0,442,443,7,24,0,0,443,444,7,25,0,0,444,445, + 7,7,0,0,445,64,1,0,0,0,446,447,7,11,0,0,447,448,7,5,0,0,448,449, + 7,12,0,0,449,450,7,7,0,0,450,66,1,0,0,0,451,452,7,20,0,0,452,453, + 7,15,0,0,453,454,7,16,0,0,454,68,1,0,0,0,455,456,7,24,0,0,456,457, + 5,33,0,0,457,70,1,0,0,0,458,459,7,13,0,0,459,460,7,14,0,0,460,461, + 7,14,0,0,461,462,7,11,0,0,462,72,1,0,0,0,463,464,7,12,0,0,464,465, + 7,7,0,0,465,466,7,17,0,0,466,74,1,0,0,0,467,468,7,23,0,0,468,469, + 7,13,0,0,469,470,7,5,0,0,470,471,7,10,0,0,471,76,1,0,0,0,472,473, + 7,7,0,0,473,474,7,12,0,0,474,78,1,0,0,0,475,476,7,7,0,0,476,477, + 7,12,0,0,477,478,7,7,0,0,478,479,7,21,0,0,479,80,1,0,0,0,480,481, + 7,5,0,0,481,482,7,19,0,0,482,483,7,9,0,0,483,484,7,15,0,0,484,485, + 7,17,0,0,485,82,1,0,0,0,486,487,7,5,0,0,487,488,7,22,0,0,488,489, + 7,15,0,0,489,490,7,19,0,0,490,84,1,0,0,0,491,492,7,22,0,0,492,493, + 7,9,0,0,493,494,7,25,0,0,494,86,1,0,0,0,495,496,7,16,0,0,496,497, + 7,7,0,0,497,88,1,0,0,0,498,499,7,16,0,0,499,500,7,7,0,0,500,501, + 7,12,0,0,501,90,1,0,0,0,502,503,7,16,0,0,503,504,7,7,0,0,504,505, + 7,12,0,0,505,506,7,7,0,0,506,507,7,21,0,0,507,92,1,0,0,0,508,509, + 7,6,0,0,509,510,7,25,0,0,510,511,7,8,0,0,511,512,7,15,0,0,512,513, + 7,17,0,0,513,94,1,0,0,0,514,515,7,23,0,0,515,516,7,25,0,0,516,517, + 7,8,0,0,517,518,7,15,0,0,518,519,7,17,0,0,519,96,1,0,0,0,520,521, + 7,6,0,0,521,522,7,13,0,0,522,523,7,5,0,0,523,524,7,10,0,0,524,98, + 1,0,0,0,525,526,7,15,0,0,526,527,7,10,0,0,527,528,7,19,0,0,528,100, + 1,0,0,0,529,530,3,99,49,0,530,531,7,4,0,0,531,102,1,0,0,0,532,533, + 5,58,0,0,533,534,5,58,0,0,534,104,1,0,0,0,535,536,5,43,0,0,536,106, + 1,0,0,0,537,538,5,45,0,0,538,108,1,0,0,0,539,540,5,42,0,0,540,110, + 1,0,0,0,541,542,5,47,0,0,542,112,1,0,0,0,543,544,5,37,0,0,544,114, + 1,0,0,0,545,546,5,61,0,0,546,116,1,0,0,0,547,548,5,33,0,0,548,549, + 5,61,0,0,549,118,1,0,0,0,550,551,5,62,0,0,551,552,5,61,0,0,552,120, + 1,0,0,0,553,554,5,60,0,0,554,555,5,61,0,0,555,122,1,0,0,0,556,557, + 5,62,0,0,557,124,1,0,0,0,558,559,5,60,0,0,559,126,1,0,0,0,560,561, + 5,33,0,0,561,128,1,0,0,0,562,563,3,125,62,0,563,130,1,0,0,0,564, + 565,3,123,61,0,565,132,1,0,0,0,566,567,5,40,0,0,567,134,1,0,0,0, + 568,569,5,41,0,0,569,136,1,0,0,0,570,571,5,91,0,0,571,138,1,0,0, + 0,572,573,5,93,0,0,573,140,1,0,0,0,574,575,5,44,0,0,575,142,1,0, + 0,0,576,577,5,58,0,0,577,144,1,0,0,0,578,579,5,63,0,0,579,146,1, + 0,0,0,580,581,5,35,0,0,581,148,1,0,0,0,582,583,5,46,0,0,583,150, + 1,0,0,0,584,585,7,15,0,0,585,586,7,10,0,0,586,587,7,22,0,0,587,152, + 1,0,0,0,588,589,7,14,0,0,589,590,7,17,0,0,590,154,1,0,0,0,591,592, + 5,58,0,0,592,593,5,61,0,0,593,156,1,0,0,0,594,598,2,49,57,0,595, + 597,3,159,79,0,596,595,1,0,0,0,597,600,1,0,0,0,598,596,1,0,0,0,598, + 599,1,0,0,0,599,603,1,0,0,0,600,598,1,0,0,0,601,603,5,48,0,0,602, + 594,1,0,0,0,602,601,1,0,0,0,603,158,1,0,0,0,604,605,2,48,57,0,605, + 160,1,0,0,0,606,608,5,45,0,0,607,606,1,0,0,0,607,608,1,0,0,0,608, + 609,1,0,0,0,609,610,3,157,78,0,610,162,1,0,0,0,611,616,7,27,0,0, + 612,615,7,27,0,0,613,615,3,159,79,0,614,612,1,0,0,0,614,613,1,0, + 0,0,615,618,1,0,0,0,616,614,1,0,0,0,616,617,1,0,0,0,617,164,1,0, + 0,0,618,616,1,0,0,0,619,621,5,13,0,0,620,622,5,10,0,0,621,620,1, + 0,0,0,621,622,1,0,0,0,622,625,1,0,0,0,623,625,5,10,0,0,624,619,1, + 0,0,0,624,623,1,0,0,0,625,166,1,0,0,0,13,0,173,185,188,193,204,598, + 602,607,614,616,621,624,1,0,1,0 ] class SubstraitTypeLexer(Lexer): @@ -254,61 +261,63 @@ class SubstraitTypeLexer(Lexer): Interval_Day = 21 UUID = 22 Decimal = 23 - Precision_Timestamp = 24 - Precision_Timestamp_TZ = 25 - FixedChar = 26 - VarChar = 27 - FixedBinary = 28 - Struct = 29 - NStruct = 30 - List = 31 - Map = 32 - UserDefined = 33 - Bool = 34 - Str = 35 - VBin = 36 - Ts = 37 - TsTZ = 38 - IYear = 39 - IDay = 40 - Dec = 41 - PTs = 42 - PTsTZ = 43 - FChar = 44 - VChar = 45 - FBin = 46 - Any = 47 - AnyVar = 48 - DoubleColon = 49 - Plus = 50 - Minus = 51 - Asterisk = 52 - ForwardSlash = 53 - Percent = 54 - Eq = 55 - Ne = 56 - Gte = 57 - Lte = 58 - Gt = 59 - Lt = 60 - Bang = 61 - OAngleBracket = 62 - CAngleBracket = 63 - OParen = 64 - CParen = 65 - OBracket = 66 - CBracket = 67 - Comma = 68 - Colon = 69 - QMark = 70 - Hash = 71 - Dot = 72 - And = 73 - Or = 74 - Assign = 75 - Number = 76 - Identifier = 77 - Newline = 78 + Precision_Time = 24 + Precision_Timestamp = 25 + Precision_Timestamp_TZ = 26 + FixedChar = 27 + VarChar = 28 + FixedBinary = 29 + Struct = 30 + NStruct = 31 + List = 32 + Map = 33 + UserDefined = 34 + Bool = 35 + Str = 36 + VBin = 37 + Ts = 38 + TsTZ = 39 + IYear = 40 + IDay = 41 + Dec = 42 + PT = 43 + PTs = 44 + PTsTZ = 45 + FChar = 46 + VChar = 47 + FBin = 48 + Any = 49 + AnyVar = 50 + DoubleColon = 51 + Plus = 52 + Minus = 53 + Asterisk = 54 + ForwardSlash = 55 + Percent = 56 + Eq = 57 + Ne = 58 + Gte = 59 + Lte = 60 + Gt = 61 + Lt = 62 + Bang = 63 + OAngleBracket = 64 + CAngleBracket = 65 + OParen = 66 + CParen = 67 + OBracket = 68 + CBracket = 69 + Comma = 70 + Colon = 71 + QMark = 72 + Hash = 73 + Dot = 74 + And = 75 + Or = 76 + Assign = 77 + Number = 78 + Identifier = 79 + Newline = 80 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] @@ -318,40 +327,41 @@ class SubstraitTypeLexer(Lexer): "'IF'", "'THEN'", "'ELSE'", "'BOOLEAN'", "'I8'", "'I16'", "'I32'", "'I64'", "'FP32'", "'FP64'", "'STRING'", "'BINARY'", "'TIMESTAMP'", "'TIMESTAMP_TZ'", "'DATE'", "'TIME'", "'INTERVAL_YEAR'", "'INTERVAL_DAY'", - "'UUID'", "'DECIMAL'", "'PRECISION_TIMESTAMP'", "'PRECISION_TIMESTAMP_TZ'", - "'FIXEDCHAR'", "'VARCHAR'", "'FIXEDBINARY'", "'STRUCT'", "'NSTRUCT'", - "'LIST'", "'MAP'", "'U!'", "'BOOL'", "'STR'", "'VBIN'", "'TS'", - "'TSTZ'", "'IYEAR'", "'IDAY'", "'DEC'", "'PTS'", "'PTSTZ'", - "'FCHAR'", "'VCHAR'", "'FBIN'", "'ANY'", "'::'", "'+'", "'-'", - "'*'", "'/'", "'%'", "'='", "'!='", "'>='", "'<='", "'>'", "'<'", - "'!'", "'('", "')'", "'['", "']'", "','", "':'", "'?'", "'#'", - "'.'", "'AND'", "'OR'", "':='" ] + "'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 = [ "", "LineComment", "BlockComment", "Whitespace", "If", "Then", "Else", "Boolean", "I8", "I16", "I32", "I64", "FP32", "FP64", "String", "Binary", "Timestamp", "Timestamp_TZ", "Date", "Time", "Interval_Year", - "Interval_Day", "UUID", "Decimal", "Precision_Timestamp", "Precision_Timestamp_TZ", - "FixedChar", "VarChar", "FixedBinary", "Struct", "NStruct", - "List", "Map", "UserDefined", "Bool", "Str", "VBin", "Ts", "TsTZ", - "IYear", "IDay", "Dec", "PTs", "PTsTZ", "FChar", "VChar", "FBin", - "Any", "AnyVar", "DoubleColon", "Plus", "Minus", "Asterisk", - "ForwardSlash", "Percent", "Eq", "Ne", "Gte", "Lte", "Gt", "Lt", - "Bang", "OAngleBracket", "CAngleBracket", "OParen", "CParen", - "OBracket", "CBracket", "Comma", "Colon", "QMark", "Hash", "Dot", - "And", "Or", "Assign", "Number", "Identifier", "Newline" ] + "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", "OAngleBracket", "CAngleBracket", + "OParen", "CParen", "OBracket", "CBracket", "Comma", "Colon", + "QMark", "Hash", "Dot", "And", "Or", "Assign", "Number", "Identifier", + "Newline" ] ruleNames = [ "LineComment", "BlockComment", "Whitespace", "DIGIT", "If", "Then", "Else", "Boolean", "I8", "I16", "I32", "I64", "FP32", "FP64", "String", "Binary", "Timestamp", "Timestamp_TZ", "Date", "Time", "Interval_Year", "Interval_Day", "UUID", - "Decimal", "Precision_Timestamp", "Precision_Timestamp_TZ", + "Decimal", "Precision_Time", "Precision_Timestamp", "Precision_Timestamp_TZ", "FixedChar", "VarChar", "FixedBinary", "Struct", "NStruct", "List", "Map", "UserDefined", "Bool", "Str", "VBin", "Ts", - "TsTZ", "IYear", "IDay", "Dec", "PTs", "PTsTZ", "FChar", - "VChar", "FBin", "Any", "AnyVar", "DoubleColon", "Plus", - "Minus", "Asterisk", "ForwardSlash", "Percent", "Eq", - "Ne", "Gte", "Lte", "Gt", "Lt", "Bang", "OAngleBracket", + "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", "OAngleBracket", "CAngleBracket", "OParen", "CParen", "OBracket", "CBracket", "Comma", "Colon", "QMark", "Hash", "Dot", "And", "Or", "Assign", "Int", "Digit", "Number", "Identifier", "Newline" ] @@ -360,7 +370,7 @@ class SubstraitTypeLexer(Lexer): def __init__(self, input=None, output:TextIO = sys.stdout): super().__init__(input, output) - self.checkVersion("4.13.1") + self.checkVersion("4.13.2") self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._actions = None self._predicates = None diff --git a/src/substrait/gen/antlr/SubstraitTypeListener.py b/src/substrait/gen/antlr/SubstraitTypeListener.py index c18e63e..734afe7 100644 --- a/src/substrait/gen/antlr/SubstraitTypeListener.py +++ b/src/substrait/gen/antlr/SubstraitTypeListener.py @@ -1,4 +1,4 @@ -# Generated from SubstraitType.g4 by ANTLR 4.13.1 +# Generated from SubstraitType.g4 by ANTLR 4.13.2 from antlr4 import * if "." in __name__: from .SubstraitTypeParser import SubstraitTypeParser @@ -206,6 +206,15 @@ def exitPrecisionIntervalDay(self, ctx:SubstraitTypeParser.PrecisionIntervalDayC pass + # Enter a parse tree produced by SubstraitTypeParser#precisionTime. + def enterPrecisionTime(self, ctx:SubstraitTypeParser.PrecisionTimeContext): + pass + + # Exit a parse tree produced by SubstraitTypeParser#precisionTime. + def exitPrecisionTime(self, ctx:SubstraitTypeParser.PrecisionTimeContext): + pass + + # Enter a parse tree produced by SubstraitTypeParser#precisionTimestamp. def enterPrecisionTimestamp(self, ctx:SubstraitTypeParser.PrecisionTimestampContext): pass diff --git a/src/substrait/gen/antlr/SubstraitTypeParser.py b/src/substrait/gen/antlr/SubstraitTypeParser.py index 48e4b12..4a50a08 100644 --- a/src/substrait/gen/antlr/SubstraitTypeParser.py +++ b/src/substrait/gen/antlr/SubstraitTypeParser.py @@ -1,4 +1,4 @@ -# Generated from SubstraitType.g4 by ANTLR 4.13.1 +# Generated from SubstraitType.g4 by ANTLR 4.13.2 # encoding: utf-8 from antlr4 import * from io import StringIO @@ -10,107 +10,110 @@ def serializedATN(): return [ - 4,1,78,268,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, + 4,1,80,276,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,1,0,1,0,1,0,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,3,2,38,8,2,1,3,1,3,3,3,42,8,3,1,3, 1,3,1,3,1,3,1,3,1,3,3,3,50,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,58,8, 3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,66,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, 1,3,3,3,76,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,84,8,3,1,3,1,3,1,3,1, 3,1,3,1,3,3,3,92,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,100,8,3,1,3,1,3, - 1,3,1,3,5,3,106,8,3,10,3,12,3,109,9,3,1,3,1,3,1,3,1,3,3,3,115,8, - 3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,123,8,3,10,3,12,3,126,9,3,1,3,1,3, - 1,3,1,3,3,3,132,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,140,8,3,1,3,1,3, - 1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,151,8,3,1,3,1,3,1,3,1,3,5,3,157, - 8,3,10,3,12,3,160,9,3,1,3,1,3,3,3,164,8,3,3,3,166,8,3,1,4,1,4,1, - 4,3,4,171,8,4,1,5,1,5,3,5,175,8,5,1,5,1,5,3,5,179,8,5,3,5,181,8, - 5,1,6,1,6,3,6,185,8,6,1,6,1,6,3,6,189,8,6,1,7,1,7,1,7,1,7,1,7,1, - 7,1,7,1,7,1,7,4,7,200,8,7,11,7,12,7,201,1,7,1,7,1,7,1,7,4,7,208, - 8,7,11,7,12,7,209,5,7,212,8,7,10,7,12,7,215,9,7,1,7,1,7,5,7,219, - 8,7,10,7,12,7,222,9,7,1,7,1,7,1,7,1,7,3,7,228,8,7,1,7,1,7,1,7,1, - 7,1,7,5,7,235,8,7,10,7,12,7,238,9,7,3,7,240,8,7,1,7,1,7,1,7,1,7, - 1,7,1,7,1,7,1,7,1,7,1,7,3,7,252,8,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7, - 1,7,1,7,5,7,263,8,7,10,7,12,7,266,9,7,1,7,0,1,14,8,0,2,4,6,8,10, - 12,14,0,1,3,0,50,53,55,60,73,74,324,0,16,1,0,0,0,2,19,1,0,0,0,4, - 37,1,0,0,0,6,165,1,0,0,0,8,170,1,0,0,0,10,180,1,0,0,0,12,188,1,0, - 0,0,14,251,1,0,0,0,16,17,3,14,7,0,17,18,5,0,0,1,18,1,1,0,0,0,19, - 20,3,12,6,0,20,21,5,0,0,1,21,3,1,0,0,0,22,38,5,7,0,0,23,38,5,8,0, - 0,24,38,5,9,0,0,25,38,5,10,0,0,26,38,5,11,0,0,27,38,5,12,0,0,28, - 38,5,13,0,0,29,38,5,14,0,0,30,38,5,15,0,0,31,38,5,16,0,0,32,38,5, - 17,0,0,33,38,5,18,0,0,34,38,5,19,0,0,35,38,5,20,0,0,36,38,5,22,0, - 0,37,22,1,0,0,0,37,23,1,0,0,0,37,24,1,0,0,0,37,25,1,0,0,0,37,26, - 1,0,0,0,37,27,1,0,0,0,37,28,1,0,0,0,37,29,1,0,0,0,37,30,1,0,0,0, - 37,31,1,0,0,0,37,32,1,0,0,0,37,33,1,0,0,0,37,34,1,0,0,0,37,35,1, - 0,0,0,37,36,1,0,0,0,38,5,1,0,0,0,39,41,5,26,0,0,40,42,5,70,0,0,41, - 40,1,0,0,0,41,42,1,0,0,0,42,43,1,0,0,0,43,44,5,60,0,0,44,45,3,8, - 4,0,45,46,5,59,0,0,46,166,1,0,0,0,47,49,5,27,0,0,48,50,5,70,0,0, - 49,48,1,0,0,0,49,50,1,0,0,0,50,51,1,0,0,0,51,52,5,60,0,0,52,53,3, - 8,4,0,53,54,5,59,0,0,54,166,1,0,0,0,55,57,5,28,0,0,56,58,5,70,0, - 0,57,56,1,0,0,0,57,58,1,0,0,0,58,59,1,0,0,0,59,60,5,60,0,0,60,61, - 3,8,4,0,61,62,5,59,0,0,62,166,1,0,0,0,63,65,5,23,0,0,64,66,5,70, - 0,0,65,64,1,0,0,0,65,66,1,0,0,0,66,67,1,0,0,0,67,68,5,60,0,0,68, - 69,3,8,4,0,69,70,5,68,0,0,70,71,3,8,4,0,71,72,5,59,0,0,72,166,1, - 0,0,0,73,75,5,21,0,0,74,76,5,70,0,0,75,74,1,0,0,0,75,76,1,0,0,0, - 76,77,1,0,0,0,77,78,5,60,0,0,78,79,3,8,4,0,79,80,5,59,0,0,80,166, - 1,0,0,0,81,83,5,24,0,0,82,84,5,70,0,0,83,82,1,0,0,0,83,84,1,0,0, - 0,84,85,1,0,0,0,85,86,5,60,0,0,86,87,3,8,4,0,87,88,5,59,0,0,88,166, - 1,0,0,0,89,91,5,25,0,0,90,92,5,70,0,0,91,90,1,0,0,0,91,92,1,0,0, - 0,92,93,1,0,0,0,93,94,5,60,0,0,94,95,3,8,4,0,95,96,5,59,0,0,96,166, - 1,0,0,0,97,99,5,29,0,0,98,100,5,70,0,0,99,98,1,0,0,0,99,100,1,0, - 0,0,100,101,1,0,0,0,101,102,5,60,0,0,102,107,3,14,7,0,103,104,5, - 68,0,0,104,106,3,14,7,0,105,103,1,0,0,0,106,109,1,0,0,0,107,105, - 1,0,0,0,107,108,1,0,0,0,108,110,1,0,0,0,109,107,1,0,0,0,110,111, - 5,59,0,0,111,166,1,0,0,0,112,114,5,30,0,0,113,115,5,70,0,0,114,113, - 1,0,0,0,114,115,1,0,0,0,115,116,1,0,0,0,116,117,5,60,0,0,117,118, - 5,77,0,0,118,124,3,14,7,0,119,120,5,68,0,0,120,121,5,77,0,0,121, - 123,3,14,7,0,122,119,1,0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,124, - 125,1,0,0,0,125,127,1,0,0,0,126,124,1,0,0,0,127,128,5,59,0,0,128, - 166,1,0,0,0,129,131,5,31,0,0,130,132,5,70,0,0,131,130,1,0,0,0,131, - 132,1,0,0,0,132,133,1,0,0,0,133,134,5,60,0,0,134,135,3,14,7,0,135, - 136,5,59,0,0,136,166,1,0,0,0,137,139,5,32,0,0,138,140,5,70,0,0,139, - 138,1,0,0,0,139,140,1,0,0,0,140,141,1,0,0,0,141,142,5,60,0,0,142, - 143,3,14,7,0,143,144,5,68,0,0,144,145,3,14,7,0,145,146,5,59,0,0, - 146,166,1,0,0,0,147,148,5,33,0,0,148,150,5,77,0,0,149,151,5,70,0, - 0,150,149,1,0,0,0,150,151,1,0,0,0,151,163,1,0,0,0,152,153,5,60,0, - 0,153,158,3,14,7,0,154,155,5,68,0,0,155,157,3,14,7,0,156,154,1,0, - 0,0,157,160,1,0,0,0,158,156,1,0,0,0,158,159,1,0,0,0,159,161,1,0, - 0,0,160,158,1,0,0,0,161,162,5,59,0,0,162,164,1,0,0,0,163,152,1,0, - 0,0,163,164,1,0,0,0,164,166,1,0,0,0,165,39,1,0,0,0,165,47,1,0,0, - 0,165,55,1,0,0,0,165,63,1,0,0,0,165,73,1,0,0,0,165,81,1,0,0,0,165, - 89,1,0,0,0,165,97,1,0,0,0,165,112,1,0,0,0,165,129,1,0,0,0,165,137, - 1,0,0,0,165,147,1,0,0,0,166,7,1,0,0,0,167,171,5,76,0,0,168,171,5, - 77,0,0,169,171,3,14,7,0,170,167,1,0,0,0,170,168,1,0,0,0,170,169, - 1,0,0,0,171,9,1,0,0,0,172,174,5,47,0,0,173,175,5,70,0,0,174,173, - 1,0,0,0,174,175,1,0,0,0,175,181,1,0,0,0,176,178,5,48,0,0,177,179, - 5,70,0,0,178,177,1,0,0,0,178,179,1,0,0,0,179,181,1,0,0,0,180,172, - 1,0,0,0,180,176,1,0,0,0,181,11,1,0,0,0,182,184,3,4,2,0,183,185,5, - 70,0,0,184,183,1,0,0,0,184,185,1,0,0,0,185,189,1,0,0,0,186,189,3, - 6,3,0,187,189,3,10,5,0,188,182,1,0,0,0,188,186,1,0,0,0,188,187,1, - 0,0,0,189,13,1,0,0,0,190,191,6,7,-1,0,191,192,5,64,0,0,192,193,3, - 14,7,0,193,194,5,65,0,0,194,252,1,0,0,0,195,196,5,77,0,0,196,197, - 5,55,0,0,197,199,3,14,7,0,198,200,5,78,0,0,199,198,1,0,0,0,200,201, - 1,0,0,0,201,199,1,0,0,0,201,202,1,0,0,0,202,213,1,0,0,0,203,204, - 5,77,0,0,204,205,5,55,0,0,205,207,3,14,7,0,206,208,5,78,0,0,207, - 206,1,0,0,0,208,209,1,0,0,0,209,207,1,0,0,0,209,210,1,0,0,0,210, - 212,1,0,0,0,211,203,1,0,0,0,212,215,1,0,0,0,213,211,1,0,0,0,213, - 214,1,0,0,0,214,216,1,0,0,0,215,213,1,0,0,0,216,220,3,12,6,0,217, - 219,5,78,0,0,218,217,1,0,0,0,219,222,1,0,0,0,220,218,1,0,0,0,220, - 221,1,0,0,0,221,252,1,0,0,0,222,220,1,0,0,0,223,252,3,12,6,0,224, - 252,5,76,0,0,225,227,5,77,0,0,226,228,5,70,0,0,227,226,1,0,0,0,227, - 228,1,0,0,0,228,252,1,0,0,0,229,230,5,77,0,0,230,239,5,64,0,0,231, - 236,3,14,7,0,232,233,5,68,0,0,233,235,3,14,7,0,234,232,1,0,0,0,235, - 238,1,0,0,0,236,234,1,0,0,0,236,237,1,0,0,0,237,240,1,0,0,0,238, - 236,1,0,0,0,239,231,1,0,0,0,239,240,1,0,0,0,240,241,1,0,0,0,241, - 252,5,65,0,0,242,243,5,4,0,0,243,244,3,14,7,0,244,245,5,5,0,0,245, - 246,3,14,7,0,246,247,5,6,0,0,247,248,3,14,7,3,248,252,1,0,0,0,249, - 250,5,61,0,0,250,252,3,14,7,2,251,190,1,0,0,0,251,195,1,0,0,0,251, - 223,1,0,0,0,251,224,1,0,0,0,251,225,1,0,0,0,251,229,1,0,0,0,251, - 242,1,0,0,0,251,249,1,0,0,0,252,264,1,0,0,0,253,254,10,4,0,0,254, - 255,7,0,0,0,255,263,3,14,7,5,256,257,10,1,0,0,257,258,5,70,0,0,258, - 259,3,14,7,0,259,260,5,69,0,0,260,261,3,14,7,2,261,263,1,0,0,0,262, - 253,1,0,0,0,262,256,1,0,0,0,263,266,1,0,0,0,264,262,1,0,0,0,264, - 265,1,0,0,0,265,15,1,0,0,0,266,264,1,0,0,0,34,37,41,49,57,65,75, - 83,91,99,107,114,124,131,139,150,158,163,165,170,174,178,180,184, - 188,201,209,213,220,227,236,239,251,262,264 + 1,3,1,3,1,3,1,3,3,3,108,8,3,1,3,1,3,1,3,1,3,5,3,114,8,3,10,3,12, + 3,117,9,3,1,3,1,3,1,3,1,3,3,3,123,8,3,1,3,1,3,1,3,1,3,1,3,1,3,5, + 3,131,8,3,10,3,12,3,134,9,3,1,3,1,3,1,3,1,3,3,3,140,8,3,1,3,1,3, + 1,3,1,3,1,3,1,3,3,3,148,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, + 3,3,159,8,3,1,3,1,3,1,3,1,3,5,3,165,8,3,10,3,12,3,168,9,3,1,3,1, + 3,3,3,172,8,3,3,3,174,8,3,1,4,1,4,1,4,3,4,179,8,4,1,5,1,5,3,5,183, + 8,5,1,5,1,5,3,5,187,8,5,3,5,189,8,5,1,6,1,6,3,6,193,8,6,1,6,1,6, + 3,6,197,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,4,7,208,8,7,11,7, + 12,7,209,1,7,1,7,1,7,1,7,4,7,216,8,7,11,7,12,7,217,5,7,220,8,7,10, + 7,12,7,223,9,7,1,7,1,7,5,7,227,8,7,10,7,12,7,230,9,7,1,7,1,7,1,7, + 1,7,3,7,236,8,7,1,7,1,7,1,7,1,7,1,7,5,7,243,8,7,10,7,12,7,246,9, + 7,3,7,248,8,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,3,7,260,8, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,5,7,271,8,7,10,7,12,7,274, + 9,7,1,7,0,1,14,8,0,2,4,6,8,10,12,14,0,1,3,0,52,55,57,62,75,76,334, + 0,16,1,0,0,0,2,19,1,0,0,0,4,37,1,0,0,0,6,173,1,0,0,0,8,178,1,0,0, + 0,10,188,1,0,0,0,12,196,1,0,0,0,14,259,1,0,0,0,16,17,3,14,7,0,17, + 18,5,0,0,1,18,1,1,0,0,0,19,20,3,12,6,0,20,21,5,0,0,1,21,3,1,0,0, + 0,22,38,5,7,0,0,23,38,5,8,0,0,24,38,5,9,0,0,25,38,5,10,0,0,26,38, + 5,11,0,0,27,38,5,12,0,0,28,38,5,13,0,0,29,38,5,14,0,0,30,38,5,15, + 0,0,31,38,5,16,0,0,32,38,5,17,0,0,33,38,5,18,0,0,34,38,5,19,0,0, + 35,38,5,20,0,0,36,38,5,22,0,0,37,22,1,0,0,0,37,23,1,0,0,0,37,24, + 1,0,0,0,37,25,1,0,0,0,37,26,1,0,0,0,37,27,1,0,0,0,37,28,1,0,0,0, + 37,29,1,0,0,0,37,30,1,0,0,0,37,31,1,0,0,0,37,32,1,0,0,0,37,33,1, + 0,0,0,37,34,1,0,0,0,37,35,1,0,0,0,37,36,1,0,0,0,38,5,1,0,0,0,39, + 41,5,27,0,0,40,42,5,72,0,0,41,40,1,0,0,0,41,42,1,0,0,0,42,43,1,0, + 0,0,43,44,5,62,0,0,44,45,3,8,4,0,45,46,5,61,0,0,46,174,1,0,0,0,47, + 49,5,28,0,0,48,50,5,72,0,0,49,48,1,0,0,0,49,50,1,0,0,0,50,51,1,0, + 0,0,51,52,5,62,0,0,52,53,3,8,4,0,53,54,5,61,0,0,54,174,1,0,0,0,55, + 57,5,29,0,0,56,58,5,72,0,0,57,56,1,0,0,0,57,58,1,0,0,0,58,59,1,0, + 0,0,59,60,5,62,0,0,60,61,3,8,4,0,61,62,5,61,0,0,62,174,1,0,0,0,63, + 65,5,23,0,0,64,66,5,72,0,0,65,64,1,0,0,0,65,66,1,0,0,0,66,67,1,0, + 0,0,67,68,5,62,0,0,68,69,3,8,4,0,69,70,5,70,0,0,70,71,3,8,4,0,71, + 72,5,61,0,0,72,174,1,0,0,0,73,75,5,21,0,0,74,76,5,72,0,0,75,74,1, + 0,0,0,75,76,1,0,0,0,76,77,1,0,0,0,77,78,5,62,0,0,78,79,3,8,4,0,79, + 80,5,61,0,0,80,174,1,0,0,0,81,83,5,24,0,0,82,84,5,72,0,0,83,82,1, + 0,0,0,83,84,1,0,0,0,84,85,1,0,0,0,85,86,5,62,0,0,86,87,3,8,4,0,87, + 88,5,61,0,0,88,174,1,0,0,0,89,91,5,25,0,0,90,92,5,72,0,0,91,90,1, + 0,0,0,91,92,1,0,0,0,92,93,1,0,0,0,93,94,5,62,0,0,94,95,3,8,4,0,95, + 96,5,61,0,0,96,174,1,0,0,0,97,99,5,26,0,0,98,100,5,72,0,0,99,98, + 1,0,0,0,99,100,1,0,0,0,100,101,1,0,0,0,101,102,5,62,0,0,102,103, + 3,8,4,0,103,104,5,61,0,0,104,174,1,0,0,0,105,107,5,30,0,0,106,108, + 5,72,0,0,107,106,1,0,0,0,107,108,1,0,0,0,108,109,1,0,0,0,109,110, + 5,62,0,0,110,115,3,14,7,0,111,112,5,70,0,0,112,114,3,14,7,0,113, + 111,1,0,0,0,114,117,1,0,0,0,115,113,1,0,0,0,115,116,1,0,0,0,116, + 118,1,0,0,0,117,115,1,0,0,0,118,119,5,61,0,0,119,174,1,0,0,0,120, + 122,5,31,0,0,121,123,5,72,0,0,122,121,1,0,0,0,122,123,1,0,0,0,123, + 124,1,0,0,0,124,125,5,62,0,0,125,126,5,79,0,0,126,132,3,14,7,0,127, + 128,5,70,0,0,128,129,5,79,0,0,129,131,3,14,7,0,130,127,1,0,0,0,131, + 134,1,0,0,0,132,130,1,0,0,0,132,133,1,0,0,0,133,135,1,0,0,0,134, + 132,1,0,0,0,135,136,5,61,0,0,136,174,1,0,0,0,137,139,5,32,0,0,138, + 140,5,72,0,0,139,138,1,0,0,0,139,140,1,0,0,0,140,141,1,0,0,0,141, + 142,5,62,0,0,142,143,3,14,7,0,143,144,5,61,0,0,144,174,1,0,0,0,145, + 147,5,33,0,0,146,148,5,72,0,0,147,146,1,0,0,0,147,148,1,0,0,0,148, + 149,1,0,0,0,149,150,5,62,0,0,150,151,3,14,7,0,151,152,5,70,0,0,152, + 153,3,14,7,0,153,154,5,61,0,0,154,174,1,0,0,0,155,156,5,34,0,0,156, + 158,5,79,0,0,157,159,5,72,0,0,158,157,1,0,0,0,158,159,1,0,0,0,159, + 171,1,0,0,0,160,161,5,62,0,0,161,166,3,14,7,0,162,163,5,70,0,0,163, + 165,3,14,7,0,164,162,1,0,0,0,165,168,1,0,0,0,166,164,1,0,0,0,166, + 167,1,0,0,0,167,169,1,0,0,0,168,166,1,0,0,0,169,170,5,61,0,0,170, + 172,1,0,0,0,171,160,1,0,0,0,171,172,1,0,0,0,172,174,1,0,0,0,173, + 39,1,0,0,0,173,47,1,0,0,0,173,55,1,0,0,0,173,63,1,0,0,0,173,73,1, + 0,0,0,173,81,1,0,0,0,173,89,1,0,0,0,173,97,1,0,0,0,173,105,1,0,0, + 0,173,120,1,0,0,0,173,137,1,0,0,0,173,145,1,0,0,0,173,155,1,0,0, + 0,174,7,1,0,0,0,175,179,5,78,0,0,176,179,5,79,0,0,177,179,3,14,7, + 0,178,175,1,0,0,0,178,176,1,0,0,0,178,177,1,0,0,0,179,9,1,0,0,0, + 180,182,5,49,0,0,181,183,5,72,0,0,182,181,1,0,0,0,182,183,1,0,0, + 0,183,189,1,0,0,0,184,186,5,50,0,0,185,187,5,72,0,0,186,185,1,0, + 0,0,186,187,1,0,0,0,187,189,1,0,0,0,188,180,1,0,0,0,188,184,1,0, + 0,0,189,11,1,0,0,0,190,192,3,4,2,0,191,193,5,72,0,0,192,191,1,0, + 0,0,192,193,1,0,0,0,193,197,1,0,0,0,194,197,3,6,3,0,195,197,3,10, + 5,0,196,190,1,0,0,0,196,194,1,0,0,0,196,195,1,0,0,0,197,13,1,0,0, + 0,198,199,6,7,-1,0,199,200,5,66,0,0,200,201,3,14,7,0,201,202,5,67, + 0,0,202,260,1,0,0,0,203,204,5,79,0,0,204,205,5,57,0,0,205,207,3, + 14,7,0,206,208,5,80,0,0,207,206,1,0,0,0,208,209,1,0,0,0,209,207, + 1,0,0,0,209,210,1,0,0,0,210,221,1,0,0,0,211,212,5,79,0,0,212,213, + 5,57,0,0,213,215,3,14,7,0,214,216,5,80,0,0,215,214,1,0,0,0,216,217, + 1,0,0,0,217,215,1,0,0,0,217,218,1,0,0,0,218,220,1,0,0,0,219,211, + 1,0,0,0,220,223,1,0,0,0,221,219,1,0,0,0,221,222,1,0,0,0,222,224, + 1,0,0,0,223,221,1,0,0,0,224,228,3,12,6,0,225,227,5,80,0,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,260, + 1,0,0,0,230,228,1,0,0,0,231,260,3,12,6,0,232,260,5,78,0,0,233,235, + 5,79,0,0,234,236,5,72,0,0,235,234,1,0,0,0,235,236,1,0,0,0,236,260, + 1,0,0,0,237,238,5,79,0,0,238,247,5,66,0,0,239,244,3,14,7,0,240,241, + 5,70,0,0,241,243,3,14,7,0,242,240,1,0,0,0,243,246,1,0,0,0,244,242, + 1,0,0,0,244,245,1,0,0,0,245,248,1,0,0,0,246,244,1,0,0,0,247,239, + 1,0,0,0,247,248,1,0,0,0,248,249,1,0,0,0,249,260,5,67,0,0,250,251, + 5,4,0,0,251,252,3,14,7,0,252,253,5,5,0,0,253,254,3,14,7,0,254,255, + 5,6,0,0,255,256,3,14,7,3,256,260,1,0,0,0,257,258,5,63,0,0,258,260, + 3,14,7,2,259,198,1,0,0,0,259,203,1,0,0,0,259,231,1,0,0,0,259,232, + 1,0,0,0,259,233,1,0,0,0,259,237,1,0,0,0,259,250,1,0,0,0,259,257, + 1,0,0,0,260,272,1,0,0,0,261,262,10,4,0,0,262,263,7,0,0,0,263,271, + 3,14,7,5,264,265,10,1,0,0,265,266,5,72,0,0,266,267,3,14,7,0,267, + 268,5,71,0,0,268,269,3,14,7,2,269,271,1,0,0,0,270,261,1,0,0,0,270, + 264,1,0,0,0,271,274,1,0,0,0,272,270,1,0,0,0,272,273,1,0,0,0,273, + 15,1,0,0,0,274,272,1,0,0,0,35,37,41,49,57,65,75,83,91,99,107,115, + 122,132,139,147,158,166,171,173,178,182,186,188,192,196,209,217, + 221,228,235,244,247,259,270,272 ] class SubstraitTypeParser ( Parser ): @@ -128,11 +131,11 @@ class SubstraitTypeParser ( Parser ): "'I32'", "'I64'", "'FP32'", "'FP64'", "'STRING'", "'BINARY'", "'TIMESTAMP'", "'TIMESTAMP_TZ'", "'DATE'", "'TIME'", "'INTERVAL_YEAR'", "'INTERVAL_DAY'", "'UUID'", "'DECIMAL'", - "'PRECISION_TIMESTAMP'", "'PRECISION_TIMESTAMP_TZ'", + "'PRECISION_TIME'", "'PRECISION_TIMESTAMP'", "'PRECISION_TIMESTAMP_TZ'", "'FIXEDCHAR'", "'VARCHAR'", "'FIXEDBINARY'", "'STRUCT'", "'NSTRUCT'", "'LIST'", "'MAP'", "'U!'", "'BOOL'", "'STR'", "'VBIN'", "'TS'", "'TSTZ'", "'IYEAR'", "'IDAY'", "'DEC'", - "'PTS'", "'PTSTZ'", "'FCHAR'", "'VCHAR'", "'FBIN'", + "'PT'", "'PTS'", "'PTSTZ'", "'FCHAR'", "'VCHAR'", "'FBIN'", "'ANY'", "", "'::'", "'+'", "'-'", "'*'", "'/'", "'%'", "'='", "'!='", "'>='", "'<='", "'>'", "'<'", "'!'", "", "", "'('", "')'", @@ -143,13 +146,14 @@ class SubstraitTypeParser ( Parser ): "If", "Then", "Else", "Boolean", "I8", "I16", "I32", "I64", "FP32", "FP64", "String", "Binary", "Timestamp", "Timestamp_TZ", "Date", "Time", "Interval_Year", "Interval_Day", - "UUID", "Decimal", "Precision_Timestamp", "Precision_Timestamp_TZ", - "FixedChar", "VarChar", "FixedBinary", "Struct", "NStruct", - "List", "Map", "UserDefined", "Bool", "Str", "VBin", - "Ts", "TsTZ", "IYear", "IDay", "Dec", "PTs", "PTsTZ", - "FChar", "VChar", "FBin", "Any", "AnyVar", "DoubleColon", - "Plus", "Minus", "Asterisk", "ForwardSlash", "Percent", - "Eq", "Ne", "Gte", "Lte", "Gt", "Lt", "Bang", "OAngleBracket", + "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", "OAngleBracket", "CAngleBracket", "OParen", "CParen", "OBracket", "CBracket", "Comma", "Colon", "QMark", "Hash", "Dot", "And", "Or", "Assign", "Number", "Identifier", "Newline" ] @@ -190,65 +194,67 @@ class SubstraitTypeParser ( Parser ): Interval_Day=21 UUID=22 Decimal=23 - Precision_Timestamp=24 - Precision_Timestamp_TZ=25 - FixedChar=26 - VarChar=27 - FixedBinary=28 - Struct=29 - NStruct=30 - List=31 - Map=32 - UserDefined=33 - Bool=34 - Str=35 - VBin=36 - Ts=37 - TsTZ=38 - IYear=39 - IDay=40 - Dec=41 - PTs=42 - PTsTZ=43 - FChar=44 - VChar=45 - FBin=46 - Any=47 - AnyVar=48 - DoubleColon=49 - Plus=50 - Minus=51 - Asterisk=52 - ForwardSlash=53 - Percent=54 - Eq=55 - Ne=56 - Gte=57 - Lte=58 - Gt=59 - Lt=60 - Bang=61 - OAngleBracket=62 - CAngleBracket=63 - OParen=64 - CParen=65 - OBracket=66 - CBracket=67 - Comma=68 - Colon=69 - QMark=70 - Hash=71 - Dot=72 - And=73 - Or=74 - Assign=75 - Number=76 - Identifier=77 - Newline=78 + Precision_Time=24 + Precision_Timestamp=25 + Precision_Timestamp_TZ=26 + FixedChar=27 + VarChar=28 + FixedBinary=29 + Struct=30 + NStruct=31 + List=32 + Map=33 + UserDefined=34 + Bool=35 + Str=36 + VBin=37 + Ts=38 + TsTZ=39 + IYear=40 + IDay=41 + Dec=42 + PT=43 + PTs=44 + PTsTZ=45 + FChar=46 + VChar=47 + FBin=48 + Any=49 + AnyVar=50 + DoubleColon=51 + Plus=52 + Minus=53 + Asterisk=54 + ForwardSlash=55 + Percent=56 + Eq=57 + Ne=58 + Gte=59 + Lte=60 + Gt=61 + Lt=62 + Bang=63 + OAngleBracket=64 + CAngleBracket=65 + OParen=66 + CParen=67 + OBracket=68 + CBracket=69 + Comma=70 + Colon=71 + QMark=72 + Hash=73 + Dot=74 + And=75 + Or=76 + Assign=77 + Number=78 + Identifier=79 + Newline=80 def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) - self.checkVersion("4.13.1") + self.checkVersion("4.13.2") self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._predicates = None @@ -870,35 +876,6 @@ def exitRule(self, listener:ParseTreeListener): listener.exitNStruct(self) - class VarCharContext(ParameterizedTypeContext): - - def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypeParser.ParameterizedTypeContext - super().__init__(parser) - self.isnull = None # Token - self.length = None # NumericParameterContext - self.copyFrom(ctx) - - def VarChar(self): - return self.getToken(SubstraitTypeParser.VarChar, 0) - def Lt(self): - return self.getToken(SubstraitTypeParser.Lt, 0) - def Gt(self): - return self.getToken(SubstraitTypeParser.Gt, 0) - def numericParameter(self): - return self.getTypedRuleContext(SubstraitTypeParser.NumericParameterContext,0) - - def QMark(self): - return self.getToken(SubstraitTypeParser.QMark, 0) - - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterVarChar" ): - listener.enterVarChar(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitVarChar" ): - listener.exitVarChar(self) - - class FixedBinaryContext(ParameterizedTypeContext): def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypeParser.ParameterizedTypeContext @@ -966,7 +943,64 @@ def exitRule(self, listener:ParseTreeListener): listener.exitUserDefined(self) - class PrecisionTimestampContext(ParameterizedTypeContext): + class FixedCharContext(ParameterizedTypeContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypeParser.ParameterizedTypeContext + super().__init__(parser) + self.isnull = None # Token + self.length = None # NumericParameterContext + self.copyFrom(ctx) + + def FixedChar(self): + return self.getToken(SubstraitTypeParser.FixedChar, 0) + def Lt(self): + return self.getToken(SubstraitTypeParser.Lt, 0) + def Gt(self): + return self.getToken(SubstraitTypeParser.Gt, 0) + def numericParameter(self): + return self.getTypedRuleContext(SubstraitTypeParser.NumericParameterContext,0) + + def QMark(self): + return self.getToken(SubstraitTypeParser.QMark, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFixedChar" ): + listener.enterFixedChar(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFixedChar" ): + listener.exitFixedChar(self) + + + class ListContext(ParameterizedTypeContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypeParser.ParameterizedTypeContext + super().__init__(parser) + self.isnull = None # Token + self.copyFrom(ctx) + + def List(self): + return self.getToken(SubstraitTypeParser.List, 0) + def Lt(self): + return self.getToken(SubstraitTypeParser.Lt, 0) + def expr(self): + return self.getTypedRuleContext(SubstraitTypeParser.ExprContext,0) + + def Gt(self): + return self.getToken(SubstraitTypeParser.Gt, 0) + def QMark(self): + return self.getToken(SubstraitTypeParser.QMark, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterList" ): + listener.enterList(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitList" ): + listener.exitList(self) + + + class PrecisionIntervalDayContext(ParameterizedTypeContext): def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypeParser.ParameterizedTypeContext super().__init__(parser) @@ -974,8 +1008,8 @@ def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypePar self.precision = None # NumericParameterContext self.copyFrom(ctx) - def Precision_Timestamp(self): - return self.getToken(SubstraitTypeParser.Precision_Timestamp, 0) + def Interval_Day(self): + return self.getToken(SubstraitTypeParser.Interval_Day, 0) def Lt(self): return self.getToken(SubstraitTypeParser.Lt, 0) def Gt(self): @@ -987,15 +1021,15 @@ def QMark(self): return self.getToken(SubstraitTypeParser.QMark, 0) def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterPrecisionTimestamp" ): - listener.enterPrecisionTimestamp(self) + if hasattr( listener, "enterPrecisionIntervalDay" ): + listener.enterPrecisionIntervalDay(self) def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitPrecisionTimestamp" ): - listener.exitPrecisionTimestamp(self) + if hasattr( listener, "exitPrecisionIntervalDay" ): + listener.exitPrecisionIntervalDay(self) - class FixedCharContext(ParameterizedTypeContext): + class VarCharContext(ParameterizedTypeContext): def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypeParser.ParameterizedTypeContext super().__init__(parser) @@ -1003,8 +1037,8 @@ def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypePar self.length = None # NumericParameterContext self.copyFrom(ctx) - def FixedChar(self): - return self.getToken(SubstraitTypeParser.FixedChar, 0) + def VarChar(self): + return self.getToken(SubstraitTypeParser.VarChar, 0) def Lt(self): return self.getToken(SubstraitTypeParser.Lt, 0) def Gt(self): @@ -1016,12 +1050,41 @@ def QMark(self): return self.getToken(SubstraitTypeParser.QMark, 0) def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterFixedChar" ): - listener.enterFixedChar(self) + if hasattr( listener, "enterVarChar" ): + listener.enterVarChar(self) def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitFixedChar" ): - listener.exitFixedChar(self) + if hasattr( listener, "exitVarChar" ): + listener.exitVarChar(self) + + + class PrecisionTimestampContext(ParameterizedTypeContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypeParser.ParameterizedTypeContext + super().__init__(parser) + self.isnull = None # Token + self.precision = None # NumericParameterContext + self.copyFrom(ctx) + + def Precision_Timestamp(self): + return self.getToken(SubstraitTypeParser.Precision_Timestamp, 0) + def Lt(self): + return self.getToken(SubstraitTypeParser.Lt, 0) + def Gt(self): + return self.getToken(SubstraitTypeParser.Gt, 0) + def numericParameter(self): + return self.getTypedRuleContext(SubstraitTypeParser.NumericParameterContext,0) + + def QMark(self): + return self.getToken(SubstraitTypeParser.QMark, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPrecisionTimestamp" ): + listener.enterPrecisionTimestamp(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPrecisionTimestamp" ): + listener.exitPrecisionTimestamp(self) class DecimalContext(ParameterizedTypeContext): @@ -1059,32 +1122,33 @@ def exitRule(self, listener:ParseTreeListener): listener.exitDecimal(self) - class ListContext(ParameterizedTypeContext): + class PrecisionTimeContext(ParameterizedTypeContext): def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypeParser.ParameterizedTypeContext super().__init__(parser) self.isnull = None # Token + self.precision = None # NumericParameterContext self.copyFrom(ctx) - def List(self): - return self.getToken(SubstraitTypeParser.List, 0) + def Precision_Time(self): + return self.getToken(SubstraitTypeParser.Precision_Time, 0) def Lt(self): return self.getToken(SubstraitTypeParser.Lt, 0) - def expr(self): - return self.getTypedRuleContext(SubstraitTypeParser.ExprContext,0) - def Gt(self): return self.getToken(SubstraitTypeParser.Gt, 0) + def numericParameter(self): + return self.getTypedRuleContext(SubstraitTypeParser.NumericParameterContext,0) + def QMark(self): return self.getToken(SubstraitTypeParser.QMark, 0) def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterList" ): - listener.enterList(self) + if hasattr( listener, "enterPrecisionTime" ): + listener.enterPrecisionTime(self) def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitList" ): - listener.exitList(self) + if hasattr( listener, "exitPrecisionTime" ): + listener.exitPrecisionTime(self) class MapContext(ParameterizedTypeContext): @@ -1122,35 +1186,6 @@ def exitRule(self, listener:ParseTreeListener): listener.exitMap(self) - class PrecisionIntervalDayContext(ParameterizedTypeContext): - - def __init__(self, parser, ctx:ParserRuleContext): # actually a SubstraitTypeParser.ParameterizedTypeContext - super().__init__(parser) - self.isnull = None # Token - self.precision = None # NumericParameterContext - self.copyFrom(ctx) - - def Interval_Day(self): - return self.getToken(SubstraitTypeParser.Interval_Day, 0) - def Lt(self): - return self.getToken(SubstraitTypeParser.Lt, 0) - def Gt(self): - return self.getToken(SubstraitTypeParser.Gt, 0) - def numericParameter(self): - return self.getTypedRuleContext(SubstraitTypeParser.NumericParameterContext,0) - - def QMark(self): - return self.getToken(SubstraitTypeParser.QMark, 0) - - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterPrecisionIntervalDay" ): - listener.enterPrecisionIntervalDay(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitPrecisionIntervalDay" ): - listener.exitPrecisionIntervalDay(self) - - def parameterizedType(self): @@ -1158,10 +1193,10 @@ def parameterizedType(self): self.enterRule(localctx, 6, self.RULE_parameterizedType) self._la = 0 # Token type try: - self.state = 165 + self.state = 173 self._errHandler.sync(self) token = self._input.LA(1) - if token in [26]: + if token in [27]: localctx = SubstraitTypeParser.FixedCharContext(self, localctx) self.enterOuterAlt(localctx, 1) self.state = 39 @@ -1169,7 +1204,7 @@ def parameterizedType(self): self.state = 41 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: + if _la==72: self.state = 40 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -1181,7 +1216,7 @@ def parameterizedType(self): self.state = 45 self.match(SubstraitTypeParser.Gt) pass - elif token in [27]: + elif token in [28]: localctx = SubstraitTypeParser.VarCharContext(self, localctx) self.enterOuterAlt(localctx, 2) self.state = 47 @@ -1189,7 +1224,7 @@ def parameterizedType(self): self.state = 49 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: + if _la==72: self.state = 48 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -1201,7 +1236,7 @@ def parameterizedType(self): self.state = 53 self.match(SubstraitTypeParser.Gt) pass - elif token in [28]: + elif token in [29]: localctx = SubstraitTypeParser.FixedBinaryContext(self, localctx) self.enterOuterAlt(localctx, 3) self.state = 55 @@ -1209,7 +1244,7 @@ def parameterizedType(self): self.state = 57 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: + if _la==72: self.state = 56 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -1229,7 +1264,7 @@ def parameterizedType(self): self.state = 65 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: + if _la==72: self.state = 64 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -1253,7 +1288,7 @@ def parameterizedType(self): self.state = 75 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: + if _la==72: self.state = 74 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -1266,14 +1301,14 @@ def parameterizedType(self): self.match(SubstraitTypeParser.Gt) pass elif token in [24]: - localctx = SubstraitTypeParser.PrecisionTimestampContext(self, localctx) + localctx = SubstraitTypeParser.PrecisionTimeContext(self, localctx) self.enterOuterAlt(localctx, 6) self.state = 81 - self.match(SubstraitTypeParser.Precision_Timestamp) + self.match(SubstraitTypeParser.Precision_Time) self.state = 83 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: + if _la==72: self.state = 82 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -1286,14 +1321,14 @@ def parameterizedType(self): self.match(SubstraitTypeParser.Gt) pass elif token in [25]: - localctx = SubstraitTypeParser.PrecisionTimestampTZContext(self, localctx) + localctx = SubstraitTypeParser.PrecisionTimestampContext(self, localctx) self.enterOuterAlt(localctx, 7) self.state = 89 - self.match(SubstraitTypeParser.Precision_Timestamp_TZ) + self.match(SubstraitTypeParser.Precision_Timestamp) self.state = 91 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: + if _la==72: self.state = 90 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -1305,15 +1340,15 @@ def parameterizedType(self): self.state = 95 self.match(SubstraitTypeParser.Gt) pass - elif token in [29]: - localctx = SubstraitTypeParser.StructContext(self, localctx) + elif token in [26]: + localctx = SubstraitTypeParser.PrecisionTimestampTZContext(self, localctx) self.enterOuterAlt(localctx, 8) self.state = 97 - self.match(SubstraitTypeParser.Struct) + self.match(SubstraitTypeParser.Precision_Timestamp_TZ) self.state = 99 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: + if _la==72: self.state = 98 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -1321,138 +1356,158 @@ def parameterizedType(self): self.state = 101 self.match(SubstraitTypeParser.Lt) self.state = 102 - self.expr(0) + localctx.precision = self.numericParameter() + self.state = 103 + self.match(SubstraitTypeParser.Gt) + pass + elif token in [30]: + localctx = SubstraitTypeParser.StructContext(self, localctx) + self.enterOuterAlt(localctx, 9) + self.state = 105 + self.match(SubstraitTypeParser.Struct) self.state = 107 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==68: - self.state = 103 + if _la==72: + self.state = 106 + localctx.isnull = self.match(SubstraitTypeParser.QMark) + + + self.state = 109 + self.match(SubstraitTypeParser.Lt) + self.state = 110 + self.expr(0) + self.state = 115 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==70: + self.state = 111 self.match(SubstraitTypeParser.Comma) - self.state = 104 + self.state = 112 self.expr(0) - self.state = 109 + self.state = 117 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 110 + self.state = 118 self.match(SubstraitTypeParser.Gt) pass - elif token in [30]: + elif token in [31]: localctx = SubstraitTypeParser.NStructContext(self, localctx) - self.enterOuterAlt(localctx, 9) - self.state = 112 + self.enterOuterAlt(localctx, 10) + self.state = 120 self.match(SubstraitTypeParser.NStruct) - self.state = 114 + self.state = 122 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: - self.state = 113 + if _la==72: + self.state = 121 localctx.isnull = self.match(SubstraitTypeParser.QMark) - self.state = 116 + self.state = 124 self.match(SubstraitTypeParser.Lt) - self.state = 117 + self.state = 125 self.match(SubstraitTypeParser.Identifier) - self.state = 118 + self.state = 126 self.expr(0) - self.state = 124 + self.state = 132 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==68: - self.state = 119 + while _la==70: + self.state = 127 self.match(SubstraitTypeParser.Comma) - self.state = 120 + self.state = 128 self.match(SubstraitTypeParser.Identifier) - self.state = 121 + self.state = 129 self.expr(0) - self.state = 126 + self.state = 134 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 127 + self.state = 135 self.match(SubstraitTypeParser.Gt) pass - elif token in [31]: + elif token in [32]: localctx = SubstraitTypeParser.ListContext(self, localctx) - self.enterOuterAlt(localctx, 10) - self.state = 129 + self.enterOuterAlt(localctx, 11) + self.state = 137 self.match(SubstraitTypeParser.List) - self.state = 131 + self.state = 139 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: - self.state = 130 + if _la==72: + self.state = 138 localctx.isnull = self.match(SubstraitTypeParser.QMark) - self.state = 133 + self.state = 141 self.match(SubstraitTypeParser.Lt) - self.state = 134 + self.state = 142 self.expr(0) - self.state = 135 + self.state = 143 self.match(SubstraitTypeParser.Gt) pass - elif token in [32]: + elif token in [33]: localctx = SubstraitTypeParser.MapContext(self, localctx) - self.enterOuterAlt(localctx, 11) - self.state = 137 + self.enterOuterAlt(localctx, 12) + self.state = 145 self.match(SubstraitTypeParser.Map) - self.state = 139 + self.state = 147 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==70: - self.state = 138 + if _la==72: + self.state = 146 localctx.isnull = self.match(SubstraitTypeParser.QMark) - self.state = 141 + self.state = 149 self.match(SubstraitTypeParser.Lt) - self.state = 142 + self.state = 150 localctx.key = self.expr(0) - self.state = 143 + self.state = 151 self.match(SubstraitTypeParser.Comma) - self.state = 144 + self.state = 152 localctx.value = self.expr(0) - self.state = 145 + self.state = 153 self.match(SubstraitTypeParser.Gt) pass - elif token in [33]: + elif token in [34]: localctx = SubstraitTypeParser.UserDefinedContext(self, localctx) - self.enterOuterAlt(localctx, 12) - self.state = 147 + self.enterOuterAlt(localctx, 13) + self.state = 155 self.match(SubstraitTypeParser.UserDefined) - self.state = 148 + self.state = 156 self.match(SubstraitTypeParser.Identifier) - self.state = 150 + self.state = 158 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,14,self._ctx) + la_ = self._interp.adaptivePredict(self._input,15,self._ctx) if la_ == 1: - self.state = 149 + self.state = 157 localctx.isnull = self.match(SubstraitTypeParser.QMark) - self.state = 163 + self.state = 171 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,16,self._ctx) + la_ = self._interp.adaptivePredict(self._input,17,self._ctx) if la_ == 1: - self.state = 152 + self.state = 160 self.match(SubstraitTypeParser.Lt) - self.state = 153 + self.state = 161 self.expr(0) - self.state = 158 + self.state = 166 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==68: - self.state = 154 + while _la==70: + self.state = 162 self.match(SubstraitTypeParser.Comma) - self.state = 155 + self.state = 163 self.expr(0) - self.state = 160 + self.state = 168 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 161 + self.state = 169 self.match(SubstraitTypeParser.Gt) @@ -1547,27 +1602,27 @@ def numericParameter(self): localctx = SubstraitTypeParser.NumericParameterContext(self, self._ctx, self.state) self.enterRule(localctx, 8, self.RULE_numericParameter) try: - self.state = 170 + self.state = 178 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,18,self._ctx) + la_ = self._interp.adaptivePredict(self._input,19,self._ctx) if la_ == 1: localctx = SubstraitTypeParser.NumericLiteralContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 167 + self.state = 175 self.match(SubstraitTypeParser.Number) pass elif la_ == 2: localctx = SubstraitTypeParser.NumericParameterNameContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 168 + self.state = 176 self.match(SubstraitTypeParser.Identifier) pass elif la_ == 3: localctx = SubstraitTypeParser.NumericExpressionContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 169 + self.state = 177 self.expr(0) pass @@ -1617,31 +1672,31 @@ def anyType(self): localctx = SubstraitTypeParser.AnyTypeContext(self, self._ctx, self.state) self.enterRule(localctx, 10, self.RULE_anyType) try: - self.state = 180 + self.state = 188 self._errHandler.sync(self) token = self._input.LA(1) - if token in [47]: + if token in [49]: self.enterOuterAlt(localctx, 1) - self.state = 172 + self.state = 180 self.match(SubstraitTypeParser.Any) - self.state = 174 + self.state = 182 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,19,self._ctx) + la_ = self._interp.adaptivePredict(self._input,20,self._ctx) if la_ == 1: - self.state = 173 + self.state = 181 localctx.isnull = self.match(SubstraitTypeParser.QMark) pass - elif token in [48]: + elif token in [50]: self.enterOuterAlt(localctx, 2) - self.state = 176 + self.state = 184 self.match(SubstraitTypeParser.AnyVar) - self.state = 178 + self.state = 186 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,20,self._ctx) + la_ = self._interp.adaptivePredict(self._input,21,self._ctx) if la_ == 1: - self.state = 177 + self.state = 185 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -1700,30 +1755,30 @@ def typeDef(self): localctx = SubstraitTypeParser.TypeDefContext(self, self._ctx, self.state) self.enterRule(localctx, 12, self.RULE_typeDef) try: - self.state = 188 + self.state = 196 self._errHandler.sync(self) token = self._input.LA(1) if token in [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22]: self.enterOuterAlt(localctx, 1) - self.state = 182 + self.state = 190 self.scalarType() - self.state = 184 + self.state = 192 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,22,self._ctx) + la_ = self._interp.adaptivePredict(self._input,23,self._ctx) if la_ == 1: - self.state = 183 + self.state = 191 localctx.isnull = self.match(SubstraitTypeParser.QMark) pass - elif token in [21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33]: + elif token in [21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34]: self.enterOuterAlt(localctx, 2) - self.state = 186 + self.state = 194 self.parameterizedType() pass - elif token in [47, 48]: + elif token in [49, 50]: self.enterOuterAlt(localctx, 3) - self.state = 187 + self.state = 195 self.anyType() pass else: @@ -2050,19 +2105,19 @@ def expr(self, _p:int=0): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 251 + self.state = 259 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,31,self._ctx) + la_ = self._interp.adaptivePredict(self._input,32,self._ctx) if la_ == 1: localctx = SubstraitTypeParser.ParenExpressionContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 191 + self.state = 199 self.match(SubstraitTypeParser.OParen) - self.state = 192 + self.state = 200 self.expr(0) - self.state = 193 + self.state = 201 self.match(SubstraitTypeParser.CParen) pass @@ -2070,62 +2125,62 @@ def expr(self, _p:int=0): localctx = SubstraitTypeParser.MultilineDefinitionContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 195 + self.state = 203 self.match(SubstraitTypeParser.Identifier) - self.state = 196 + self.state = 204 self.match(SubstraitTypeParser.Eq) - self.state = 197 + self.state = 205 self.expr(0) - self.state = 199 + self.state = 207 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 198 + self.state = 206 self.match(SubstraitTypeParser.Newline) - self.state = 201 + self.state = 209 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==78): + if not (_la==80): break - self.state = 213 + self.state = 221 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==77: - self.state = 203 + while _la==79: + self.state = 211 self.match(SubstraitTypeParser.Identifier) - self.state = 204 + self.state = 212 self.match(SubstraitTypeParser.Eq) - self.state = 205 + self.state = 213 self.expr(0) - self.state = 207 + self.state = 215 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 206 + self.state = 214 self.match(SubstraitTypeParser.Newline) - self.state = 209 + self.state = 217 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==78): + if not (_la==80): break - self.state = 215 + self.state = 223 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 216 + self.state = 224 localctx.finalType = self.typeDef() - self.state = 220 + self.state = 228 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,27,self._ctx) + _alt = self._interp.adaptivePredict(self._input,28,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 217 + self.state = 225 self.match(SubstraitTypeParser.Newline) - self.state = 222 + self.state = 230 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,27,self._ctx) + _alt = self._interp.adaptivePredict(self._input,28,self._ctx) pass @@ -2133,7 +2188,7 @@ def expr(self, _p:int=0): localctx = SubstraitTypeParser.TypeLiteralContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 223 + self.state = 231 self.typeDef() pass @@ -2141,7 +2196,7 @@ def expr(self, _p:int=0): localctx = SubstraitTypeParser.LiteralNumberContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 224 + self.state = 232 self.match(SubstraitTypeParser.Number) pass @@ -2149,13 +2204,13 @@ def expr(self, _p:int=0): localctx = SubstraitTypeParser.ParameterNameContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 225 + self.state = 233 self.match(SubstraitTypeParser.Identifier) - self.state = 227 + self.state = 235 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,28,self._ctx) + la_ = self._interp.adaptivePredict(self._input,29,self._ctx) if la_ == 1: - self.state = 226 + self.state = 234 localctx.isnull = self.match(SubstraitTypeParser.QMark) @@ -2165,31 +2220,31 @@ def expr(self, _p:int=0): localctx = SubstraitTypeParser.FunctionCallContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 229 + self.state = 237 self.match(SubstraitTypeParser.Identifier) - self.state = 230 + self.state = 238 self.match(SubstraitTypeParser.OParen) - self.state = 239 + self.state = 247 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 2306265238858629008) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12289) != 0): - self.state = 231 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9221683152634773616) != 0) or ((((_la - 66)) & ~0x3f) == 0 and ((1 << (_la - 66)) & 12289) != 0): + self.state = 239 self.expr(0) - self.state = 236 + self.state = 244 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==68: - self.state = 232 + while _la==70: + self.state = 240 self.match(SubstraitTypeParser.Comma) - self.state = 233 + self.state = 241 self.expr(0) - self.state = 238 + self.state = 246 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 241 + self.state = 249 self.match(SubstraitTypeParser.CParen) pass @@ -2197,17 +2252,17 @@ def expr(self, _p:int=0): localctx = SubstraitTypeParser.IfExprContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 242 + self.state = 250 self.match(SubstraitTypeParser.If) - self.state = 243 + self.state = 251 localctx.ifExpr = self.expr(0) - self.state = 244 + self.state = 252 self.match(SubstraitTypeParser.Then) - self.state = 245 + self.state = 253 localctx.thenExpr = self.expr(0) - self.state = 246 + self.state = 254 self.match(SubstraitTypeParser.Else) - self.state = 247 + self.state = 255 localctx.elseExpr = self.expr(3) pass @@ -2216,42 +2271,42 @@ def expr(self, _p:int=0): self._ctx = localctx _prevctx = localctx - self.state = 249 + self.state = 257 self.match(SubstraitTypeParser.Bang) - self.state = 250 + self.state = 258 self.expr(2) pass self._ctx.stop = self._input.LT(-1) - self.state = 264 + self.state = 272 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,33,self._ctx) + _alt = self._interp.adaptivePredict(self._input,34,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx - self.state = 262 + self.state = 270 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,32,self._ctx) + la_ = self._interp.adaptivePredict(self._input,33,self._ctx) if la_ == 1: localctx = SubstraitTypeParser.BinaryExprContext(self, SubstraitTypeParser.ExprContext(self, _parentctx, _parentState)) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) - self.state = 253 + self.state = 261 if not self.precpred(self._ctx, 4): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") - self.state = 254 + self.state = 262 localctx.op = self._input.LT(1) _la = self._input.LA(1) - if not(((((_la - 50)) & ~0x3f) == 0 and ((1 << (_la - 50)) & 25167855) != 0)): + if not(((((_la - 52)) & ~0x3f) == 0 and ((1 << (_la - 52)) & 25167855) != 0)): localctx.op = self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 255 + self.state = 263 localctx.right = self.expr(5) pass @@ -2259,24 +2314,24 @@ def expr(self, _p:int=0): localctx = SubstraitTypeParser.TernaryContext(self, SubstraitTypeParser.ExprContext(self, _parentctx, _parentState)) localctx.ifExpr = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) - self.state = 256 + self.state = 264 if not self.precpred(self._ctx, 1): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") - self.state = 257 + self.state = 265 self.match(SubstraitTypeParser.QMark) - self.state = 258 + self.state = 266 localctx.thenExpr = self.expr(0) - self.state = 259 + self.state = 267 self.match(SubstraitTypeParser.Colon) - self.state = 260 + self.state = 268 localctx.elseExpr = self.expr(2) pass - self.state = 266 + self.state = 274 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,33,self._ctx) + _alt = self._interp.adaptivePredict(self._input,34,self._ctx) except RecognitionException as re: localctx.exception = re diff --git a/src/substrait/gen/json/simple_extensions.py b/src/substrait/gen/json/simple_extensions.py index 12e67a9..2885bb4 100644 --- a/src/substrait/gen/json/simple_extensions.py +++ b/src/substrait/gen/json/simple_extensions.py @@ -1,6 +1,5 @@ # generated by datamodel-codegen: # filename: simple_extensions_schema.yaml -# timestamp: 2025-06-06T08:43:35+00:00 from __future__ import annotations @@ -59,7 +58,7 @@ class Options1: description: Optional[str] = None -Options = Optional[Dict[str, Options1]] +Options = Dict[str, Options1] class ParameterConsistency(Enum): @@ -89,7 +88,7 @@ class NullabilityHandling(Enum): ReturnValue = Type -Implementation = Optional[Dict[str, str]] +Implementation = Dict[str, str] Intermediate = Type @@ -203,6 +202,7 @@ class TypeParamDef: @dataclass class TypeModel: name: str + description: Optional[str] = None structure: Optional[Type] = None parameters: Optional[TypeParamDefs] = None variadic: Optional[bool] = None @@ -210,6 +210,7 @@ class TypeModel: @dataclass class SimpleExtensions: + urn: str dependencies: Optional[Dict[str, str]] = None types: Optional[List[TypeModel]] = None type_variations: Optional[List[TypeVariation]] = None diff --git a/src/substrait/gen/proto/algebra_pb2.py b/src/substrait/gen/proto/algebra_pb2.py index 0e35b0b..26c3977 100644 --- a/src/substrait/gen/proto/algebra_pb2.py +++ b/src/substrait/gen/proto/algebra_pb2.py @@ -9,7 +9,7 @@ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 from ..proto.extensions import extensions_pb2 as proto_dot_extensions_dot_extensions__pb2 from ..proto import type_pb2 as proto_dot_type__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13proto/algebra.proto\x12\x05proto\x1a\x19google/protobuf/any.proto\x1a!proto/extensions/extensions.proto\x1a\x10proto/type.proto"\x91\x0b\n\tRelCommon\x121\n\x06direct\x18\x01 \x01(\x0b2\x17.proto.RelCommon.DirectH\x00R\x06direct\x12+\n\x04emit\x18\x02 \x01(\x0b2\x15.proto.RelCommon.EmitH\x00R\x04emit\x12)\n\x04hint\x18\x03 \x01(\x0b2\x15.proto.RelCommon.HintR\x04hint\x12R\n\x12advanced_extension\x18\x04 \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\x08\n\x06Direct\x1a-\n\x04Emit\x12%\n\x0eoutput_mapping\x18\x01 \x03(\x05R\routputMapping\x1a\xde\x08\n\x04Hint\x121\n\x05stats\x18\x01 \x01(\x0b2\x1b.proto.RelCommon.Hint.StatsR\x05stats\x12G\n\nconstraint\x18\x02 \x01(\x0b2\'.proto.RelCommon.Hint.RuntimeConstraintR\nconstraint\x12\x14\n\x05alias\x18\x03 \x01(\tR\x05alias\x12!\n\x0coutput_names\x18\x04 \x03(\tR\x0boutputNames\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x12U\n\x12saved_computations\x18\x0b \x03(\x0b2&.proto.RelCommon.Hint.SavedComputationR\x11savedComputations\x12X\n\x13loaded_computations\x18\x0c \x03(\x0b2\'.proto.RelCommon.Hint.LoadedComputationR\x12loadedComputations\x1a\x99\x01\n\x05Stats\x12\x1b\n\trow_count\x18\x01 \x01(\x01R\x08rowCount\x12\x1f\n\x0brecord_size\x18\x02 \x01(\x01R\nrecordSize\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1ag\n\x11RuntimeConstraint\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1at\n\x10SavedComputation\x12%\n\x0ecomputation_id\x18\x01 \x01(\x05R\rcomputationId\x129\n\x04type\x18\x02 \x01(\x0e2%.proto.RelCommon.Hint.ComputationTypeR\x04type\x1a\x88\x01\n\x11LoadedComputation\x128\n\x18computation_id_reference\x18\x01 \x01(\x05R\x16computationIdReference\x129\n\x04type\x18\x02 \x01(\x0e2%.proto.RelCommon.Hint.ComputationTypeR\x04type"\x95\x01\n\x0fComputationType\x12 \n\x1cCOMPUTATION_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aCOMPUTATION_TYPE_HASHTABLE\x10\x01\x12!\n\x1dCOMPUTATION_TYPE_BLOOM_FILTER\x10\x02\x12\x1d\n\x18COMPUTATION_TYPE_UNKNOWN\x10\x8fNB\x0b\n\temit_kind"\x85\x14\n\x07ReadRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x123\n\x0bbase_schema\x18\x02 \x01(\x0b2\x12.proto.NamedStructR\nbaseSchema\x12)\n\x06filter\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\x06filter\x12?\n\x12best_effort_filter\x18\x0b \x01(\x0b2\x11.proto.ExpressionR\x10bestEffortFilter\x12@\n\nprojection\x18\x04 \x01(\x0b2 .proto.Expression.MaskExpressionR\nprojection\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x12B\n\rvirtual_table\x18\x05 \x01(\x0b2\x1b.proto.ReadRel.VirtualTableH\x00R\x0cvirtualTable\x12<\n\x0blocal_files\x18\x06 \x01(\x0b2\x19.proto.ReadRel.LocalFilesH\x00R\nlocalFiles\x12<\n\x0bnamed_table\x18\x07 \x01(\x0b2\x19.proto.ReadRel.NamedTableH\x00R\nnamedTable\x12H\n\x0fextension_table\x18\x08 \x01(\x0b2\x1d.proto.ReadRel.ExtensionTableH\x00R\x0eextensionTable\x12B\n\riceberg_table\x18\t \x01(\x0b2\x1b.proto.ReadRel.IcebergTableH\x00R\x0cicebergTable\x1av\n\nNamedTable\x12\x14\n\x05names\x18\x01 \x03(\tR\x05names\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\xfc\x01\n\x0cIcebergTable\x12F\n\x06direct\x18\x01 \x01(\x0b2,.proto.ReadRel.IcebergTable.MetadataFileReadH\x00R\x06direct\x1a\x95\x01\n\x10MetadataFileRead\x12!\n\x0cmetadata_uri\x18\x01 \x01(\tR\x0bmetadataUri\x12!\n\x0bsnapshot_id\x18\x02 \x01(\tH\x00R\nsnapshotId\x12/\n\x12snapshot_timestamp\x18\x03 \x01(\x03H\x00R\x11snapshotTimestampB\n\n\x08snapshotB\x0c\n\ntable_type\x1a\x8f\x01\n\x0cVirtualTable\x12<\n\x06values\x18\x01 \x03(\x0b2 .proto.Expression.Literal.StructB\x02\x18\x01R\x06values\x12A\n\x0bexpressions\x18\x02 \x03(\x0b2\x1f.proto.Expression.Nested.StructR\x0bexpressions\x1a>\n\x0eExtensionTable\x12,\n\x06detail\x18\x01 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail\x1a\xf4\t\n\nLocalFiles\x12;\n\x05items\x18\x01 \x03(\x0b2%.proto.ReadRel.LocalFiles.FileOrFilesR\x05items\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\xd4\x08\n\x0bFileOrFiles\x12\x1b\n\x08uri_path\x18\x01 \x01(\tH\x00R\x07uriPath\x12$\n\ruri_path_glob\x18\x02 \x01(\tH\x00R\x0buriPathGlob\x12\x1b\n\x08uri_file\x18\x03 \x01(\tH\x00R\x07uriFile\x12\x1f\n\nuri_folder\x18\x04 \x01(\tH\x00R\turiFolder\x12\'\n\x0fpartition_index\x18\x06 \x01(\x04R\x0epartitionIndex\x12\x14\n\x05start\x18\x07 \x01(\x04R\x05start\x12\x16\n\x06length\x18\x08 \x01(\x04R\x06length\x12T\n\x07parquet\x18\t \x01(\x0b28.proto.ReadRel.LocalFiles.FileOrFiles.ParquetReadOptionsH\x01R\x07parquet\x12N\n\x05arrow\x18\n \x01(\x0b26.proto.ReadRel.LocalFiles.FileOrFiles.ArrowReadOptionsH\x01R\x05arrow\x12H\n\x03orc\x18\x0b \x01(\x0b24.proto.ReadRel.LocalFiles.FileOrFiles.OrcReadOptionsH\x01R\x03orc\x124\n\textension\x18\x0c \x01(\x0b2\x14.google.protobuf.AnyH\x01R\textension\x12K\n\x04dwrf\x18\r \x01(\x0b25.proto.ReadRel.LocalFiles.FileOrFiles.DwrfReadOptionsH\x01R\x04dwrf\x12]\n\x04text\x18\x0e \x01(\x0b2G.proto.ReadRel.LocalFiles.FileOrFiles.DelimiterSeparatedTextReadOptionsH\x01R\x04text\x1a\x14\n\x12ParquetReadOptions\x1a\x12\n\x10ArrowReadOptions\x1a\x10\n\x0eOrcReadOptions\x1a\x11\n\x0fDwrfReadOptions\x1a\xa1\x02\n!DelimiterSeparatedTextReadOptions\x12\'\n\x0ffield_delimiter\x18\x01 \x01(\tR\x0efieldDelimiter\x12"\n\rmax_line_size\x18\x02 \x01(\x04R\x0bmaxLineSize\x12\x14\n\x05quote\x18\x03 \x01(\tR\x05quote\x12/\n\x14header_lines_to_skip\x18\x04 \x01(\x04R\x11headerLinesToSkip\x12\x16\n\x06escape\x18\x05 \x01(\tR\x06escape\x126\n\x15value_treated_as_null\x18\x06 \x01(\tH\x00R\x12valueTreatedAsNull\x88\x01\x01B\x18\n\x16_value_treated_as_nullB\x0b\n\tpath_typeB\r\n\x0bfile_formatJ\x04\x08\x05\x10\x06R\x06formatB\x0b\n\tread_type"\xe1\x01\n\nProjectRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x123\n\x0bexpressions\x18\x03 \x03(\x0b2\x11.proto.ExpressionR\x0bexpressions\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xb1\x05\n\x07JoinRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x121\n\nexpression\x18\x04 \x01(\x0b2\x11.proto.ExpressionR\nexpression\x12;\n\x10post_join_filter\x18\x05 \x01(\x0b2\x11.proto.ExpressionR\x0epostJoinFilter\x12+\n\x04type\x18\x06 \x01(\x0e2\x17.proto.JoinRel.JoinTypeR\x04type\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xc8\x02\n\x08JoinType\x12\x19\n\x15JOIN_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fJOIN_TYPE_INNER\x10\x01\x12\x13\n\x0fJOIN_TYPE_OUTER\x10\x02\x12\x12\n\x0eJOIN_TYPE_LEFT\x10\x03\x12\x13\n\x0fJOIN_TYPE_RIGHT\x10\x04\x12\x17\n\x13JOIN_TYPE_LEFT_SEMI\x10\x05\x12\x17\n\x13JOIN_TYPE_LEFT_ANTI\x10\x06\x12\x19\n\x15JOIN_TYPE_LEFT_SINGLE\x10\x07\x12\x18\n\x14JOIN_TYPE_RIGHT_SEMI\x10\x08\x12\x18\n\x14JOIN_TYPE_RIGHT_ANTI\x10\t\x12\x1a\n\x16JOIN_TYPE_RIGHT_SINGLE\x10\n\x12\x17\n\x13JOIN_TYPE_LEFT_MARK\x10\x0b\x12\x18\n\x14JOIN_TYPE_RIGHT_MARK\x10\x0c"\xca\x01\n\x08CrossRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xeb\x02\n\x08FetchRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12\x1c\n\x06offset\x18\x03 \x01(\x03B\x02\x18\x01H\x00R\x06offset\x124\n\x0boffset_expr\x18\x05 \x01(\x0b2\x11.proto.ExpressionH\x00R\noffsetExpr\x12\x1a\n\x05count\x18\x04 \x01(\x03B\x02\x18\x01H\x01R\x05count\x122\n\ncount_expr\x18\x06 \x01(\x0b2\x11.proto.ExpressionH\x01R\tcountExpr\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtensionB\r\n\x0boffset_modeB\x0c\n\ncount_mode"\xdf\x04\n\x0cAggregateRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12:\n\tgroupings\x18\x03 \x03(\x0b2\x1c.proto.AggregateRel.GroupingR\tgroupings\x127\n\x08measures\x18\x04 \x03(\x0b2\x1b.proto.AggregateRel.MeasureR\x08measures\x12D\n\x14grouping_expressions\x18\x05 \x03(\x0b2\x11.proto.ExpressionR\x13groupingExpressions\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\x89\x01\n\x08Grouping\x12H\n\x14grouping_expressions\x18\x01 \x03(\x0b2\x11.proto.ExpressionB\x02\x18\x01R\x13groupingExpressions\x123\n\x15expression_references\x18\x02 \x03(\rR\x14expressionReferences\x1ah\n\x07Measure\x122\n\x07measure\x18\x01 \x01(\x0b2\x18.proto.AggregateFunctionR\x07measure\x12)\n\x06filter\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x06filter"\xca\x07\n\x1cConsistentPartitionWindowRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12`\n\x10window_functions\x18\x03 \x03(\x0b25.proto.ConsistentPartitionWindowRel.WindowRelFunctionR\x0fwindowFunctions\x12F\n\x15partition_expressions\x18\x04 \x03(\x0b2\x11.proto.ExpressionR\x14partitionExpressions\x12&\n\x05sorts\x18\x05 \x03(\x0b2\x10.proto.SortFieldR\x05sorts\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\xb7\x04\n\x11WindowRelFunction\x12-\n\x12function_reference\x18\x01 \x01(\rR\x11functionReference\x125\n\targuments\x18\t \x03(\x0b2\x17.proto.FunctionArgumentR\targuments\x12/\n\x07options\x18\x0b \x03(\x0b2\x15.proto.FunctionOptionR\x07options\x12,\n\x0boutput_type\x18\x07 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12-\n\x05phase\x18\x06 \x01(\x0e2\x17.proto.AggregationPhaseR\x05phase\x12N\n\ninvocation\x18\n \x01(\x0e2..proto.AggregateFunction.AggregationInvocationR\ninvocation\x12G\n\x0blower_bound\x18\x05 \x01(\x0b2&.proto.Expression.WindowFunction.BoundR\nlowerBound\x12G\n\x0bupper_bound\x18\x04 \x01(\x0b2&.proto.Expression.WindowFunction.BoundR\nupperBound\x12L\n\x0bbounds_type\x18\x0c \x01(\x0e2+.proto.Expression.WindowFunction.BoundsTypeR\nboundsType"\xd1\x01\n\x07SortRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12&\n\x05sorts\x18\x03 \x03(\x0b2\x10.proto.SortFieldR\x05sorts\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xdc\x01\n\tFilterRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12/\n\tcondition\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\tcondition\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xde\x03\n\x06SetRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12"\n\x06inputs\x18\x02 \x03(\x0b2\n.proto.RelR\x06inputs\x12#\n\x02op\x18\x03 \x01(\x0e2\x13.proto.SetRel.SetOpR\x02op\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\x8c\x02\n\x05SetOp\x12\x16\n\x12SET_OP_UNSPECIFIED\x10\x00\x12\x18\n\x14SET_OP_MINUS_PRIMARY\x10\x01\x12\x1c\n\x18SET_OP_MINUS_PRIMARY_ALL\x10\x07\x12\x19\n\x15SET_OP_MINUS_MULTISET\x10\x02\x12\x1f\n\x1bSET_OP_INTERSECTION_PRIMARY\x10\x03\x12 \n\x1cSET_OP_INTERSECTION_MULTISET\x10\x04\x12$\n SET_OP_INTERSECTION_MULTISET_ALL\x10\x08\x12\x19\n\x15SET_OP_UNION_DISTINCT\x10\x05\x12\x14\n\x10SET_OP_UNION_ALL\x10\x06"\x8e\x01\n\x12ExtensionSingleRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12,\n\x06detail\x18\x03 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail"j\n\x10ExtensionLeafRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12,\n\x06detail\x18\x02 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail"\x8f\x01\n\x11ExtensionMultiRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12"\n\x06inputs\x18\x02 \x03(\x0b2\n.proto.RelR\x06inputs\x12,\n\x06detail\x18\x03 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail"\xe9\x08\n\x0bExchangeRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12\'\n\x0fpartition_count\x18\x03 \x01(\x05R\x0epartitionCount\x12;\n\x07targets\x18\x04 \x03(\x0b2!.proto.ExchangeRel.ExchangeTargetR\x07targets\x12N\n\x11scatter_by_fields\x18\x05 \x01(\x0b2 .proto.ExchangeRel.ScatterFieldsH\x00R\x0fscatterByFields\x12P\n\rsingle_target\x18\x06 \x01(\x0b2).proto.ExchangeRel.SingleBucketExpressionH\x00R\x0csingleTarget\x12M\n\x0cmulti_target\x18\x07 \x01(\x0b2(.proto.ExchangeRel.MultiBucketExpressionH\x00R\x0bmultiTarget\x12@\n\x0bround_robin\x18\x08 \x01(\x0b2\x1d.proto.ExchangeRel.RoundRobinH\x00R\nroundRobin\x12<\n\tbroadcast\x18\t \x01(\x0b2\x1c.proto.ExchangeRel.BroadcastH\x00R\tbroadcast\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1aI\n\rScatterFields\x128\n\x06fields\x18\x01 \x03(\x0b2 .proto.Expression.FieldReferenceR\x06fields\x1aK\n\x16SingleBucketExpression\x121\n\nexpression\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\nexpression\x1a|\n\x15MultiBucketExpression\x121\n\nexpression\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\nexpression\x120\n\x14constrained_to_count\x18\x02 \x01(\x08R\x12constrainedToCount\x1a\x0b\n\tBroadcast\x1a"\n\nRoundRobin\x12\x14\n\x05exact\x18\x01 \x01(\x08R\x05exact\x1a\x8a\x01\n\x0eExchangeTarget\x12!\n\x0cpartition_id\x18\x01 \x03(\x05R\x0bpartitionId\x12\x12\n\x03uri\x18\x02 \x01(\tH\x00R\x03uri\x122\n\x08extended\x18\x03 \x01(\x0b2\x14.google.protobuf.AnyH\x00R\x08extendedB\r\n\x0btarget_typeB\x0f\n\rexchange_kind"\xfc\x02\n\tExpandRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x124\n\x06fields\x18\x04 \x03(\x0b2\x1c.proto.ExpandRel.ExpandFieldR\x06fields\x1a\xa7\x01\n\x0bExpandField\x12J\n\x0fswitching_field\x18\x02 \x01(\x0b2\x1f.proto.ExpandRel.SwitchingFieldH\x00R\x0eswitchingField\x12>\n\x10consistent_field\x18\x03 \x01(\x0b2\x11.proto.ExpressionH\x00R\x0fconsistentFieldB\x0c\n\nfield_type\x1aC\n\x0eSwitchingField\x121\n\nduplicates\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\nduplicates"A\n\x07RelRoot\x12 \n\x05input\x18\x01 \x01(\x0b2\n.proto.RelR\x05input\x12\x14\n\x05names\x18\x02 \x03(\tR\x05names"\xd0\x08\n\x03Rel\x12$\n\x04read\x18\x01 \x01(\x0b2\x0e.proto.ReadRelH\x00R\x04read\x12*\n\x06filter\x18\x02 \x01(\x0b2\x10.proto.FilterRelH\x00R\x06filter\x12\'\n\x05fetch\x18\x03 \x01(\x0b2\x0f.proto.FetchRelH\x00R\x05fetch\x123\n\taggregate\x18\x04 \x01(\x0b2\x13.proto.AggregateRelH\x00R\taggregate\x12$\n\x04sort\x18\x05 \x01(\x0b2\x0e.proto.SortRelH\x00R\x04sort\x12$\n\x04join\x18\x06 \x01(\x0b2\x0e.proto.JoinRelH\x00R\x04join\x12-\n\x07project\x18\x07 \x01(\x0b2\x11.proto.ProjectRelH\x00R\x07project\x12!\n\x03set\x18\x08 \x01(\x0b2\r.proto.SetRelH\x00R\x03set\x12F\n\x10extension_single\x18\t \x01(\x0b2\x19.proto.ExtensionSingleRelH\x00R\x0fextensionSingle\x12C\n\x0fextension_multi\x18\n \x01(\x0b2\x18.proto.ExtensionMultiRelH\x00R\x0eextensionMulti\x12@\n\x0eextension_leaf\x18\x0b \x01(\x0b2\x17.proto.ExtensionLeafRelH\x00R\rextensionLeaf\x12\'\n\x05cross\x18\x0c \x01(\x0b2\x0f.proto.CrossRelH\x00R\x05cross\x123\n\treference\x18\x15 \x01(\x0b2\x13.proto.ReferenceRelH\x00R\treference\x12\'\n\x05write\x18\x13 \x01(\x0b2\x0f.proto.WriteRelH\x00R\x05write\x12!\n\x03ddl\x18\x14 \x01(\x0b2\r.proto.DdlRelH\x00R\x03ddl\x12*\n\x06update\x18\x16 \x01(\x0b2\x10.proto.UpdateRelH\x00R\x06update\x121\n\thash_join\x18\r \x01(\x0b2\x12.proto.HashJoinRelH\x00R\x08hashJoin\x124\n\nmerge_join\x18\x0e \x01(\x0b2\x13.proto.MergeJoinRelH\x00R\tmergeJoin\x12D\n\x10nested_loop_join\x18\x12 \x01(\x0b2\x18.proto.NestedLoopJoinRelH\x00R\x0enestedLoopJoin\x12=\n\x06window\x18\x11 \x01(\x0b2#.proto.ConsistentPartitionWindowRelH\x00R\x06window\x120\n\x08exchange\x18\x0f \x01(\x0b2\x12.proto.ExchangeRelH\x00R\x08exchange\x12*\n\x06expand\x18\x10 \x01(\x0b2\x10.proto.ExpandRelH\x00R\x06expandB\n\n\x08rel_type"|\n\x10NamedObjectWrite\x12\x14\n\x05names\x18\x01 \x03(\tR\x05names\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"?\n\x0fExtensionObject\x12,\n\x06detail\x18\x01 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail"\x86\x06\n\x06DdlRel\x12<\n\x0cnamed_object\x18\x01 \x01(\x0b2\x17.proto.NamedObjectWriteH\x00R\x0bnamedObject\x12C\n\x10extension_object\x18\x02 \x01(\x0b2\x16.proto.ExtensionObjectH\x00R\x0fextensionObject\x125\n\x0ctable_schema\x18\x03 \x01(\x0b2\x12.proto.NamedStructR\x0btableSchema\x12G\n\x0etable_defaults\x18\x04 \x01(\x0b2 .proto.Expression.Literal.StructR\rtableDefaults\x12/\n\x06object\x18\x05 \x01(\x0e2\x17.proto.DdlRel.DdlObjectR\x06object\x12#\n\x02op\x18\x06 \x01(\x0e2\x13.proto.DdlRel.DdlOpR\x02op\x123\n\x0fview_definition\x18\x07 \x01(\x0b2\n.proto.RelR\x0eviewDefinition\x12(\n\x06common\x18\x08 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12R\n\x12advanced_extension\x18\t \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"R\n\tDdlObject\x12\x1a\n\x16DDL_OBJECT_UNSPECIFIED\x10\x00\x12\x14\n\x10DDL_OBJECT_TABLE\x10\x01\x12\x13\n\x0fDDL_OBJECT_VIEW\x10\x02"\x8d\x01\n\x05DdlOp\x12\x16\n\x12DDL_OP_UNSPECIFIED\x10\x00\x12\x11\n\rDDL_OP_CREATE\x10\x01\x12\x1c\n\x18DDL_OP_CREATE_OR_REPLACE\x10\x02\x12\x10\n\x0cDDL_OP_ALTER\x10\x03\x12\x0f\n\x0bDDL_OP_DROP\x10\x04\x12\x18\n\x14DDL_OP_DROP_IF_EXIST\x10\x05B\x0c\n\nwrite_type"\x9b\x07\n\x08WriteRel\x12:\n\x0bnamed_table\x18\x01 \x01(\x0b2\x17.proto.NamedObjectWriteH\x00R\nnamedTable\x12A\n\x0fextension_table\x18\x02 \x01(\x0b2\x16.proto.ExtensionObjectH\x00R\x0eextensionTable\x125\n\x0ctable_schema\x18\x03 \x01(\x0b2\x12.proto.NamedStructR\x0btableSchema\x12\'\n\x02op\x18\x04 \x01(\x0e2\x17.proto.WriteRel.WriteOpR\x02op\x12 \n\x05input\x18\x05 \x01(\x0b2\n.proto.RelR\x05input\x12;\n\x0bcreate_mode\x18\x08 \x01(\x0e2\x1a.proto.WriteRel.CreateModeR\ncreateMode\x122\n\x06output\x18\x06 \x01(\x0e2\x1a.proto.WriteRel.OutputModeR\x06output\x12(\n\x06common\x18\x07 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12R\n\x12advanced_extension\x18\t \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"u\n\x07WriteOp\x12\x18\n\x14WRITE_OP_UNSPECIFIED\x10\x00\x12\x13\n\x0fWRITE_OP_INSERT\x10\x01\x12\x13\n\x0fWRITE_OP_DELETE\x10\x02\x12\x13\n\x0fWRITE_OP_UPDATE\x10\x03\x12\x11\n\rWRITE_OP_CTAS\x10\x04"\xb1\x01\n\nCreateMode\x12\x1b\n\x17CREATE_MODE_UNSPECIFIED\x10\x00\x12 \n\x1cCREATE_MODE_APPEND_IF_EXISTS\x10\x01\x12!\n\x1dCREATE_MODE_REPLACE_IF_EXISTS\x10\x02\x12 \n\x1cCREATE_MODE_IGNORE_IF_EXISTS\x10\x03\x12\x1f\n\x1bCREATE_MODE_ERROR_IF_EXISTS\x10\x04"f\n\nOutputMode\x12\x1b\n\x17OUTPUT_MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15OUTPUT_MODE_NO_OUTPUT\x10\x01\x12 \n\x1cOUTPUT_MODE_MODIFIED_RECORDS\x10\x02B\x0c\n\nwrite_type"\xd3\x03\n\tUpdateRel\x124\n\x0bnamed_table\x18\x01 \x01(\x0b2\x11.proto.NamedTableH\x00R\nnamedTable\x125\n\x0ctable_schema\x18\x02 \x01(\x0b2\x12.proto.NamedStructR\x0btableSchema\x12/\n\tcondition\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\tcondition\x12N\n\x0ftransformations\x18\x04 \x03(\x0b2$.proto.UpdateRel.TransformExpressionR\x0ftransformations\x12R\n\x12advanced_extension\x18\x05 \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1au\n\x13TransformExpression\x129\n\x0etransformation\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x0etransformation\x12#\n\rcolumn_target\x18\x02 \x01(\x05R\x0ccolumnTargetB\r\n\x0bupdate_type"v\n\nNamedTable\x12\x14\n\x05names\x18\x01 \x03(\tR\x05names\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xab\x04\n\x11ComparisonJoinKey\x124\n\x04left\x18\x01 \x01(\x0b2 .proto.Expression.FieldReferenceR\x04left\x126\n\x05right\x18\x02 \x01(\x0b2 .proto.Expression.FieldReferenceR\x05right\x12G\n\ncomparison\x18\x03 \x01(\x0b2\'.proto.ComparisonJoinKey.ComparisonTypeR\ncomparison\x1a\xa5\x01\n\x0eComparisonType\x12G\n\x06simple\x18\x01 \x01(\x0e2-.proto.ComparisonJoinKey.SimpleComparisonTypeH\x00R\x06simple\x12<\n\x19custom_function_reference\x18\x02 \x01(\rH\x00R\x17customFunctionReferenceB\x0c\n\ninner_type"\xb6\x01\n\x14SimpleComparisonType\x12&\n"SIMPLE_COMPARISON_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19SIMPLE_COMPARISON_TYPE_EQ\x10\x01\x12/\n+SIMPLE_COMPARISON_TYPE_IS_NOT_DISTINCT_FROM\x10\x02\x12&\n"SIMPLE_COMPARISON_TYPE_MIGHT_EQUAL\x10\x03"\xd4\x07\n\x0bHashJoinRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x12A\n\tleft_keys\x18\x04 \x03(\x0b2 .proto.Expression.FieldReferenceB\x02\x18\x01R\x08leftKeys\x12C\n\nright_keys\x18\x05 \x03(\x0b2 .proto.Expression.FieldReferenceB\x02\x18\x01R\trightKeys\x12,\n\x04keys\x18\x08 \x03(\x0b2\x18.proto.ComparisonJoinKeyR\x04keys\x12;\n\x10post_join_filter\x18\x06 \x01(\x0b2\x11.proto.ExpressionR\x0epostJoinFilter\x12/\n\x04type\x18\x07 \x01(\x0e2\x1b.proto.HashJoinRel.JoinTypeR\x04type\x12>\n\x0bbuild_input\x18\t \x01(\x0e2\x1d.proto.HashJoinRel.BuildInputR\nbuildInput\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xc8\x02\n\x08JoinType\x12\x19\n\x15JOIN_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fJOIN_TYPE_INNER\x10\x01\x12\x13\n\x0fJOIN_TYPE_OUTER\x10\x02\x12\x12\n\x0eJOIN_TYPE_LEFT\x10\x03\x12\x13\n\x0fJOIN_TYPE_RIGHT\x10\x04\x12\x17\n\x13JOIN_TYPE_LEFT_SEMI\x10\x05\x12\x18\n\x14JOIN_TYPE_RIGHT_SEMI\x10\x06\x12\x17\n\x13JOIN_TYPE_LEFT_ANTI\x10\x07\x12\x18\n\x14JOIN_TYPE_RIGHT_ANTI\x10\x08\x12\x19\n\x15JOIN_TYPE_LEFT_SINGLE\x10\t\x12\x1a\n\x16JOIN_TYPE_RIGHT_SINGLE\x10\n\x12\x17\n\x13JOIN_TYPE_LEFT_MARK\x10\x0b\x12\x18\n\x14JOIN_TYPE_RIGHT_MARK\x10\x0c"V\n\nBuildInput\x12\x1b\n\x17BUILD_INPUT_UNSPECIFIED\x10\x00\x12\x14\n\x10BUILD_INPUT_LEFT\x10\x01\x12\x15\n\x11BUILD_INPUT_RIGHT\x10\x02"\xbe\x06\n\x0cMergeJoinRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x12A\n\tleft_keys\x18\x04 \x03(\x0b2 .proto.Expression.FieldReferenceB\x02\x18\x01R\x08leftKeys\x12C\n\nright_keys\x18\x05 \x03(\x0b2 .proto.Expression.FieldReferenceB\x02\x18\x01R\trightKeys\x12,\n\x04keys\x18\x08 \x03(\x0b2\x18.proto.ComparisonJoinKeyR\x04keys\x12;\n\x10post_join_filter\x18\x06 \x01(\x0b2\x11.proto.ExpressionR\x0epostJoinFilter\x120\n\x04type\x18\x07 \x01(\x0e2\x1c.proto.MergeJoinRel.JoinTypeR\x04type\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xc8\x02\n\x08JoinType\x12\x19\n\x15JOIN_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fJOIN_TYPE_INNER\x10\x01\x12\x13\n\x0fJOIN_TYPE_OUTER\x10\x02\x12\x12\n\x0eJOIN_TYPE_LEFT\x10\x03\x12\x13\n\x0fJOIN_TYPE_RIGHT\x10\x04\x12\x17\n\x13JOIN_TYPE_LEFT_SEMI\x10\x05\x12\x18\n\x14JOIN_TYPE_RIGHT_SEMI\x10\x06\x12\x17\n\x13JOIN_TYPE_LEFT_ANTI\x10\x07\x12\x18\n\x14JOIN_TYPE_RIGHT_ANTI\x10\x08\x12\x19\n\x15JOIN_TYPE_LEFT_SINGLE\x10\t\x12\x1a\n\x16JOIN_TYPE_RIGHT_SINGLE\x10\n\x12\x17\n\x13JOIN_TYPE_LEFT_MARK\x10\x0b\x12\x18\n\x14JOIN_TYPE_RIGHT_MARK\x10\x0c"\x88\x05\n\x11NestedLoopJoinRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x121\n\nexpression\x18\x04 \x01(\x0b2\x11.proto.ExpressionR\nexpression\x125\n\x04type\x18\x05 \x01(\x0e2!.proto.NestedLoopJoinRel.JoinTypeR\x04type\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xc8\x02\n\x08JoinType\x12\x19\n\x15JOIN_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fJOIN_TYPE_INNER\x10\x01\x12\x13\n\x0fJOIN_TYPE_OUTER\x10\x02\x12\x12\n\x0eJOIN_TYPE_LEFT\x10\x03\x12\x13\n\x0fJOIN_TYPE_RIGHT\x10\x04\x12\x17\n\x13JOIN_TYPE_LEFT_SEMI\x10\x05\x12\x18\n\x14JOIN_TYPE_RIGHT_SEMI\x10\x06\x12\x17\n\x13JOIN_TYPE_LEFT_ANTI\x10\x07\x12\x18\n\x14JOIN_TYPE_RIGHT_ANTI\x10\x08\x12\x19\n\x15JOIN_TYPE_LEFT_SINGLE\x10\t\x12\x1a\n\x16JOIN_TYPE_RIGHT_SINGLE\x10\n\x12\x17\n\x13JOIN_TYPE_LEFT_MARK\x10\x0b\x12\x18\n\x14JOIN_TYPE_RIGHT_MARK\x10\x0c"\x82\x01\n\x10FunctionArgument\x12\x14\n\x04enum\x18\x01 \x01(\tH\x00R\x04enum\x12!\n\x04type\x18\x02 \x01(\x0b2\x0b.proto.TypeH\x00R\x04type\x12)\n\x05value\x18\x03 \x01(\x0b2\x11.proto.ExpressionH\x00R\x05valueB\n\n\x08arg_type"D\n\x0eFunctionOption\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1e\n\npreference\x18\x02 \x03(\tR\npreference"\xdfW\n\nExpression\x125\n\x07literal\x18\x01 \x01(\x0b2\x19.proto.Expression.LiteralH\x00R\x07literal\x12@\n\tselection\x18\x02 \x01(\x0b2 .proto.Expression.FieldReferenceH\x00R\tselection\x12K\n\x0fscalar_function\x18\x03 \x01(\x0b2 .proto.Expression.ScalarFunctionH\x00R\x0escalarFunction\x12K\n\x0fwindow_function\x18\x05 \x01(\x0b2 .proto.Expression.WindowFunctionH\x00R\x0ewindowFunction\x123\n\x07if_then\x18\x06 \x01(\x0b2\x18.proto.Expression.IfThenH\x00R\x06ifThen\x12Q\n\x11switch_expression\x18\x07 \x01(\x0b2".proto.Expression.SwitchExpressionH\x00R\x10switchExpression\x12L\n\x10singular_or_list\x18\x08 \x01(\x0b2 .proto.Expression.SingularOrListH\x00R\x0esingularOrList\x12C\n\rmulti_or_list\x18\t \x01(\x0b2\x1d.proto.Expression.MultiOrListH\x00R\x0bmultiOrList\x12,\n\x04cast\x18\x0b \x01(\x0b2\x16.proto.Expression.CastH\x00R\x04cast\x128\n\x08subquery\x18\x0c \x01(\x0b2\x1a.proto.Expression.SubqueryH\x00R\x08subquery\x122\n\x06nested\x18\r \x01(\x0b2\x18.proto.Expression.NestedH\x00R\x06nested\x12F\n\x11dynamic_parameter\x18\x0e \x01(\x0b2\x17.proto.DynamicParameterH\x00R\x10dynamicParameter\x120\n\x04enum\x18\n \x01(\x0b2\x16.proto.Expression.EnumB\x02\x18\x01H\x00R\x04enum\x1a\x86\x01\n\x04Enum\x12\x1e\n\tspecified\x18\x01 \x01(\tH\x00R\tspecified\x12@\n\x0bunspecified\x18\x02 \x01(\x0b2\x1c.proto.Expression.Enum.EmptyH\x00R\x0bunspecified\x1a\x0b\n\x05Empty:\x02\x18\x01:\x02\x18\x01B\x0b\n\tenum_kind\x1a\xde\x16\n\x07Literal\x12\x1a\n\x07boolean\x18\x01 \x01(\x08H\x00R\x07boolean\x12\x10\n\x02i8\x18\x02 \x01(\x05H\x00R\x02i8\x12\x12\n\x03i16\x18\x03 \x01(\x05H\x00R\x03i16\x12\x12\n\x03i32\x18\x05 \x01(\x05H\x00R\x03i32\x12\x12\n\x03i64\x18\x07 \x01(\x03H\x00R\x03i64\x12\x14\n\x04fp32\x18\n \x01(\x02H\x00R\x04fp32\x12\x14\n\x04fp64\x18\x0b \x01(\x01H\x00R\x04fp64\x12\x18\n\x06string\x18\x0c \x01(\tH\x00R\x06string\x12\x18\n\x06binary\x18\r \x01(\x0cH\x00R\x06binary\x12"\n\ttimestamp\x18\x0e \x01(\x03B\x02\x18\x01H\x00R\ttimestamp\x12\x14\n\x04date\x18\x10 \x01(\x05H\x00R\x04date\x12\x14\n\x04time\x18\x11 \x01(\x03H\x00R\x04time\x12d\n\x16interval_year_to_month\x18\x13 \x01(\x0b2-.proto.Expression.Literal.IntervalYearToMonthH\x00R\x13intervalYearToMonth\x12d\n\x16interval_day_to_second\x18\x14 \x01(\x0b2-.proto.Expression.Literal.IntervalDayToSecondH\x00R\x13intervalDayToSecond\x12Y\n\x11interval_compound\x18$ \x01(\x0b2*.proto.Expression.Literal.IntervalCompoundH\x00R\x10intervalCompound\x12\x1f\n\nfixed_char\x18\x15 \x01(\tH\x00R\tfixedChar\x12>\n\x08var_char\x18\x16 \x01(\x0b2!.proto.Expression.Literal.VarCharH\x00R\x07varChar\x12#\n\x0cfixed_binary\x18\x17 \x01(\x0cH\x00R\x0bfixedBinary\x12=\n\x07decimal\x18\x18 \x01(\x0b2!.proto.Expression.Literal.DecimalH\x00R\x07decimal\x12P\n\x0eprecision_time\x18% \x01(\x0b2\'.proto.Expression.Literal.PrecisionTimeH\x00R\rprecisionTime\x12_\n\x13precision_timestamp\x18" \x01(\x0b2,.proto.Expression.Literal.PrecisionTimestampH\x00R\x12precisionTimestamp\x12d\n\x16precision_timestamp_tz\x18# \x01(\x0b2,.proto.Expression.Literal.PrecisionTimestampH\x00R\x14precisionTimestampTz\x12:\n\x06struct\x18\x19 \x01(\x0b2 .proto.Expression.Literal.StructH\x00R\x06struct\x121\n\x03map\x18\x1a \x01(\x0b2\x1d.proto.Expression.Literal.MapH\x00R\x03map\x12\'\n\x0ctimestamp_tz\x18\x1b \x01(\x03B\x02\x18\x01H\x00R\x0btimestampTz\x12\x14\n\x04uuid\x18\x1c \x01(\x0cH\x00R\x04uuid\x12!\n\x04null\x18\x1d \x01(\x0b2\x0b.proto.TypeH\x00R\x04null\x124\n\x04list\x18\x1e \x01(\x0b2\x1e.proto.Expression.Literal.ListH\x00R\x04list\x121\n\nempty_list\x18\x1f \x01(\x0b2\x10.proto.Type.ListH\x00R\temptyList\x12.\n\tempty_map\x18 \x01(\x0b2\x0f.proto.Type.MapH\x00R\x08emptyMap\x12J\n\x0cuser_defined\x18! \x01(\x0b2%.proto.Expression.Literal.UserDefinedH\x00R\x0buserDefined\x12\x1a\n\x08nullable\x182 \x01(\x08R\x08nullable\x128\n\x18type_variation_reference\x183 \x01(\rR\x16typeVariationReference\x1a7\n\x07VarChar\x12\x14\n\x05value\x18\x01 \x01(\tR\x05value\x12\x16\n\x06length\x18\x02 \x01(\rR\x06length\x1aS\n\x07Decimal\x12\x14\n\x05value\x18\x01 \x01(\x0cR\x05value\x12\x1c\n\tprecision\x18\x02 \x01(\x05R\tprecision\x12\x14\n\x05scale\x18\x03 \x01(\x05R\x05scale\x1aC\n\rPrecisionTime\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value\x1aH\n\x12PrecisionTimestamp\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value\x1a\xb6\x01\n\x03Map\x12E\n\nkey_values\x18\x01 \x03(\x0b2&.proto.Expression.Literal.Map.KeyValueR\tkeyValues\x1ah\n\x08KeyValue\x12+\n\x03key\x18\x01 \x01(\x0b2\x19.proto.Expression.LiteralR\x03key\x12/\n\x05value\x18\x02 \x01(\x0b2\x19.proto.Expression.LiteralR\x05value\x1aC\n\x13IntervalYearToMonth\x12\x14\n\x05years\x18\x01 \x01(\x05R\x05years\x12\x16\n\x06months\x18\x02 \x01(\x05R\x06months\x1a\xbf\x01\n\x13IntervalDayToSecond\x12\x12\n\x04days\x18\x01 \x01(\x05R\x04days\x12\x18\n\x07seconds\x18\x02 \x01(\x05R\x07seconds\x12(\n\x0cmicroseconds\x18\x03 \x01(\x05B\x02\x18\x01H\x00R\x0cmicroseconds\x12\x1e\n\tprecision\x18\x04 \x01(\x05H\x00R\tprecision\x12\x1e\n\nsubseconds\x18\x05 \x01(\x03R\nsubsecondsB\x10\n\x0eprecision_mode\x1a\xda\x01\n\x10IntervalCompound\x12b\n\x16interval_year_to_month\x18\x01 \x01(\x0b2-.proto.Expression.Literal.IntervalYearToMonthR\x13intervalYearToMonth\x12b\n\x16interval_day_to_second\x18\x02 \x01(\x0b2-.proto.Expression.Literal.IntervalDayToSecondR\x13intervalDayToSecond\x1a;\n\x06Struct\x121\n\x06fields\x18\x01 \x03(\x0b2\x19.proto.Expression.LiteralR\x06fields\x1a9\n\x04List\x121\n\x06values\x18\x01 \x03(\x0b2\x19.proto.Expression.LiteralR\x06values\x1a\xe5\x01\n\x0bUserDefined\x12%\n\x0etype_reference\x18\x01 \x01(\rR\rtypeReference\x12>\n\x0ftype_parameters\x18\x03 \x03(\x0b2\x15.proto.Type.ParameterR\x0etypeParameters\x12,\n\x05value\x18\x02 \x01(\x0b2\x14.google.protobuf.AnyH\x00R\x05value\x12:\n\x06struct\x18\x04 \x01(\x0b2 .proto.Expression.Literal.StructH\x00R\x06structB\x05\n\x03valB\x0e\n\x0cliteral_type\x1a\x9f\x04\n\x06Nested\x12\x1a\n\x08nullable\x18\x01 \x01(\x08R\x08nullable\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x06struct\x18\x03 \x01(\x0b2\x1f.proto.Expression.Nested.StructH\x00R\x06struct\x123\n\x04list\x18\x04 \x01(\x0b2\x1d.proto.Expression.Nested.ListH\x00R\x04list\x120\n\x03map\x18\x05 \x01(\x0b2\x1c.proto.Expression.Nested.MapH\x00R\x03map\x1a\xa5\x01\n\x03Map\x12D\n\nkey_values\x18\x01 \x03(\x0b2%.proto.Expression.Nested.Map.KeyValueR\tkeyValues\x1aX\n\x08KeyValue\x12#\n\x03key\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x03key\x12\'\n\x05value\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x05value\x1a3\n\x06Struct\x12)\n\x06fields\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x06fields\x1a1\n\x04List\x12)\n\x06values\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x06valuesB\r\n\x0bnested_type\x1a\x80\x02\n\x0eScalarFunction\x12-\n\x12function_reference\x18\x01 \x01(\rR\x11functionReference\x125\n\targuments\x18\x04 \x03(\x0b2\x17.proto.FunctionArgumentR\targuments\x12/\n\x07options\x18\x05 \x03(\x0b2\x15.proto.FunctionOptionR\x07options\x12,\n\x0boutput_type\x18\x03 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12)\n\x04args\x18\x02 \x03(\x0b2\x11.proto.ExpressionB\x02\x18\x01R\x04args\x1a\xd5\t\n\x0eWindowFunction\x12-\n\x12function_reference\x18\x01 \x01(\rR\x11functionReference\x125\n\targuments\x18\t \x03(\x0b2\x17.proto.FunctionArgumentR\targuments\x12/\n\x07options\x18\x0b \x03(\x0b2\x15.proto.FunctionOptionR\x07options\x12,\n\x0boutput_type\x18\x07 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12-\n\x05phase\x18\x06 \x01(\x0e2\x17.proto.AggregationPhaseR\x05phase\x12&\n\x05sorts\x18\x03 \x03(\x0b2\x10.proto.SortFieldR\x05sorts\x12N\n\ninvocation\x18\n \x01(\x0e2..proto.AggregateFunction.AggregationInvocationR\ninvocation\x121\n\npartitions\x18\x02 \x03(\x0b2\x11.proto.ExpressionR\npartitions\x12L\n\x0bbounds_type\x18\x0c \x01(\x0e2+.proto.Expression.WindowFunction.BoundsTypeR\nboundsType\x12G\n\x0blower_bound\x18\x05 \x01(\x0b2&.proto.Expression.WindowFunction.BoundR\nlowerBound\x12G\n\x0bupper_bound\x18\x04 \x01(\x0b2&.proto.Expression.WindowFunction.BoundR\nupperBound\x12)\n\x04args\x18\x08 \x03(\x0b2\x11.proto.ExpressionB\x02\x18\x01R\x04args\x1a\xc0\x03\n\x05Bound\x12P\n\tpreceding\x18\x01 \x01(\x0b20.proto.Expression.WindowFunction.Bound.PrecedingH\x00R\tpreceding\x12P\n\tfollowing\x18\x02 \x01(\x0b20.proto.Expression.WindowFunction.Bound.FollowingH\x00R\tfollowing\x12T\n\x0bcurrent_row\x18\x03 \x01(\x0b21.proto.Expression.WindowFunction.Bound.CurrentRowH\x00R\ncurrentRow\x12P\n\tunbounded\x18\x04 \x01(\x0b20.proto.Expression.WindowFunction.Bound.UnboundedH\x00R\tunbounded\x1a#\n\tPreceding\x12\x16\n\x06offset\x18\x01 \x01(\x03R\x06offset\x1a#\n\tFollowing\x12\x16\n\x06offset\x18\x01 \x01(\x03R\x06offset\x1a\x0c\n\nCurrentRow\x1a\x0b\n\tUnboundedB\x06\n\x04kind"V\n\nBoundsType\x12\x1b\n\x17BOUNDS_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10BOUNDS_TYPE_ROWS\x10\x01\x12\x15\n\x11BOUNDS_TYPE_RANGE\x10\x02\x1a\xba\x01\n\x06IfThen\x123\n\x03ifs\x18\x01 \x03(\x0b2!.proto.Expression.IfThen.IfClauseR\x03ifs\x12%\n\x04else\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x04else\x1aT\n\x08IfClause\x12!\n\x02if\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x02if\x12%\n\x04then\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x04then\x1a\xa0\x02\n\x04Cast\x12\x1f\n\x04type\x18\x01 \x01(\x0b2\x0b.proto.TypeR\x04type\x12\'\n\x05input\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x05input\x12Q\n\x10failure_behavior\x18\x03 \x01(\x0e2&.proto.Expression.Cast.FailureBehaviorR\x0ffailureBehavior"{\n\x0fFailureBehavior\x12 \n\x1cFAILURE_BEHAVIOR_UNSPECIFIED\x10\x00\x12 \n\x1cFAILURE_BEHAVIOR_RETURN_NULL\x10\x01\x12$\n FAILURE_BEHAVIOR_THROW_EXCEPTION\x10\x02\x1a\xfd\x01\n\x10SwitchExpression\x12\'\n\x05match\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\x05match\x12<\n\x03ifs\x18\x01 \x03(\x0b2*.proto.Expression.SwitchExpression.IfValueR\x03ifs\x12%\n\x04else\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x04else\x1a[\n\x07IfValue\x12)\n\x02if\x18\x01 \x01(\x0b2\x19.proto.Expression.LiteralR\x02if\x12%\n\x04then\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x04then\x1af\n\x0eSingularOrList\x12\'\n\x05value\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x05value\x12+\n\x07options\x18\x02 \x03(\x0b2\x11.proto.ExpressionR\x07options\x1a\xab\x01\n\x0bMultiOrList\x12\'\n\x05value\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x05value\x12>\n\x07options\x18\x02 \x03(\x0b2$.proto.Expression.MultiOrList.RecordR\x07options\x1a3\n\x06Record\x12)\n\x06fields\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x06fields\x1a\x83\x04\n\x10EmbeddedFunction\x12/\n\targuments\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\targuments\x12,\n\x0boutput_type\x18\x02 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12o\n\x16python_pickle_function\x18\x03 \x01(\x0b27.proto.Expression.EmbeddedFunction.PythonPickleFunctionH\x00R\x14pythonPickleFunction\x12l\n\x15web_assembly_function\x18\x04 \x01(\x0b26.proto.Expression.EmbeddedFunction.WebAssemblyFunctionH\x00R\x13webAssemblyFunction\x1aV\n\x14PythonPickleFunction\x12\x1a\n\x08function\x18\x01 \x01(\x0cR\x08function\x12"\n\x0cprerequisite\x18\x02 \x03(\tR\x0cprerequisite\x1aQ\n\x13WebAssemblyFunction\x12\x16\n\x06script\x18\x01 \x01(\x0cR\x06script\x12"\n\x0cprerequisite\x18\x02 \x03(\tR\x0cprerequisiteB\x06\n\x04kind\x1a\xcc\x04\n\x10ReferenceSegment\x12D\n\x07map_key\x18\x01 \x01(\x0b2).proto.Expression.ReferenceSegment.MapKeyH\x00R\x06mapKey\x12S\n\x0cstruct_field\x18\x02 \x01(\x0b2..proto.Expression.ReferenceSegment.StructFieldH\x00R\x0bstructField\x12S\n\x0clist_element\x18\x03 \x01(\x0b2..proto.Expression.ReferenceSegment.ListElementH\x00R\x0blistElement\x1av\n\x06MapKey\x122\n\x07map_key\x18\x01 \x01(\x0b2\x19.proto.Expression.LiteralR\x06mapKey\x128\n\x05child\x18\x02 \x01(\x0b2".proto.Expression.ReferenceSegmentR\x05child\x1a]\n\x0bStructField\x12\x14\n\x05field\x18\x01 \x01(\x05R\x05field\x128\n\x05child\x18\x02 \x01(\x0b2".proto.Expression.ReferenceSegmentR\x05child\x1a_\n\x0bListElement\x12\x16\n\x06offset\x18\x01 \x01(\x05R\x06offset\x128\n\x05child\x18\x02 \x01(\x0b2".proto.Expression.ReferenceSegmentR\x05childB\x10\n\x0ereference_type\x1a\xee\n\n\x0eMaskExpression\x12E\n\x06select\x18\x01 \x01(\x0b2-.proto.Expression.MaskExpression.StructSelectR\x06select\x128\n\x18maintain_singular_struct\x18\x02 \x01(\x08R\x16maintainSingularStruct\x1a\xdc\x01\n\x06Select\x12G\n\x06struct\x18\x01 \x01(\x0b2-.proto.Expression.MaskExpression.StructSelectH\x00R\x06struct\x12A\n\x04list\x18\x02 \x01(\x0b2+.proto.Expression.MaskExpression.ListSelectH\x00R\x04list\x12>\n\x03map\x18\x03 \x01(\x0b2*.proto.Expression.MaskExpression.MapSelectH\x00R\x03mapB\x06\n\x04type\x1a^\n\x0cStructSelect\x12N\n\x0cstruct_items\x18\x01 \x03(\x0b2+.proto.Expression.MaskExpression.StructItemR\x0bstructItems\x1aa\n\nStructItem\x12\x14\n\x05field\x18\x01 \x01(\x05R\x05field\x12=\n\x05child\x18\x02 \x01(\x0b2\'.proto.Expression.MaskExpression.SelectR\x05child\x1a\xd6\x03\n\nListSelect\x12X\n\tselection\x18\x01 \x03(\x0b2:.proto.Expression.MaskExpression.ListSelect.ListSelectItemR\tselection\x12=\n\x05child\x18\x02 \x01(\x0b2\'.proto.Expression.MaskExpression.SelectR\x05child\x1a\xae\x02\n\x0eListSelectItem\x12\\\n\x04item\x18\x01 \x01(\x0b2F.proto.Expression.MaskExpression.ListSelect.ListSelectItem.ListElementH\x00R\x04item\x12\\\n\x05slice\x18\x02 \x01(\x0b2D.proto.Expression.MaskExpression.ListSelect.ListSelectItem.ListSliceH\x00R\x05slice\x1a#\n\x0bListElement\x12\x14\n\x05field\x18\x01 \x01(\x05R\x05field\x1a3\n\tListSlice\x12\x14\n\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n\x03end\x18\x02 \x01(\x05R\x03endB\x06\n\x04type\x1a\xdf\x02\n\tMapSelect\x12E\n\x03key\x18\x01 \x01(\x0b21.proto.Expression.MaskExpression.MapSelect.MapKeyH\x00R\x03key\x12]\n\nexpression\x18\x02 \x01(\x0b2;.proto.Expression.MaskExpression.MapSelect.MapKeyExpressionH\x00R\nexpression\x12=\n\x05child\x18\x03 \x01(\x0b2\'.proto.Expression.MaskExpression.SelectR\x05child\x1a!\n\x06MapKey\x12\x17\n\x07map_key\x18\x01 \x01(\tR\x06mapKey\x1a@\n\x10MapKeyExpression\x12,\n\x12map_key_expression\x18\x01 \x01(\tR\x10mapKeyExpressionB\x08\n\x06select\x1a\xf9\x03\n\x0eFieldReference\x12O\n\x10direct_reference\x18\x01 \x01(\x0b2".proto.Expression.ReferenceSegmentH\x00R\x0fdirectReference\x12M\n\x10masked_reference\x18\x02 \x01(\x0b2 .proto.Expression.MaskExpressionH\x00R\x0fmaskedReference\x123\n\nexpression\x18\x03 \x01(\x0b2\x11.proto.ExpressionH\x01R\nexpression\x12W\n\x0eroot_reference\x18\x04 \x01(\x0b2..proto.Expression.FieldReference.RootReferenceH\x01R\rrootReference\x12Z\n\x0fouter_reference\x18\x05 \x01(\x0b2/.proto.Expression.FieldReference.OuterReferenceH\x01R\x0eouterReference\x1a\x0f\n\rRootReference\x1a-\n\x0eOuterReference\x12\x1b\n\tsteps_out\x18\x01 \x01(\rR\x08stepsOutB\x10\n\x0ereference_typeB\x0b\n\troot_type\x1a\xe1\t\n\x08Subquery\x12;\n\x06scalar\x18\x01 \x01(\x0b2!.proto.Expression.Subquery.ScalarH\x00R\x06scalar\x12K\n\x0cin_predicate\x18\x02 \x01(\x0b2&.proto.Expression.Subquery.InPredicateH\x00R\x0binPredicate\x12N\n\rset_predicate\x18\x03 \x01(\x0b2\'.proto.Expression.Subquery.SetPredicateH\x00R\x0csetPredicate\x12Q\n\x0eset_comparison\x18\x04 \x01(\x0b2(.proto.Expression.Subquery.SetComparisonH\x00R\rsetComparison\x1a*\n\x06Scalar\x12 \n\x05input\x18\x01 \x01(\x0b2\n.proto.RelR\x05input\x1ab\n\x0bInPredicate\x12+\n\x07needles\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x07needles\x12&\n\x08haystack\x18\x02 \x01(\x0b2\n.proto.RelR\x08haystack\x1a\xe9\x01\n\x0cSetPredicate\x12V\n\x0cpredicate_op\x18\x01 \x01(\x0e23.proto.Expression.Subquery.SetPredicate.PredicateOpR\x0bpredicateOp\x12"\n\x06tuples\x18\x02 \x01(\x0b2\n.proto.RelR\x06tuples"]\n\x0bPredicateOp\x12\x1c\n\x18PREDICATE_OP_UNSPECIFIED\x10\x00\x12\x17\n\x13PREDICATE_OP_EXISTS\x10\x01\x12\x17\n\x13PREDICATE_OP_UNIQUE\x10\x02\x1a\x9a\x04\n\rSetComparison\x12W\n\x0creduction_op\x18\x01 \x01(\x0e24.proto.Expression.Subquery.SetComparison.ReductionOpR\x0breductionOp\x12Z\n\rcomparison_op\x18\x02 \x01(\x0e25.proto.Expression.Subquery.SetComparison.ComparisonOpR\x0ccomparisonOp\x12%\n\x04left\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\x04left\x12 \n\x05right\x18\x04 \x01(\x0b2\n.proto.RelR\x05right"\xb1\x01\n\x0cComparisonOp\x12\x1d\n\x19COMPARISON_OP_UNSPECIFIED\x10\x00\x12\x14\n\x10COMPARISON_OP_EQ\x10\x01\x12\x14\n\x10COMPARISON_OP_NE\x10\x02\x12\x14\n\x10COMPARISON_OP_LT\x10\x03\x12\x14\n\x10COMPARISON_OP_GT\x10\x04\x12\x14\n\x10COMPARISON_OP_LE\x10\x05\x12\x14\n\x10COMPARISON_OP_GE\x10\x06"W\n\x0bReductionOp\x12\x1c\n\x18REDUCTION_OP_UNSPECIFIED\x10\x00\x12\x14\n\x10REDUCTION_OP_ANY\x10\x01\x12\x14\n\x10REDUCTION_OP_ALL\x10\x02B\x0f\n\rsubquery_typeB\n\n\x08rex_type"d\n\x10DynamicParameter\x12\x1f\n\x04type\x18\x01 \x01(\x0b2\x0b.proto.TypeR\x04type\x12/\n\x13parameter_reference\x18\x02 \x01(\rR\x12parameterReference"\xa5\x03\n\tSortField\x12%\n\x04expr\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x04expr\x12>\n\tdirection\x18\x02 \x01(\x0e2\x1e.proto.SortField.SortDirectionH\x00R\tdirection\x12D\n\x1dcomparison_function_reference\x18\x03 \x01(\rH\x00R\x1bcomparisonFunctionReference"\xdd\x01\n\rSortDirection\x12\x1e\n\x1aSORT_DIRECTION_UNSPECIFIED\x10\x00\x12"\n\x1eSORT_DIRECTION_ASC_NULLS_FIRST\x10\x01\x12!\n\x1dSORT_DIRECTION_ASC_NULLS_LAST\x10\x02\x12#\n\x1fSORT_DIRECTION_DESC_NULLS_FIRST\x10\x03\x12"\n\x1eSORT_DIRECTION_DESC_NULLS_LAST\x10\x04\x12\x1c\n\x18SORT_DIRECTION_CLUSTERED\x10\x05B\x0b\n\tsort_kind"\xb1\x04\n\x11AggregateFunction\x12-\n\x12function_reference\x18\x01 \x01(\rR\x11functionReference\x125\n\targuments\x18\x07 \x03(\x0b2\x17.proto.FunctionArgumentR\targuments\x12/\n\x07options\x18\x08 \x03(\x0b2\x15.proto.FunctionOptionR\x07options\x12,\n\x0boutput_type\x18\x05 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12-\n\x05phase\x18\x04 \x01(\x0e2\x17.proto.AggregationPhaseR\x05phase\x12&\n\x05sorts\x18\x03 \x03(\x0b2\x10.proto.SortFieldR\x05sorts\x12N\n\ninvocation\x18\x06 \x01(\x0e2..proto.AggregateFunction.AggregationInvocationR\ninvocation\x12)\n\x04args\x18\x02 \x03(\x0b2\x11.proto.ExpressionB\x02\x18\x01R\x04args"\x84\x01\n\x15AggregationInvocation\x12&\n"AGGREGATION_INVOCATION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aAGGREGATION_INVOCATION_ALL\x10\x01\x12#\n\x1fAGGREGATION_INVOCATION_DISTINCT\x10\x02"7\n\x0cReferenceRel\x12\'\n\x0fsubtree_ordinal\x18\x01 \x01(\x05R\x0esubtreeOrdinal*\xef\x01\n\x10AggregationPhase\x12!\n\x1dAGGREGATION_PHASE_UNSPECIFIED\x10\x00\x12-\n)AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE\x10\x01\x122\n.AGGREGATION_PHASE_INTERMEDIATE_TO_INTERMEDIATE\x10\x02\x12\'\n#AGGREGATION_PHASE_INITIAL_TO_RESULT\x10\x03\x12,\n(AGGREGATION_PHASE_INTERMEDIATE_TO_RESULT\x10\x04B#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13proto/algebra.proto\x12\x05proto\x1a\x19google/protobuf/any.proto\x1a!proto/extensions/extensions.proto\x1a\x10proto/type.proto"\xba\x0c\n\tRelCommon\x121\n\x06direct\x18\x01 \x01(\x0b2\x17.proto.RelCommon.DirectH\x00R\x06direct\x12+\n\x04emit\x18\x02 \x01(\x0b2\x15.proto.RelCommon.EmitH\x00R\x04emit\x12)\n\x04hint\x18\x03 \x01(\x0b2\x15.proto.RelCommon.HintR\x04hint\x12R\n\x12advanced_extension\x18\x04 \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\x08\n\x06Direct\x1a-\n\x04Emit\x12%\n\x0eoutput_mapping\x18\x01 \x03(\x05R\routputMapping\x1a\x87\n\n\x04Hint\x121\n\x05stats\x18\x01 \x01(\x0b2\x1b.proto.RelCommon.Hint.StatsR\x05stats\x12G\n\nconstraint\x18\x02 \x01(\x0b2\'.proto.RelCommon.Hint.RuntimeConstraintR\nconstraint\x12\x14\n\x05alias\x18\x03 \x01(\tR\x05alias\x12!\n\x0coutput_names\x18\x04 \x03(\tR\x0boutputNames\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x12U\n\x12saved_computations\x18\x0b \x03(\x0b2&.proto.RelCommon.Hint.SavedComputationR\x11savedComputations\x12X\n\x13loaded_computations\x18\x0c \x03(\x0b2\'.proto.RelCommon.Hint.LoadedComputationR\x12loadedComputations\x1a\x99\x01\n\x05Stats\x12\x1b\n\trow_count\x18\x01 \x01(\x01R\x08rowCount\x12\x1f\n\x0brecord_size\x18\x02 \x01(\x01R\nrecordSize\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1ag\n\x11RuntimeConstraint\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\xc8\x01\n\x10SavedComputation\x12%\n\x0ecomputation_id\x18\x01 \x01(\x05R\rcomputationId\x129\n\x04type\x18\x02 \x01(\x0e2%.proto.RelCommon.Hint.ComputationTypeR\x04type\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\xdc\x01\n\x11LoadedComputation\x128\n\x18computation_id_reference\x18\x01 \x01(\x05R\x16computationIdReference\x129\n\x04type\x18\x02 \x01(\x0e2%.proto.RelCommon.Hint.ComputationTypeR\x04type\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\x95\x01\n\x0fComputationType\x12 \n\x1cCOMPUTATION_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aCOMPUTATION_TYPE_HASHTABLE\x10\x01\x12!\n\x1dCOMPUTATION_TYPE_BLOOM_FILTER\x10\x02\x12\x1d\n\x18COMPUTATION_TYPE_UNKNOWN\x10\x8fNB\x0b\n\temit_kind"\x85\x14\n\x07ReadRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x123\n\x0bbase_schema\x18\x02 \x01(\x0b2\x12.proto.NamedStructR\nbaseSchema\x12)\n\x06filter\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\x06filter\x12?\n\x12best_effort_filter\x18\x0b \x01(\x0b2\x11.proto.ExpressionR\x10bestEffortFilter\x12@\n\nprojection\x18\x04 \x01(\x0b2 .proto.Expression.MaskExpressionR\nprojection\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x12B\n\rvirtual_table\x18\x05 \x01(\x0b2\x1b.proto.ReadRel.VirtualTableH\x00R\x0cvirtualTable\x12<\n\x0blocal_files\x18\x06 \x01(\x0b2\x19.proto.ReadRel.LocalFilesH\x00R\nlocalFiles\x12<\n\x0bnamed_table\x18\x07 \x01(\x0b2\x19.proto.ReadRel.NamedTableH\x00R\nnamedTable\x12H\n\x0fextension_table\x18\x08 \x01(\x0b2\x1d.proto.ReadRel.ExtensionTableH\x00R\x0eextensionTable\x12B\n\riceberg_table\x18\t \x01(\x0b2\x1b.proto.ReadRel.IcebergTableH\x00R\x0cicebergTable\x1av\n\nNamedTable\x12\x14\n\x05names\x18\x01 \x03(\tR\x05names\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\xfc\x01\n\x0cIcebergTable\x12F\n\x06direct\x18\x01 \x01(\x0b2,.proto.ReadRel.IcebergTable.MetadataFileReadH\x00R\x06direct\x1a\x95\x01\n\x10MetadataFileRead\x12!\n\x0cmetadata_uri\x18\x01 \x01(\tR\x0bmetadataUri\x12!\n\x0bsnapshot_id\x18\x02 \x01(\tH\x00R\nsnapshotId\x12/\n\x12snapshot_timestamp\x18\x03 \x01(\x03H\x00R\x11snapshotTimestampB\n\n\x08snapshotB\x0c\n\ntable_type\x1a\x8f\x01\n\x0cVirtualTable\x12<\n\x06values\x18\x01 \x03(\x0b2 .proto.Expression.Literal.StructB\x02\x18\x01R\x06values\x12A\n\x0bexpressions\x18\x02 \x03(\x0b2\x1f.proto.Expression.Nested.StructR\x0bexpressions\x1a>\n\x0eExtensionTable\x12,\n\x06detail\x18\x01 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail\x1a\xf4\t\n\nLocalFiles\x12;\n\x05items\x18\x01 \x03(\x0b2%.proto.ReadRel.LocalFiles.FileOrFilesR\x05items\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\xd4\x08\n\x0bFileOrFiles\x12\x1b\n\x08uri_path\x18\x01 \x01(\tH\x00R\x07uriPath\x12$\n\ruri_path_glob\x18\x02 \x01(\tH\x00R\x0buriPathGlob\x12\x1b\n\x08uri_file\x18\x03 \x01(\tH\x00R\x07uriFile\x12\x1f\n\nuri_folder\x18\x04 \x01(\tH\x00R\turiFolder\x12\'\n\x0fpartition_index\x18\x06 \x01(\x04R\x0epartitionIndex\x12\x14\n\x05start\x18\x07 \x01(\x04R\x05start\x12\x16\n\x06length\x18\x08 \x01(\x04R\x06length\x12T\n\x07parquet\x18\t \x01(\x0b28.proto.ReadRel.LocalFiles.FileOrFiles.ParquetReadOptionsH\x01R\x07parquet\x12N\n\x05arrow\x18\n \x01(\x0b26.proto.ReadRel.LocalFiles.FileOrFiles.ArrowReadOptionsH\x01R\x05arrow\x12H\n\x03orc\x18\x0b \x01(\x0b24.proto.ReadRel.LocalFiles.FileOrFiles.OrcReadOptionsH\x01R\x03orc\x124\n\textension\x18\x0c \x01(\x0b2\x14.google.protobuf.AnyH\x01R\textension\x12K\n\x04dwrf\x18\r \x01(\x0b25.proto.ReadRel.LocalFiles.FileOrFiles.DwrfReadOptionsH\x01R\x04dwrf\x12]\n\x04text\x18\x0e \x01(\x0b2G.proto.ReadRel.LocalFiles.FileOrFiles.DelimiterSeparatedTextReadOptionsH\x01R\x04text\x1a\x14\n\x12ParquetReadOptions\x1a\x12\n\x10ArrowReadOptions\x1a\x10\n\x0eOrcReadOptions\x1a\x11\n\x0fDwrfReadOptions\x1a\xa1\x02\n!DelimiterSeparatedTextReadOptions\x12\'\n\x0ffield_delimiter\x18\x01 \x01(\tR\x0efieldDelimiter\x12"\n\rmax_line_size\x18\x02 \x01(\x04R\x0bmaxLineSize\x12\x14\n\x05quote\x18\x03 \x01(\tR\x05quote\x12/\n\x14header_lines_to_skip\x18\x04 \x01(\x04R\x11headerLinesToSkip\x12\x16\n\x06escape\x18\x05 \x01(\tR\x06escape\x126\n\x15value_treated_as_null\x18\x06 \x01(\tH\x00R\x12valueTreatedAsNull\x88\x01\x01B\x18\n\x16_value_treated_as_nullB\x0b\n\tpath_typeB\r\n\x0bfile_formatJ\x04\x08\x05\x10\x06R\x06formatB\x0b\n\tread_type"\xe1\x01\n\nProjectRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x123\n\x0bexpressions\x18\x03 \x03(\x0b2\x11.proto.ExpressionR\x0bexpressions\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xb1\x05\n\x07JoinRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x121\n\nexpression\x18\x04 \x01(\x0b2\x11.proto.ExpressionR\nexpression\x12;\n\x10post_join_filter\x18\x05 \x01(\x0b2\x11.proto.ExpressionR\x0epostJoinFilter\x12+\n\x04type\x18\x06 \x01(\x0e2\x17.proto.JoinRel.JoinTypeR\x04type\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xc8\x02\n\x08JoinType\x12\x19\n\x15JOIN_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fJOIN_TYPE_INNER\x10\x01\x12\x13\n\x0fJOIN_TYPE_OUTER\x10\x02\x12\x12\n\x0eJOIN_TYPE_LEFT\x10\x03\x12\x13\n\x0fJOIN_TYPE_RIGHT\x10\x04\x12\x17\n\x13JOIN_TYPE_LEFT_SEMI\x10\x05\x12\x17\n\x13JOIN_TYPE_LEFT_ANTI\x10\x06\x12\x19\n\x15JOIN_TYPE_LEFT_SINGLE\x10\x07\x12\x18\n\x14JOIN_TYPE_RIGHT_SEMI\x10\x08\x12\x18\n\x14JOIN_TYPE_RIGHT_ANTI\x10\t\x12\x1a\n\x16JOIN_TYPE_RIGHT_SINGLE\x10\n\x12\x17\n\x13JOIN_TYPE_LEFT_MARK\x10\x0b\x12\x18\n\x14JOIN_TYPE_RIGHT_MARK\x10\x0c"\xca\x01\n\x08CrossRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xeb\x02\n\x08FetchRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12\x1c\n\x06offset\x18\x03 \x01(\x03B\x02\x18\x01H\x00R\x06offset\x124\n\x0boffset_expr\x18\x05 \x01(\x0b2\x11.proto.ExpressionH\x00R\noffsetExpr\x12\x1a\n\x05count\x18\x04 \x01(\x03B\x02\x18\x01H\x01R\x05count\x122\n\ncount_expr\x18\x06 \x01(\x0b2\x11.proto.ExpressionH\x01R\tcountExpr\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtensionB\r\n\x0boffset_modeB\x0c\n\ncount_mode"\xdf\x04\n\x0cAggregateRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12:\n\tgroupings\x18\x03 \x03(\x0b2\x1c.proto.AggregateRel.GroupingR\tgroupings\x127\n\x08measures\x18\x04 \x03(\x0b2\x1b.proto.AggregateRel.MeasureR\x08measures\x12D\n\x14grouping_expressions\x18\x05 \x03(\x0b2\x11.proto.ExpressionR\x13groupingExpressions\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\x89\x01\n\x08Grouping\x12H\n\x14grouping_expressions\x18\x01 \x03(\x0b2\x11.proto.ExpressionB\x02\x18\x01R\x13groupingExpressions\x123\n\x15expression_references\x18\x02 \x03(\rR\x14expressionReferences\x1ah\n\x07Measure\x122\n\x07measure\x18\x01 \x01(\x0b2\x18.proto.AggregateFunctionR\x07measure\x12)\n\x06filter\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x06filter"\xca\x07\n\x1cConsistentPartitionWindowRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12`\n\x10window_functions\x18\x03 \x03(\x0b25.proto.ConsistentPartitionWindowRel.WindowRelFunctionR\x0fwindowFunctions\x12F\n\x15partition_expressions\x18\x04 \x03(\x0b2\x11.proto.ExpressionR\x14partitionExpressions\x12&\n\x05sorts\x18\x05 \x03(\x0b2\x10.proto.SortFieldR\x05sorts\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1a\xb7\x04\n\x11WindowRelFunction\x12-\n\x12function_reference\x18\x01 \x01(\rR\x11functionReference\x125\n\targuments\x18\t \x03(\x0b2\x17.proto.FunctionArgumentR\targuments\x12/\n\x07options\x18\x0b \x03(\x0b2\x15.proto.FunctionOptionR\x07options\x12,\n\x0boutput_type\x18\x07 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12-\n\x05phase\x18\x06 \x01(\x0e2\x17.proto.AggregationPhaseR\x05phase\x12N\n\ninvocation\x18\n \x01(\x0e2..proto.AggregateFunction.AggregationInvocationR\ninvocation\x12G\n\x0blower_bound\x18\x05 \x01(\x0b2&.proto.Expression.WindowFunction.BoundR\nlowerBound\x12G\n\x0bupper_bound\x18\x04 \x01(\x0b2&.proto.Expression.WindowFunction.BoundR\nupperBound\x12L\n\x0bbounds_type\x18\x0c \x01(\x0e2+.proto.Expression.WindowFunction.BoundsTypeR\nboundsType"\xd1\x01\n\x07SortRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12&\n\x05sorts\x18\x03 \x03(\x0b2\x10.proto.SortFieldR\x05sorts\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xdc\x01\n\tFilterRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12/\n\tcondition\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\tcondition\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xde\x03\n\x06SetRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12"\n\x06inputs\x18\x02 \x03(\x0b2\n.proto.RelR\x06inputs\x12#\n\x02op\x18\x03 \x01(\x0e2\x13.proto.SetRel.SetOpR\x02op\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\x8c\x02\n\x05SetOp\x12\x16\n\x12SET_OP_UNSPECIFIED\x10\x00\x12\x18\n\x14SET_OP_MINUS_PRIMARY\x10\x01\x12\x1c\n\x18SET_OP_MINUS_PRIMARY_ALL\x10\x07\x12\x19\n\x15SET_OP_MINUS_MULTISET\x10\x02\x12\x1f\n\x1bSET_OP_INTERSECTION_PRIMARY\x10\x03\x12 \n\x1cSET_OP_INTERSECTION_MULTISET\x10\x04\x12$\n SET_OP_INTERSECTION_MULTISET_ALL\x10\x08\x12\x19\n\x15SET_OP_UNION_DISTINCT\x10\x05\x12\x14\n\x10SET_OP_UNION_ALL\x10\x06"\x8e\x01\n\x12ExtensionSingleRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12,\n\x06detail\x18\x03 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail"j\n\x10ExtensionLeafRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12,\n\x06detail\x18\x02 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail"\x8f\x01\n\x11ExtensionMultiRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12"\n\x06inputs\x18\x02 \x03(\x0b2\n.proto.RelR\x06inputs\x12,\n\x06detail\x18\x03 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail"\xe9\x08\n\x0bExchangeRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x12\'\n\x0fpartition_count\x18\x03 \x01(\x05R\x0epartitionCount\x12;\n\x07targets\x18\x04 \x03(\x0b2!.proto.ExchangeRel.ExchangeTargetR\x07targets\x12N\n\x11scatter_by_fields\x18\x05 \x01(\x0b2 .proto.ExchangeRel.ScatterFieldsH\x00R\x0fscatterByFields\x12P\n\rsingle_target\x18\x06 \x01(\x0b2).proto.ExchangeRel.SingleBucketExpressionH\x00R\x0csingleTarget\x12M\n\x0cmulti_target\x18\x07 \x01(\x0b2(.proto.ExchangeRel.MultiBucketExpressionH\x00R\x0bmultiTarget\x12@\n\x0bround_robin\x18\x08 \x01(\x0b2\x1d.proto.ExchangeRel.RoundRobinH\x00R\nroundRobin\x12<\n\tbroadcast\x18\t \x01(\x0b2\x1c.proto.ExchangeRel.BroadcastH\x00R\tbroadcast\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1aI\n\rScatterFields\x128\n\x06fields\x18\x01 \x03(\x0b2 .proto.Expression.FieldReferenceR\x06fields\x1aK\n\x16SingleBucketExpression\x121\n\nexpression\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\nexpression\x1a|\n\x15MultiBucketExpression\x121\n\nexpression\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\nexpression\x120\n\x14constrained_to_count\x18\x02 \x01(\x08R\x12constrainedToCount\x1a\x0b\n\tBroadcast\x1a"\n\nRoundRobin\x12\x14\n\x05exact\x18\x01 \x01(\x08R\x05exact\x1a\x8a\x01\n\x0eExchangeTarget\x12!\n\x0cpartition_id\x18\x01 \x03(\x05R\x0bpartitionId\x12\x12\n\x03uri\x18\x02 \x01(\tH\x00R\x03uri\x122\n\x08extended\x18\x03 \x01(\x0b2\x14.google.protobuf.AnyH\x00R\x08extendedB\r\n\x0btarget_typeB\x0f\n\rexchange_kind"\xfc\x02\n\tExpandRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12 \n\x05input\x18\x02 \x01(\x0b2\n.proto.RelR\x05input\x124\n\x06fields\x18\x04 \x03(\x0b2\x1c.proto.ExpandRel.ExpandFieldR\x06fields\x1a\xa7\x01\n\x0bExpandField\x12J\n\x0fswitching_field\x18\x02 \x01(\x0b2\x1f.proto.ExpandRel.SwitchingFieldH\x00R\x0eswitchingField\x12>\n\x10consistent_field\x18\x03 \x01(\x0b2\x11.proto.ExpressionH\x00R\x0fconsistentFieldB\x0c\n\nfield_type\x1aC\n\x0eSwitchingField\x121\n\nduplicates\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\nduplicates"A\n\x07RelRoot\x12 \n\x05input\x18\x01 \x01(\x0b2\n.proto.RelR\x05input\x12\x14\n\x05names\x18\x02 \x03(\tR\x05names"\xd0\x08\n\x03Rel\x12$\n\x04read\x18\x01 \x01(\x0b2\x0e.proto.ReadRelH\x00R\x04read\x12*\n\x06filter\x18\x02 \x01(\x0b2\x10.proto.FilterRelH\x00R\x06filter\x12\'\n\x05fetch\x18\x03 \x01(\x0b2\x0f.proto.FetchRelH\x00R\x05fetch\x123\n\taggregate\x18\x04 \x01(\x0b2\x13.proto.AggregateRelH\x00R\taggregate\x12$\n\x04sort\x18\x05 \x01(\x0b2\x0e.proto.SortRelH\x00R\x04sort\x12$\n\x04join\x18\x06 \x01(\x0b2\x0e.proto.JoinRelH\x00R\x04join\x12-\n\x07project\x18\x07 \x01(\x0b2\x11.proto.ProjectRelH\x00R\x07project\x12!\n\x03set\x18\x08 \x01(\x0b2\r.proto.SetRelH\x00R\x03set\x12F\n\x10extension_single\x18\t \x01(\x0b2\x19.proto.ExtensionSingleRelH\x00R\x0fextensionSingle\x12C\n\x0fextension_multi\x18\n \x01(\x0b2\x18.proto.ExtensionMultiRelH\x00R\x0eextensionMulti\x12@\n\x0eextension_leaf\x18\x0b \x01(\x0b2\x17.proto.ExtensionLeafRelH\x00R\rextensionLeaf\x12\'\n\x05cross\x18\x0c \x01(\x0b2\x0f.proto.CrossRelH\x00R\x05cross\x123\n\treference\x18\x15 \x01(\x0b2\x13.proto.ReferenceRelH\x00R\treference\x12\'\n\x05write\x18\x13 \x01(\x0b2\x0f.proto.WriteRelH\x00R\x05write\x12!\n\x03ddl\x18\x14 \x01(\x0b2\r.proto.DdlRelH\x00R\x03ddl\x12*\n\x06update\x18\x16 \x01(\x0b2\x10.proto.UpdateRelH\x00R\x06update\x121\n\thash_join\x18\r \x01(\x0b2\x12.proto.HashJoinRelH\x00R\x08hashJoin\x124\n\nmerge_join\x18\x0e \x01(\x0b2\x13.proto.MergeJoinRelH\x00R\tmergeJoin\x12D\n\x10nested_loop_join\x18\x12 \x01(\x0b2\x18.proto.NestedLoopJoinRelH\x00R\x0enestedLoopJoin\x12=\n\x06window\x18\x11 \x01(\x0b2#.proto.ConsistentPartitionWindowRelH\x00R\x06window\x120\n\x08exchange\x18\x0f \x01(\x0b2\x12.proto.ExchangeRelH\x00R\x08exchange\x12*\n\x06expand\x18\x10 \x01(\x0b2\x10.proto.ExpandRelH\x00R\x06expandB\n\n\x08rel_type"|\n\x10NamedObjectWrite\x12\x14\n\x05names\x18\x01 \x03(\tR\x05names\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"?\n\x0fExtensionObject\x12,\n\x06detail\x18\x01 \x01(\x0b2\x14.google.protobuf.AnyR\x06detail"\x86\x06\n\x06DdlRel\x12<\n\x0cnamed_object\x18\x01 \x01(\x0b2\x17.proto.NamedObjectWriteH\x00R\x0bnamedObject\x12C\n\x10extension_object\x18\x02 \x01(\x0b2\x16.proto.ExtensionObjectH\x00R\x0fextensionObject\x125\n\x0ctable_schema\x18\x03 \x01(\x0b2\x12.proto.NamedStructR\x0btableSchema\x12G\n\x0etable_defaults\x18\x04 \x01(\x0b2 .proto.Expression.Literal.StructR\rtableDefaults\x12/\n\x06object\x18\x05 \x01(\x0e2\x17.proto.DdlRel.DdlObjectR\x06object\x12#\n\x02op\x18\x06 \x01(\x0e2\x13.proto.DdlRel.DdlOpR\x02op\x123\n\x0fview_definition\x18\x07 \x01(\x0b2\n.proto.RelR\x0eviewDefinition\x12(\n\x06common\x18\x08 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12R\n\x12advanced_extension\x18\t \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"R\n\tDdlObject\x12\x1a\n\x16DDL_OBJECT_UNSPECIFIED\x10\x00\x12\x14\n\x10DDL_OBJECT_TABLE\x10\x01\x12\x13\n\x0fDDL_OBJECT_VIEW\x10\x02"\x8d\x01\n\x05DdlOp\x12\x16\n\x12DDL_OP_UNSPECIFIED\x10\x00\x12\x11\n\rDDL_OP_CREATE\x10\x01\x12\x1c\n\x18DDL_OP_CREATE_OR_REPLACE\x10\x02\x12\x10\n\x0cDDL_OP_ALTER\x10\x03\x12\x0f\n\x0bDDL_OP_DROP\x10\x04\x12\x18\n\x14DDL_OP_DROP_IF_EXIST\x10\x05B\x0c\n\nwrite_type"\x9b\x07\n\x08WriteRel\x12:\n\x0bnamed_table\x18\x01 \x01(\x0b2\x17.proto.NamedObjectWriteH\x00R\nnamedTable\x12A\n\x0fextension_table\x18\x02 \x01(\x0b2\x16.proto.ExtensionObjectH\x00R\x0eextensionTable\x125\n\x0ctable_schema\x18\x03 \x01(\x0b2\x12.proto.NamedStructR\x0btableSchema\x12\'\n\x02op\x18\x04 \x01(\x0e2\x17.proto.WriteRel.WriteOpR\x02op\x12 \n\x05input\x18\x05 \x01(\x0b2\n.proto.RelR\x05input\x12;\n\x0bcreate_mode\x18\x08 \x01(\x0e2\x1a.proto.WriteRel.CreateModeR\ncreateMode\x122\n\x06output\x18\x06 \x01(\x0e2\x1a.proto.WriteRel.OutputModeR\x06output\x12(\n\x06common\x18\x07 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12R\n\x12advanced_extension\x18\t \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"u\n\x07WriteOp\x12\x18\n\x14WRITE_OP_UNSPECIFIED\x10\x00\x12\x13\n\x0fWRITE_OP_INSERT\x10\x01\x12\x13\n\x0fWRITE_OP_DELETE\x10\x02\x12\x13\n\x0fWRITE_OP_UPDATE\x10\x03\x12\x11\n\rWRITE_OP_CTAS\x10\x04"\xb1\x01\n\nCreateMode\x12\x1b\n\x17CREATE_MODE_UNSPECIFIED\x10\x00\x12 \n\x1cCREATE_MODE_APPEND_IF_EXISTS\x10\x01\x12!\n\x1dCREATE_MODE_REPLACE_IF_EXISTS\x10\x02\x12 \n\x1cCREATE_MODE_IGNORE_IF_EXISTS\x10\x03\x12\x1f\n\x1bCREATE_MODE_ERROR_IF_EXISTS\x10\x04"f\n\nOutputMode\x12\x1b\n\x17OUTPUT_MODE_UNSPECIFIED\x10\x00\x12\x19\n\x15OUTPUT_MODE_NO_OUTPUT\x10\x01\x12 \n\x1cOUTPUT_MODE_MODIFIED_RECORDS\x10\x02B\x0c\n\nwrite_type"\xd3\x03\n\tUpdateRel\x124\n\x0bnamed_table\x18\x01 \x01(\x0b2\x11.proto.NamedTableH\x00R\nnamedTable\x125\n\x0ctable_schema\x18\x02 \x01(\x0b2\x12.proto.NamedStructR\x0btableSchema\x12/\n\tcondition\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\tcondition\x12N\n\x0ftransformations\x18\x04 \x03(\x0b2$.proto.UpdateRel.TransformExpressionR\x0ftransformations\x12R\n\x12advanced_extension\x18\x05 \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension\x1au\n\x13TransformExpression\x129\n\x0etransformation\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x0etransformation\x12#\n\rcolumn_target\x18\x02 \x01(\x05R\x0ccolumnTargetB\r\n\x0bupdate_type"v\n\nNamedTable\x12\x14\n\x05names\x18\x01 \x03(\tR\x05names\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xab\x04\n\x11ComparisonJoinKey\x124\n\x04left\x18\x01 \x01(\x0b2 .proto.Expression.FieldReferenceR\x04left\x126\n\x05right\x18\x02 \x01(\x0b2 .proto.Expression.FieldReferenceR\x05right\x12G\n\ncomparison\x18\x03 \x01(\x0b2\'.proto.ComparisonJoinKey.ComparisonTypeR\ncomparison\x1a\xa5\x01\n\x0eComparisonType\x12G\n\x06simple\x18\x01 \x01(\x0e2-.proto.ComparisonJoinKey.SimpleComparisonTypeH\x00R\x06simple\x12<\n\x19custom_function_reference\x18\x02 \x01(\rH\x00R\x17customFunctionReferenceB\x0c\n\ninner_type"\xb6\x01\n\x14SimpleComparisonType\x12&\n"SIMPLE_COMPARISON_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19SIMPLE_COMPARISON_TYPE_EQ\x10\x01\x12/\n+SIMPLE_COMPARISON_TYPE_IS_NOT_DISTINCT_FROM\x10\x02\x12&\n"SIMPLE_COMPARISON_TYPE_MIGHT_EQUAL\x10\x03"\xd4\x07\n\x0bHashJoinRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x12A\n\tleft_keys\x18\x04 \x03(\x0b2 .proto.Expression.FieldReferenceB\x02\x18\x01R\x08leftKeys\x12C\n\nright_keys\x18\x05 \x03(\x0b2 .proto.Expression.FieldReferenceB\x02\x18\x01R\trightKeys\x12,\n\x04keys\x18\x08 \x03(\x0b2\x18.proto.ComparisonJoinKeyR\x04keys\x12;\n\x10post_join_filter\x18\x06 \x01(\x0b2\x11.proto.ExpressionR\x0epostJoinFilter\x12/\n\x04type\x18\x07 \x01(\x0e2\x1b.proto.HashJoinRel.JoinTypeR\x04type\x12>\n\x0bbuild_input\x18\t \x01(\x0e2\x1d.proto.HashJoinRel.BuildInputR\nbuildInput\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xc8\x02\n\x08JoinType\x12\x19\n\x15JOIN_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fJOIN_TYPE_INNER\x10\x01\x12\x13\n\x0fJOIN_TYPE_OUTER\x10\x02\x12\x12\n\x0eJOIN_TYPE_LEFT\x10\x03\x12\x13\n\x0fJOIN_TYPE_RIGHT\x10\x04\x12\x17\n\x13JOIN_TYPE_LEFT_SEMI\x10\x05\x12\x18\n\x14JOIN_TYPE_RIGHT_SEMI\x10\x06\x12\x17\n\x13JOIN_TYPE_LEFT_ANTI\x10\x07\x12\x18\n\x14JOIN_TYPE_RIGHT_ANTI\x10\x08\x12\x19\n\x15JOIN_TYPE_LEFT_SINGLE\x10\t\x12\x1a\n\x16JOIN_TYPE_RIGHT_SINGLE\x10\n\x12\x17\n\x13JOIN_TYPE_LEFT_MARK\x10\x0b\x12\x18\n\x14JOIN_TYPE_RIGHT_MARK\x10\x0c"V\n\nBuildInput\x12\x1b\n\x17BUILD_INPUT_UNSPECIFIED\x10\x00\x12\x14\n\x10BUILD_INPUT_LEFT\x10\x01\x12\x15\n\x11BUILD_INPUT_RIGHT\x10\x02"\xbe\x06\n\x0cMergeJoinRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x12A\n\tleft_keys\x18\x04 \x03(\x0b2 .proto.Expression.FieldReferenceB\x02\x18\x01R\x08leftKeys\x12C\n\nright_keys\x18\x05 \x03(\x0b2 .proto.Expression.FieldReferenceB\x02\x18\x01R\trightKeys\x12,\n\x04keys\x18\x08 \x03(\x0b2\x18.proto.ComparisonJoinKeyR\x04keys\x12;\n\x10post_join_filter\x18\x06 \x01(\x0b2\x11.proto.ExpressionR\x0epostJoinFilter\x120\n\x04type\x18\x07 \x01(\x0e2\x1c.proto.MergeJoinRel.JoinTypeR\x04type\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xc8\x02\n\x08JoinType\x12\x19\n\x15JOIN_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fJOIN_TYPE_INNER\x10\x01\x12\x13\n\x0fJOIN_TYPE_OUTER\x10\x02\x12\x12\n\x0eJOIN_TYPE_LEFT\x10\x03\x12\x13\n\x0fJOIN_TYPE_RIGHT\x10\x04\x12\x17\n\x13JOIN_TYPE_LEFT_SEMI\x10\x05\x12\x18\n\x14JOIN_TYPE_RIGHT_SEMI\x10\x06\x12\x17\n\x13JOIN_TYPE_LEFT_ANTI\x10\x07\x12\x18\n\x14JOIN_TYPE_RIGHT_ANTI\x10\x08\x12\x19\n\x15JOIN_TYPE_LEFT_SINGLE\x10\t\x12\x1a\n\x16JOIN_TYPE_RIGHT_SINGLE\x10\n\x12\x17\n\x13JOIN_TYPE_LEFT_MARK\x10\x0b\x12\x18\n\x14JOIN_TYPE_RIGHT_MARK\x10\x0c"\x88\x05\n\x11NestedLoopJoinRel\x12(\n\x06common\x18\x01 \x01(\x0b2\x10.proto.RelCommonR\x06common\x12\x1e\n\x04left\x18\x02 \x01(\x0b2\n.proto.RelR\x04left\x12 \n\x05right\x18\x03 \x01(\x0b2\n.proto.RelR\x05right\x121\n\nexpression\x18\x04 \x01(\x0b2\x11.proto.ExpressionR\nexpression\x125\n\x04type\x18\x05 \x01(\x0e2!.proto.NestedLoopJoinRel.JoinTypeR\x04type\x12R\n\x12advanced_extension\x18\n \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x11advancedExtension"\xc8\x02\n\x08JoinType\x12\x19\n\x15JOIN_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fJOIN_TYPE_INNER\x10\x01\x12\x13\n\x0fJOIN_TYPE_OUTER\x10\x02\x12\x12\n\x0eJOIN_TYPE_LEFT\x10\x03\x12\x13\n\x0fJOIN_TYPE_RIGHT\x10\x04\x12\x17\n\x13JOIN_TYPE_LEFT_SEMI\x10\x05\x12\x18\n\x14JOIN_TYPE_RIGHT_SEMI\x10\x06\x12\x17\n\x13JOIN_TYPE_LEFT_ANTI\x10\x07\x12\x18\n\x14JOIN_TYPE_RIGHT_ANTI\x10\x08\x12\x19\n\x15JOIN_TYPE_LEFT_SINGLE\x10\t\x12\x1a\n\x16JOIN_TYPE_RIGHT_SINGLE\x10\n\x12\x17\n\x13JOIN_TYPE_LEFT_MARK\x10\x0b\x12\x18\n\x14JOIN_TYPE_RIGHT_MARK\x10\x0c"\x82\x01\n\x10FunctionArgument\x12\x14\n\x04enum\x18\x01 \x01(\tH\x00R\x04enum\x12!\n\x04type\x18\x02 \x01(\x0b2\x0b.proto.TypeH\x00R\x04type\x12)\n\x05value\x18\x03 \x01(\x0b2\x11.proto.ExpressionH\x00R\x05valueB\n\n\x08arg_type"D\n\x0eFunctionOption\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1e\n\npreference\x18\x02 \x03(\tR\npreference"\xdfW\n\nExpression\x125\n\x07literal\x18\x01 \x01(\x0b2\x19.proto.Expression.LiteralH\x00R\x07literal\x12@\n\tselection\x18\x02 \x01(\x0b2 .proto.Expression.FieldReferenceH\x00R\tselection\x12K\n\x0fscalar_function\x18\x03 \x01(\x0b2 .proto.Expression.ScalarFunctionH\x00R\x0escalarFunction\x12K\n\x0fwindow_function\x18\x05 \x01(\x0b2 .proto.Expression.WindowFunctionH\x00R\x0ewindowFunction\x123\n\x07if_then\x18\x06 \x01(\x0b2\x18.proto.Expression.IfThenH\x00R\x06ifThen\x12Q\n\x11switch_expression\x18\x07 \x01(\x0b2".proto.Expression.SwitchExpressionH\x00R\x10switchExpression\x12L\n\x10singular_or_list\x18\x08 \x01(\x0b2 .proto.Expression.SingularOrListH\x00R\x0esingularOrList\x12C\n\rmulti_or_list\x18\t \x01(\x0b2\x1d.proto.Expression.MultiOrListH\x00R\x0bmultiOrList\x12,\n\x04cast\x18\x0b \x01(\x0b2\x16.proto.Expression.CastH\x00R\x04cast\x128\n\x08subquery\x18\x0c \x01(\x0b2\x1a.proto.Expression.SubqueryH\x00R\x08subquery\x122\n\x06nested\x18\r \x01(\x0b2\x18.proto.Expression.NestedH\x00R\x06nested\x12F\n\x11dynamic_parameter\x18\x0e \x01(\x0b2\x17.proto.DynamicParameterH\x00R\x10dynamicParameter\x120\n\x04enum\x18\n \x01(\x0b2\x16.proto.Expression.EnumB\x02\x18\x01H\x00R\x04enum\x1a\x86\x01\n\x04Enum\x12\x1e\n\tspecified\x18\x01 \x01(\tH\x00R\tspecified\x12@\n\x0bunspecified\x18\x02 \x01(\x0b2\x1c.proto.Expression.Enum.EmptyH\x00R\x0bunspecified\x1a\x0b\n\x05Empty:\x02\x18\x01:\x02\x18\x01B\x0b\n\tenum_kind\x1a\xde\x16\n\x07Literal\x12\x1a\n\x07boolean\x18\x01 \x01(\x08H\x00R\x07boolean\x12\x10\n\x02i8\x18\x02 \x01(\x05H\x00R\x02i8\x12\x12\n\x03i16\x18\x03 \x01(\x05H\x00R\x03i16\x12\x12\n\x03i32\x18\x05 \x01(\x05H\x00R\x03i32\x12\x12\n\x03i64\x18\x07 \x01(\x03H\x00R\x03i64\x12\x14\n\x04fp32\x18\n \x01(\x02H\x00R\x04fp32\x12\x14\n\x04fp64\x18\x0b \x01(\x01H\x00R\x04fp64\x12\x18\n\x06string\x18\x0c \x01(\tH\x00R\x06string\x12\x18\n\x06binary\x18\r \x01(\x0cH\x00R\x06binary\x12"\n\ttimestamp\x18\x0e \x01(\x03B\x02\x18\x01H\x00R\ttimestamp\x12\x14\n\x04date\x18\x10 \x01(\x05H\x00R\x04date\x12\x14\n\x04time\x18\x11 \x01(\x03H\x00R\x04time\x12d\n\x16interval_year_to_month\x18\x13 \x01(\x0b2-.proto.Expression.Literal.IntervalYearToMonthH\x00R\x13intervalYearToMonth\x12d\n\x16interval_day_to_second\x18\x14 \x01(\x0b2-.proto.Expression.Literal.IntervalDayToSecondH\x00R\x13intervalDayToSecond\x12Y\n\x11interval_compound\x18$ \x01(\x0b2*.proto.Expression.Literal.IntervalCompoundH\x00R\x10intervalCompound\x12\x1f\n\nfixed_char\x18\x15 \x01(\tH\x00R\tfixedChar\x12>\n\x08var_char\x18\x16 \x01(\x0b2!.proto.Expression.Literal.VarCharH\x00R\x07varChar\x12#\n\x0cfixed_binary\x18\x17 \x01(\x0cH\x00R\x0bfixedBinary\x12=\n\x07decimal\x18\x18 \x01(\x0b2!.proto.Expression.Literal.DecimalH\x00R\x07decimal\x12P\n\x0eprecision_time\x18% \x01(\x0b2\'.proto.Expression.Literal.PrecisionTimeH\x00R\rprecisionTime\x12_\n\x13precision_timestamp\x18" \x01(\x0b2,.proto.Expression.Literal.PrecisionTimestampH\x00R\x12precisionTimestamp\x12d\n\x16precision_timestamp_tz\x18# \x01(\x0b2,.proto.Expression.Literal.PrecisionTimestampH\x00R\x14precisionTimestampTz\x12:\n\x06struct\x18\x19 \x01(\x0b2 .proto.Expression.Literal.StructH\x00R\x06struct\x121\n\x03map\x18\x1a \x01(\x0b2\x1d.proto.Expression.Literal.MapH\x00R\x03map\x12\'\n\x0ctimestamp_tz\x18\x1b \x01(\x03B\x02\x18\x01H\x00R\x0btimestampTz\x12\x14\n\x04uuid\x18\x1c \x01(\x0cH\x00R\x04uuid\x12!\n\x04null\x18\x1d \x01(\x0b2\x0b.proto.TypeH\x00R\x04null\x124\n\x04list\x18\x1e \x01(\x0b2\x1e.proto.Expression.Literal.ListH\x00R\x04list\x121\n\nempty_list\x18\x1f \x01(\x0b2\x10.proto.Type.ListH\x00R\temptyList\x12.\n\tempty_map\x18 \x01(\x0b2\x0f.proto.Type.MapH\x00R\x08emptyMap\x12J\n\x0cuser_defined\x18! \x01(\x0b2%.proto.Expression.Literal.UserDefinedH\x00R\x0buserDefined\x12\x1a\n\x08nullable\x182 \x01(\x08R\x08nullable\x128\n\x18type_variation_reference\x183 \x01(\rR\x16typeVariationReference\x1a7\n\x07VarChar\x12\x14\n\x05value\x18\x01 \x01(\tR\x05value\x12\x16\n\x06length\x18\x02 \x01(\rR\x06length\x1aS\n\x07Decimal\x12\x14\n\x05value\x18\x01 \x01(\x0cR\x05value\x12\x1c\n\tprecision\x18\x02 \x01(\x05R\tprecision\x12\x14\n\x05scale\x18\x03 \x01(\x05R\x05scale\x1aC\n\rPrecisionTime\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value\x1aH\n\x12PrecisionTimestamp\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value\x1a\xb6\x01\n\x03Map\x12E\n\nkey_values\x18\x01 \x03(\x0b2&.proto.Expression.Literal.Map.KeyValueR\tkeyValues\x1ah\n\x08KeyValue\x12+\n\x03key\x18\x01 \x01(\x0b2\x19.proto.Expression.LiteralR\x03key\x12/\n\x05value\x18\x02 \x01(\x0b2\x19.proto.Expression.LiteralR\x05value\x1aC\n\x13IntervalYearToMonth\x12\x14\n\x05years\x18\x01 \x01(\x05R\x05years\x12\x16\n\x06months\x18\x02 \x01(\x05R\x06months\x1a\xbf\x01\n\x13IntervalDayToSecond\x12\x12\n\x04days\x18\x01 \x01(\x05R\x04days\x12\x18\n\x07seconds\x18\x02 \x01(\x05R\x07seconds\x12(\n\x0cmicroseconds\x18\x03 \x01(\x05B\x02\x18\x01H\x00R\x0cmicroseconds\x12\x1e\n\tprecision\x18\x04 \x01(\x05H\x00R\tprecision\x12\x1e\n\nsubseconds\x18\x05 \x01(\x03R\nsubsecondsB\x10\n\x0eprecision_mode\x1a\xda\x01\n\x10IntervalCompound\x12b\n\x16interval_year_to_month\x18\x01 \x01(\x0b2-.proto.Expression.Literal.IntervalYearToMonthR\x13intervalYearToMonth\x12b\n\x16interval_day_to_second\x18\x02 \x01(\x0b2-.proto.Expression.Literal.IntervalDayToSecondR\x13intervalDayToSecond\x1a;\n\x06Struct\x121\n\x06fields\x18\x01 \x03(\x0b2\x19.proto.Expression.LiteralR\x06fields\x1a9\n\x04List\x121\n\x06values\x18\x01 \x03(\x0b2\x19.proto.Expression.LiteralR\x06values\x1a\xe5\x01\n\x0bUserDefined\x12%\n\x0etype_reference\x18\x01 \x01(\rR\rtypeReference\x12>\n\x0ftype_parameters\x18\x03 \x03(\x0b2\x15.proto.Type.ParameterR\x0etypeParameters\x12,\n\x05value\x18\x02 \x01(\x0b2\x14.google.protobuf.AnyH\x00R\x05value\x12:\n\x06struct\x18\x04 \x01(\x0b2 .proto.Expression.Literal.StructH\x00R\x06structB\x05\n\x03valB\x0e\n\x0cliteral_type\x1a\x9f\x04\n\x06Nested\x12\x1a\n\x08nullable\x18\x01 \x01(\x08R\x08nullable\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x06struct\x18\x03 \x01(\x0b2\x1f.proto.Expression.Nested.StructH\x00R\x06struct\x123\n\x04list\x18\x04 \x01(\x0b2\x1d.proto.Expression.Nested.ListH\x00R\x04list\x120\n\x03map\x18\x05 \x01(\x0b2\x1c.proto.Expression.Nested.MapH\x00R\x03map\x1a\xa5\x01\n\x03Map\x12D\n\nkey_values\x18\x01 \x03(\x0b2%.proto.Expression.Nested.Map.KeyValueR\tkeyValues\x1aX\n\x08KeyValue\x12#\n\x03key\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x03key\x12\'\n\x05value\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x05value\x1a3\n\x06Struct\x12)\n\x06fields\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x06fields\x1a1\n\x04List\x12)\n\x06values\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x06valuesB\r\n\x0bnested_type\x1a\x80\x02\n\x0eScalarFunction\x12-\n\x12function_reference\x18\x01 \x01(\rR\x11functionReference\x125\n\targuments\x18\x04 \x03(\x0b2\x17.proto.FunctionArgumentR\targuments\x12/\n\x07options\x18\x05 \x03(\x0b2\x15.proto.FunctionOptionR\x07options\x12,\n\x0boutput_type\x18\x03 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12)\n\x04args\x18\x02 \x03(\x0b2\x11.proto.ExpressionB\x02\x18\x01R\x04args\x1a\xd5\t\n\x0eWindowFunction\x12-\n\x12function_reference\x18\x01 \x01(\rR\x11functionReference\x125\n\targuments\x18\t \x03(\x0b2\x17.proto.FunctionArgumentR\targuments\x12/\n\x07options\x18\x0b \x03(\x0b2\x15.proto.FunctionOptionR\x07options\x12,\n\x0boutput_type\x18\x07 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12-\n\x05phase\x18\x06 \x01(\x0e2\x17.proto.AggregationPhaseR\x05phase\x12&\n\x05sorts\x18\x03 \x03(\x0b2\x10.proto.SortFieldR\x05sorts\x12N\n\ninvocation\x18\n \x01(\x0e2..proto.AggregateFunction.AggregationInvocationR\ninvocation\x121\n\npartitions\x18\x02 \x03(\x0b2\x11.proto.ExpressionR\npartitions\x12L\n\x0bbounds_type\x18\x0c \x01(\x0e2+.proto.Expression.WindowFunction.BoundsTypeR\nboundsType\x12G\n\x0blower_bound\x18\x05 \x01(\x0b2&.proto.Expression.WindowFunction.BoundR\nlowerBound\x12G\n\x0bupper_bound\x18\x04 \x01(\x0b2&.proto.Expression.WindowFunction.BoundR\nupperBound\x12)\n\x04args\x18\x08 \x03(\x0b2\x11.proto.ExpressionB\x02\x18\x01R\x04args\x1a\xc0\x03\n\x05Bound\x12P\n\tpreceding\x18\x01 \x01(\x0b20.proto.Expression.WindowFunction.Bound.PrecedingH\x00R\tpreceding\x12P\n\tfollowing\x18\x02 \x01(\x0b20.proto.Expression.WindowFunction.Bound.FollowingH\x00R\tfollowing\x12T\n\x0bcurrent_row\x18\x03 \x01(\x0b21.proto.Expression.WindowFunction.Bound.CurrentRowH\x00R\ncurrentRow\x12P\n\tunbounded\x18\x04 \x01(\x0b20.proto.Expression.WindowFunction.Bound.UnboundedH\x00R\tunbounded\x1a#\n\tPreceding\x12\x16\n\x06offset\x18\x01 \x01(\x03R\x06offset\x1a#\n\tFollowing\x12\x16\n\x06offset\x18\x01 \x01(\x03R\x06offset\x1a\x0c\n\nCurrentRow\x1a\x0b\n\tUnboundedB\x06\n\x04kind"V\n\nBoundsType\x12\x1b\n\x17BOUNDS_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10BOUNDS_TYPE_ROWS\x10\x01\x12\x15\n\x11BOUNDS_TYPE_RANGE\x10\x02\x1a\xba\x01\n\x06IfThen\x123\n\x03ifs\x18\x01 \x03(\x0b2!.proto.Expression.IfThen.IfClauseR\x03ifs\x12%\n\x04else\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x04else\x1aT\n\x08IfClause\x12!\n\x02if\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x02if\x12%\n\x04then\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x04then\x1a\xa0\x02\n\x04Cast\x12\x1f\n\x04type\x18\x01 \x01(\x0b2\x0b.proto.TypeR\x04type\x12\'\n\x05input\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x05input\x12Q\n\x10failure_behavior\x18\x03 \x01(\x0e2&.proto.Expression.Cast.FailureBehaviorR\x0ffailureBehavior"{\n\x0fFailureBehavior\x12 \n\x1cFAILURE_BEHAVIOR_UNSPECIFIED\x10\x00\x12 \n\x1cFAILURE_BEHAVIOR_RETURN_NULL\x10\x01\x12$\n FAILURE_BEHAVIOR_THROW_EXCEPTION\x10\x02\x1a\xfd\x01\n\x10SwitchExpression\x12\'\n\x05match\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\x05match\x12<\n\x03ifs\x18\x01 \x03(\x0b2*.proto.Expression.SwitchExpression.IfValueR\x03ifs\x12%\n\x04else\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x04else\x1a[\n\x07IfValue\x12)\n\x02if\x18\x01 \x01(\x0b2\x19.proto.Expression.LiteralR\x02if\x12%\n\x04then\x18\x02 \x01(\x0b2\x11.proto.ExpressionR\x04then\x1af\n\x0eSingularOrList\x12\'\n\x05value\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x05value\x12+\n\x07options\x18\x02 \x03(\x0b2\x11.proto.ExpressionR\x07options\x1a\xab\x01\n\x0bMultiOrList\x12\'\n\x05value\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x05value\x12>\n\x07options\x18\x02 \x03(\x0b2$.proto.Expression.MultiOrList.RecordR\x07options\x1a3\n\x06Record\x12)\n\x06fields\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x06fields\x1a\x83\x04\n\x10EmbeddedFunction\x12/\n\targuments\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\targuments\x12,\n\x0boutput_type\x18\x02 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12o\n\x16python_pickle_function\x18\x03 \x01(\x0b27.proto.Expression.EmbeddedFunction.PythonPickleFunctionH\x00R\x14pythonPickleFunction\x12l\n\x15web_assembly_function\x18\x04 \x01(\x0b26.proto.Expression.EmbeddedFunction.WebAssemblyFunctionH\x00R\x13webAssemblyFunction\x1aV\n\x14PythonPickleFunction\x12\x1a\n\x08function\x18\x01 \x01(\x0cR\x08function\x12"\n\x0cprerequisite\x18\x02 \x03(\tR\x0cprerequisite\x1aQ\n\x13WebAssemblyFunction\x12\x16\n\x06script\x18\x01 \x01(\x0cR\x06script\x12"\n\x0cprerequisite\x18\x02 \x03(\tR\x0cprerequisiteB\x06\n\x04kind\x1a\xcc\x04\n\x10ReferenceSegment\x12D\n\x07map_key\x18\x01 \x01(\x0b2).proto.Expression.ReferenceSegment.MapKeyH\x00R\x06mapKey\x12S\n\x0cstruct_field\x18\x02 \x01(\x0b2..proto.Expression.ReferenceSegment.StructFieldH\x00R\x0bstructField\x12S\n\x0clist_element\x18\x03 \x01(\x0b2..proto.Expression.ReferenceSegment.ListElementH\x00R\x0blistElement\x1av\n\x06MapKey\x122\n\x07map_key\x18\x01 \x01(\x0b2\x19.proto.Expression.LiteralR\x06mapKey\x128\n\x05child\x18\x02 \x01(\x0b2".proto.Expression.ReferenceSegmentR\x05child\x1a]\n\x0bStructField\x12\x14\n\x05field\x18\x01 \x01(\x05R\x05field\x128\n\x05child\x18\x02 \x01(\x0b2".proto.Expression.ReferenceSegmentR\x05child\x1a_\n\x0bListElement\x12\x16\n\x06offset\x18\x01 \x01(\x05R\x06offset\x128\n\x05child\x18\x02 \x01(\x0b2".proto.Expression.ReferenceSegmentR\x05childB\x10\n\x0ereference_type\x1a\xee\n\n\x0eMaskExpression\x12E\n\x06select\x18\x01 \x01(\x0b2-.proto.Expression.MaskExpression.StructSelectR\x06select\x128\n\x18maintain_singular_struct\x18\x02 \x01(\x08R\x16maintainSingularStruct\x1a\xdc\x01\n\x06Select\x12G\n\x06struct\x18\x01 \x01(\x0b2-.proto.Expression.MaskExpression.StructSelectH\x00R\x06struct\x12A\n\x04list\x18\x02 \x01(\x0b2+.proto.Expression.MaskExpression.ListSelectH\x00R\x04list\x12>\n\x03map\x18\x03 \x01(\x0b2*.proto.Expression.MaskExpression.MapSelectH\x00R\x03mapB\x06\n\x04type\x1a^\n\x0cStructSelect\x12N\n\x0cstruct_items\x18\x01 \x03(\x0b2+.proto.Expression.MaskExpression.StructItemR\x0bstructItems\x1aa\n\nStructItem\x12\x14\n\x05field\x18\x01 \x01(\x05R\x05field\x12=\n\x05child\x18\x02 \x01(\x0b2\'.proto.Expression.MaskExpression.SelectR\x05child\x1a\xd6\x03\n\nListSelect\x12X\n\tselection\x18\x01 \x03(\x0b2:.proto.Expression.MaskExpression.ListSelect.ListSelectItemR\tselection\x12=\n\x05child\x18\x02 \x01(\x0b2\'.proto.Expression.MaskExpression.SelectR\x05child\x1a\xae\x02\n\x0eListSelectItem\x12\\\n\x04item\x18\x01 \x01(\x0b2F.proto.Expression.MaskExpression.ListSelect.ListSelectItem.ListElementH\x00R\x04item\x12\\\n\x05slice\x18\x02 \x01(\x0b2D.proto.Expression.MaskExpression.ListSelect.ListSelectItem.ListSliceH\x00R\x05slice\x1a#\n\x0bListElement\x12\x14\n\x05field\x18\x01 \x01(\x05R\x05field\x1a3\n\tListSlice\x12\x14\n\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n\x03end\x18\x02 \x01(\x05R\x03endB\x06\n\x04type\x1a\xdf\x02\n\tMapSelect\x12E\n\x03key\x18\x01 \x01(\x0b21.proto.Expression.MaskExpression.MapSelect.MapKeyH\x00R\x03key\x12]\n\nexpression\x18\x02 \x01(\x0b2;.proto.Expression.MaskExpression.MapSelect.MapKeyExpressionH\x00R\nexpression\x12=\n\x05child\x18\x03 \x01(\x0b2\'.proto.Expression.MaskExpression.SelectR\x05child\x1a!\n\x06MapKey\x12\x17\n\x07map_key\x18\x01 \x01(\tR\x06mapKey\x1a@\n\x10MapKeyExpression\x12,\n\x12map_key_expression\x18\x01 \x01(\tR\x10mapKeyExpressionB\x08\n\x06select\x1a\xf9\x03\n\x0eFieldReference\x12O\n\x10direct_reference\x18\x01 \x01(\x0b2".proto.Expression.ReferenceSegmentH\x00R\x0fdirectReference\x12M\n\x10masked_reference\x18\x02 \x01(\x0b2 .proto.Expression.MaskExpressionH\x00R\x0fmaskedReference\x123\n\nexpression\x18\x03 \x01(\x0b2\x11.proto.ExpressionH\x01R\nexpression\x12W\n\x0eroot_reference\x18\x04 \x01(\x0b2..proto.Expression.FieldReference.RootReferenceH\x01R\rrootReference\x12Z\n\x0fouter_reference\x18\x05 \x01(\x0b2/.proto.Expression.FieldReference.OuterReferenceH\x01R\x0eouterReference\x1a\x0f\n\rRootReference\x1a-\n\x0eOuterReference\x12\x1b\n\tsteps_out\x18\x01 \x01(\rR\x08stepsOutB\x10\n\x0ereference_typeB\x0b\n\troot_type\x1a\xe1\t\n\x08Subquery\x12;\n\x06scalar\x18\x01 \x01(\x0b2!.proto.Expression.Subquery.ScalarH\x00R\x06scalar\x12K\n\x0cin_predicate\x18\x02 \x01(\x0b2&.proto.Expression.Subquery.InPredicateH\x00R\x0binPredicate\x12N\n\rset_predicate\x18\x03 \x01(\x0b2\'.proto.Expression.Subquery.SetPredicateH\x00R\x0csetPredicate\x12Q\n\x0eset_comparison\x18\x04 \x01(\x0b2(.proto.Expression.Subquery.SetComparisonH\x00R\rsetComparison\x1a*\n\x06Scalar\x12 \n\x05input\x18\x01 \x01(\x0b2\n.proto.RelR\x05input\x1ab\n\x0bInPredicate\x12+\n\x07needles\x18\x01 \x03(\x0b2\x11.proto.ExpressionR\x07needles\x12&\n\x08haystack\x18\x02 \x01(\x0b2\n.proto.RelR\x08haystack\x1a\xe9\x01\n\x0cSetPredicate\x12V\n\x0cpredicate_op\x18\x01 \x01(\x0e23.proto.Expression.Subquery.SetPredicate.PredicateOpR\x0bpredicateOp\x12"\n\x06tuples\x18\x02 \x01(\x0b2\n.proto.RelR\x06tuples"]\n\x0bPredicateOp\x12\x1c\n\x18PREDICATE_OP_UNSPECIFIED\x10\x00\x12\x17\n\x13PREDICATE_OP_EXISTS\x10\x01\x12\x17\n\x13PREDICATE_OP_UNIQUE\x10\x02\x1a\x9a\x04\n\rSetComparison\x12W\n\x0creduction_op\x18\x01 \x01(\x0e24.proto.Expression.Subquery.SetComparison.ReductionOpR\x0breductionOp\x12Z\n\rcomparison_op\x18\x02 \x01(\x0e25.proto.Expression.Subquery.SetComparison.ComparisonOpR\x0ccomparisonOp\x12%\n\x04left\x18\x03 \x01(\x0b2\x11.proto.ExpressionR\x04left\x12 \n\x05right\x18\x04 \x01(\x0b2\n.proto.RelR\x05right"\xb1\x01\n\x0cComparisonOp\x12\x1d\n\x19COMPARISON_OP_UNSPECIFIED\x10\x00\x12\x14\n\x10COMPARISON_OP_EQ\x10\x01\x12\x14\n\x10COMPARISON_OP_NE\x10\x02\x12\x14\n\x10COMPARISON_OP_LT\x10\x03\x12\x14\n\x10COMPARISON_OP_GT\x10\x04\x12\x14\n\x10COMPARISON_OP_LE\x10\x05\x12\x14\n\x10COMPARISON_OP_GE\x10\x06"W\n\x0bReductionOp\x12\x1c\n\x18REDUCTION_OP_UNSPECIFIED\x10\x00\x12\x14\n\x10REDUCTION_OP_ANY\x10\x01\x12\x14\n\x10REDUCTION_OP_ALL\x10\x02B\x0f\n\rsubquery_typeB\n\n\x08rex_type"d\n\x10DynamicParameter\x12\x1f\n\x04type\x18\x01 \x01(\x0b2\x0b.proto.TypeR\x04type\x12/\n\x13parameter_reference\x18\x02 \x01(\rR\x12parameterReference"\xa5\x03\n\tSortField\x12%\n\x04expr\x18\x01 \x01(\x0b2\x11.proto.ExpressionR\x04expr\x12>\n\tdirection\x18\x02 \x01(\x0e2\x1e.proto.SortField.SortDirectionH\x00R\tdirection\x12D\n\x1dcomparison_function_reference\x18\x03 \x01(\rH\x00R\x1bcomparisonFunctionReference"\xdd\x01\n\rSortDirection\x12\x1e\n\x1aSORT_DIRECTION_UNSPECIFIED\x10\x00\x12"\n\x1eSORT_DIRECTION_ASC_NULLS_FIRST\x10\x01\x12!\n\x1dSORT_DIRECTION_ASC_NULLS_LAST\x10\x02\x12#\n\x1fSORT_DIRECTION_DESC_NULLS_FIRST\x10\x03\x12"\n\x1eSORT_DIRECTION_DESC_NULLS_LAST\x10\x04\x12\x1c\n\x18SORT_DIRECTION_CLUSTERED\x10\x05B\x0b\n\tsort_kind"\xb1\x04\n\x11AggregateFunction\x12-\n\x12function_reference\x18\x01 \x01(\rR\x11functionReference\x125\n\targuments\x18\x07 \x03(\x0b2\x17.proto.FunctionArgumentR\targuments\x12/\n\x07options\x18\x08 \x03(\x0b2\x15.proto.FunctionOptionR\x07options\x12,\n\x0boutput_type\x18\x05 \x01(\x0b2\x0b.proto.TypeR\noutputType\x12-\n\x05phase\x18\x04 \x01(\x0e2\x17.proto.AggregationPhaseR\x05phase\x12&\n\x05sorts\x18\x03 \x03(\x0b2\x10.proto.SortFieldR\x05sorts\x12N\n\ninvocation\x18\x06 \x01(\x0e2..proto.AggregateFunction.AggregationInvocationR\ninvocation\x12)\n\x04args\x18\x02 \x03(\x0b2\x11.proto.ExpressionB\x02\x18\x01R\x04args"\x84\x01\n\x15AggregationInvocation\x12&\n"AGGREGATION_INVOCATION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aAGGREGATION_INVOCATION_ALL\x10\x01\x12#\n\x1fAGGREGATION_INVOCATION_DISTINCT\x10\x02"7\n\x0cReferenceRel\x12\'\n\x0fsubtree_ordinal\x18\x01 \x01(\x05R\x0esubtreeOrdinal*\xef\x01\n\x10AggregationPhase\x12!\n\x1dAGGREGATION_PHASE_UNSPECIFIED\x10\x00\x12-\n)AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE\x10\x01\x122\n.AGGREGATION_PHASE_INTERMEDIATE_TO_INTERMEDIATE\x10\x02\x12\'\n#AGGREGATION_PHASE_INITIAL_TO_RESULT\x10\x03\x12,\n(AGGREGATION_PHASE_INTERMEDIATE_TO_RESULT\x10\x04B#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.algebra_pb2', _globals) @@ -50,301 +50,301 @@ _globals['_EXPRESSION'].fields_by_name['enum']._serialized_options = b'\x18\x01' _globals['_AGGREGATEFUNCTION'].fields_by_name['args']._loaded_options = None _globals['_AGGREGATEFUNCTION'].fields_by_name['args']._serialized_options = b'\x18\x01' - _globals['_AGGREGATIONPHASE']._serialized_start = 29278 - _globals['_AGGREGATIONPHASE']._serialized_end = 29517 + _globals['_AGGREGATIONPHASE']._serialized_start = 29447 + _globals['_AGGREGATIONPHASE']._serialized_end = 29686 _globals['_RELCOMMON']._serialized_start = 111 - _globals['_RELCOMMON']._serialized_end = 1536 + _globals['_RELCOMMON']._serialized_end = 1705 _globals['_RELCOMMON_DIRECT']._serialized_start = 347 _globals['_RELCOMMON_DIRECT']._serialized_end = 355 _globals['_RELCOMMON_EMIT']._serialized_start = 357 _globals['_RELCOMMON_EMIT']._serialized_end = 402 _globals['_RELCOMMON_HINT']._serialized_start = 405 - _globals['_RELCOMMON_HINT']._serialized_end = 1523 + _globals['_RELCOMMON_HINT']._serialized_end = 1692 _globals['_RELCOMMON_HINT_STATS']._serialized_start = 856 _globals['_RELCOMMON_HINT_STATS']._serialized_end = 1009 _globals['_RELCOMMON_HINT_RUNTIMECONSTRAINT']._serialized_start = 1011 _globals['_RELCOMMON_HINT_RUNTIMECONSTRAINT']._serialized_end = 1114 - _globals['_RELCOMMON_HINT_SAVEDCOMPUTATION']._serialized_start = 1116 - _globals['_RELCOMMON_HINT_SAVEDCOMPUTATION']._serialized_end = 1232 - _globals['_RELCOMMON_HINT_LOADEDCOMPUTATION']._serialized_start = 1235 - _globals['_RELCOMMON_HINT_LOADEDCOMPUTATION']._serialized_end = 1371 - _globals['_RELCOMMON_HINT_COMPUTATIONTYPE']._serialized_start = 1374 - _globals['_RELCOMMON_HINT_COMPUTATIONTYPE']._serialized_end = 1523 - _globals['_READREL']._serialized_start = 1539 - _globals['_READREL']._serialized_end = 4104 - _globals['_READREL_NAMEDTABLE']._serialized_start = 2237 - _globals['_READREL_NAMEDTABLE']._serialized_end = 2355 - _globals['_READREL_ICEBERGTABLE']._serialized_start = 2358 - _globals['_READREL_ICEBERGTABLE']._serialized_end = 2610 - _globals['_READREL_ICEBERGTABLE_METADATAFILEREAD']._serialized_start = 2447 - _globals['_READREL_ICEBERGTABLE_METADATAFILEREAD']._serialized_end = 2596 - _globals['_READREL_VIRTUALTABLE']._serialized_start = 2613 - _globals['_READREL_VIRTUALTABLE']._serialized_end = 2756 - _globals['_READREL_EXTENSIONTABLE']._serialized_start = 2758 - _globals['_READREL_EXTENSIONTABLE']._serialized_end = 2820 - _globals['_READREL_LOCALFILES']._serialized_start = 2823 - _globals['_READREL_LOCALFILES']._serialized_end = 4091 - _globals['_READREL_LOCALFILES_FILEORFILES']._serialized_start = 2983 - _globals['_READREL_LOCALFILES_FILEORFILES']._serialized_end = 4091 - _globals['_READREL_LOCALFILES_FILEORFILES_PARQUETREADOPTIONS']._serialized_start = 3680 - _globals['_READREL_LOCALFILES_FILEORFILES_PARQUETREADOPTIONS']._serialized_end = 3700 - _globals['_READREL_LOCALFILES_FILEORFILES_ARROWREADOPTIONS']._serialized_start = 3702 - _globals['_READREL_LOCALFILES_FILEORFILES_ARROWREADOPTIONS']._serialized_end = 3720 - _globals['_READREL_LOCALFILES_FILEORFILES_ORCREADOPTIONS']._serialized_start = 3722 - _globals['_READREL_LOCALFILES_FILEORFILES_ORCREADOPTIONS']._serialized_end = 3738 - _globals['_READREL_LOCALFILES_FILEORFILES_DWRFREADOPTIONS']._serialized_start = 3740 - _globals['_READREL_LOCALFILES_FILEORFILES_DWRFREADOPTIONS']._serialized_end = 3757 - _globals['_READREL_LOCALFILES_FILEORFILES_DELIMITERSEPARATEDTEXTREADOPTIONS']._serialized_start = 3760 - _globals['_READREL_LOCALFILES_FILEORFILES_DELIMITERSEPARATEDTEXTREADOPTIONS']._serialized_end = 4049 - _globals['_PROJECTREL']._serialized_start = 4107 - _globals['_PROJECTREL']._serialized_end = 4332 - _globals['_JOINREL']._serialized_start = 4335 - _globals['_JOINREL']._serialized_end = 5024 - _globals['_JOINREL_JOINTYPE']._serialized_start = 4696 - _globals['_JOINREL_JOINTYPE']._serialized_end = 5024 - _globals['_CROSSREL']._serialized_start = 5027 - _globals['_CROSSREL']._serialized_end = 5229 - _globals['_FETCHREL']._serialized_start = 5232 - _globals['_FETCHREL']._serialized_end = 5595 - _globals['_AGGREGATEREL']._serialized_start = 5598 - _globals['_AGGREGATEREL']._serialized_end = 6205 - _globals['_AGGREGATEREL_GROUPING']._serialized_start = 5962 - _globals['_AGGREGATEREL_GROUPING']._serialized_end = 6099 - _globals['_AGGREGATEREL_MEASURE']._serialized_start = 6101 - _globals['_AGGREGATEREL_MEASURE']._serialized_end = 6205 - _globals['_CONSISTENTPARTITIONWINDOWREL']._serialized_start = 6208 - _globals['_CONSISTENTPARTITIONWINDOWREL']._serialized_end = 7178 - _globals['_CONSISTENTPARTITIONWINDOWREL_WINDOWRELFUNCTION']._serialized_start = 6611 - _globals['_CONSISTENTPARTITIONWINDOWREL_WINDOWRELFUNCTION']._serialized_end = 7178 - _globals['_SORTREL']._serialized_start = 7181 - _globals['_SORTREL']._serialized_end = 7390 - _globals['_FILTERREL']._serialized_start = 7393 - _globals['_FILTERREL']._serialized_end = 7613 - _globals['_SETREL']._serialized_start = 7616 - _globals['_SETREL']._serialized_end = 8094 - _globals['_SETREL_SETOP']._serialized_start = 7826 - _globals['_SETREL_SETOP']._serialized_end = 8094 - _globals['_EXTENSIONSINGLEREL']._serialized_start = 8097 - _globals['_EXTENSIONSINGLEREL']._serialized_end = 8239 - _globals['_EXTENSIONLEAFREL']._serialized_start = 8241 - _globals['_EXTENSIONLEAFREL']._serialized_end = 8347 - _globals['_EXTENSIONMULTIREL']._serialized_start = 8350 - _globals['_EXTENSIONMULTIREL']._serialized_end = 8493 - _globals['_EXCHANGEREL']._serialized_start = 8496 - _globals['_EXCHANGEREL']._serialized_end = 9625 - _globals['_EXCHANGEREL_SCATTERFIELDS']._serialized_start = 9142 - _globals['_EXCHANGEREL_SCATTERFIELDS']._serialized_end = 9215 - _globals['_EXCHANGEREL_SINGLEBUCKETEXPRESSION']._serialized_start = 9217 - _globals['_EXCHANGEREL_SINGLEBUCKETEXPRESSION']._serialized_end = 9292 - _globals['_EXCHANGEREL_MULTIBUCKETEXPRESSION']._serialized_start = 9294 - _globals['_EXCHANGEREL_MULTIBUCKETEXPRESSION']._serialized_end = 9418 - _globals['_EXCHANGEREL_BROADCAST']._serialized_start = 9420 - _globals['_EXCHANGEREL_BROADCAST']._serialized_end = 9431 - _globals['_EXCHANGEREL_ROUNDROBIN']._serialized_start = 9433 - _globals['_EXCHANGEREL_ROUNDROBIN']._serialized_end = 9467 - _globals['_EXCHANGEREL_EXCHANGETARGET']._serialized_start = 9470 - _globals['_EXCHANGEREL_EXCHANGETARGET']._serialized_end = 9608 - _globals['_EXPANDREL']._serialized_start = 9628 - _globals['_EXPANDREL']._serialized_end = 10008 - _globals['_EXPANDREL_EXPANDFIELD']._serialized_start = 9772 - _globals['_EXPANDREL_EXPANDFIELD']._serialized_end = 9939 - _globals['_EXPANDREL_SWITCHINGFIELD']._serialized_start = 9941 - _globals['_EXPANDREL_SWITCHINGFIELD']._serialized_end = 10008 - _globals['_RELROOT']._serialized_start = 10010 - _globals['_RELROOT']._serialized_end = 10075 - _globals['_REL']._serialized_start = 10078 - _globals['_REL']._serialized_end = 11182 - _globals['_NAMEDOBJECTWRITE']._serialized_start = 11184 - _globals['_NAMEDOBJECTWRITE']._serialized_end = 11308 - _globals['_EXTENSIONOBJECT']._serialized_start = 11310 - _globals['_EXTENSIONOBJECT']._serialized_end = 11373 - _globals['_DDLREL']._serialized_start = 11376 - _globals['_DDLREL']._serialized_end = 12150 - _globals['_DDLREL_DDLOBJECT']._serialized_start = 11910 - _globals['_DDLREL_DDLOBJECT']._serialized_end = 11992 - _globals['_DDLREL_DDLOP']._serialized_start = 11995 - _globals['_DDLREL_DDLOP']._serialized_end = 12136 - _globals['_WRITEREL']._serialized_start = 12153 - _globals['_WRITEREL']._serialized_end = 13076 - _globals['_WRITEREL_WRITEOP']._serialized_start = 12661 - _globals['_WRITEREL_WRITEOP']._serialized_end = 12778 - _globals['_WRITEREL_CREATEMODE']._serialized_start = 12781 - _globals['_WRITEREL_CREATEMODE']._serialized_end = 12958 - _globals['_WRITEREL_OUTPUTMODE']._serialized_start = 12960 - _globals['_WRITEREL_OUTPUTMODE']._serialized_end = 13062 - _globals['_UPDATEREL']._serialized_start = 13079 - _globals['_UPDATEREL']._serialized_end = 13546 - _globals['_UPDATEREL_TRANSFORMEXPRESSION']._serialized_start = 13414 - _globals['_UPDATEREL_TRANSFORMEXPRESSION']._serialized_end = 13531 - _globals['_NAMEDTABLE']._serialized_start = 2237 - _globals['_NAMEDTABLE']._serialized_end = 2355 - _globals['_COMPARISONJOINKEY']._serialized_start = 13669 - _globals['_COMPARISONJOINKEY']._serialized_end = 14224 - _globals['_COMPARISONJOINKEY_COMPARISONTYPE']._serialized_start = 13874 - _globals['_COMPARISONJOINKEY_COMPARISONTYPE']._serialized_end = 14039 - _globals['_COMPARISONJOINKEY_SIMPLECOMPARISONTYPE']._serialized_start = 14042 - _globals['_COMPARISONJOINKEY_SIMPLECOMPARISONTYPE']._serialized_end = 14224 - _globals['_HASHJOINREL']._serialized_start = 14227 - _globals['_HASHJOINREL']._serialized_end = 15207 - _globals['_HASHJOINREL_JOINTYPE']._serialized_start = 14791 - _globals['_HASHJOINREL_JOINTYPE']._serialized_end = 15119 - _globals['_HASHJOINREL_BUILDINPUT']._serialized_start = 15121 - _globals['_HASHJOINREL_BUILDINPUT']._serialized_end = 15207 - _globals['_MERGEJOINREL']._serialized_start = 15210 - _globals['_MERGEJOINREL']._serialized_end = 16040 - _globals['_MERGEJOINREL_JOINTYPE']._serialized_start = 14791 - _globals['_MERGEJOINREL_JOINTYPE']._serialized_end = 15119 - _globals['_NESTEDLOOPJOINREL']._serialized_start = 16043 - _globals['_NESTEDLOOPJOINREL']._serialized_end = 16691 - _globals['_NESTEDLOOPJOINREL_JOINTYPE']._serialized_start = 14791 - _globals['_NESTEDLOOPJOINREL_JOINTYPE']._serialized_end = 15119 - _globals['_FUNCTIONARGUMENT']._serialized_start = 16694 - _globals['_FUNCTIONARGUMENT']._serialized_end = 16824 - _globals['_FUNCTIONOPTION']._serialized_start = 16826 - _globals['_FUNCTIONOPTION']._serialized_end = 16894 - _globals['_EXPRESSION']._serialized_start = 16897 - _globals['_EXPRESSION']._serialized_end = 28128 - _globals['_EXPRESSION_ENUM']._serialized_start = 17748 - _globals['_EXPRESSION_ENUM']._serialized_end = 17882 - _globals['_EXPRESSION_ENUM_EMPTY']._serialized_start = 17854 - _globals['_EXPRESSION_ENUM_EMPTY']._serialized_end = 17865 - _globals['_EXPRESSION_LITERAL']._serialized_start = 17885 - _globals['_EXPRESSION_LITERAL']._serialized_end = 20795 - _globals['_EXPRESSION_LITERAL_VARCHAR']._serialized_start = 19475 - _globals['_EXPRESSION_LITERAL_VARCHAR']._serialized_end = 19530 - _globals['_EXPRESSION_LITERAL_DECIMAL']._serialized_start = 19532 - _globals['_EXPRESSION_LITERAL_DECIMAL']._serialized_end = 19615 - _globals['_EXPRESSION_LITERAL_PRECISIONTIME']._serialized_start = 19617 - _globals['_EXPRESSION_LITERAL_PRECISIONTIME']._serialized_end = 19684 - _globals['_EXPRESSION_LITERAL_PRECISIONTIMESTAMP']._serialized_start = 19686 - _globals['_EXPRESSION_LITERAL_PRECISIONTIMESTAMP']._serialized_end = 19758 - _globals['_EXPRESSION_LITERAL_MAP']._serialized_start = 19761 - _globals['_EXPRESSION_LITERAL_MAP']._serialized_end = 19943 - _globals['_EXPRESSION_LITERAL_MAP_KEYVALUE']._serialized_start = 19839 - _globals['_EXPRESSION_LITERAL_MAP_KEYVALUE']._serialized_end = 19943 - _globals['_EXPRESSION_LITERAL_INTERVALYEARTOMONTH']._serialized_start = 19945 - _globals['_EXPRESSION_LITERAL_INTERVALYEARTOMONTH']._serialized_end = 20012 - _globals['_EXPRESSION_LITERAL_INTERVALDAYTOSECOND']._serialized_start = 20015 - _globals['_EXPRESSION_LITERAL_INTERVALDAYTOSECOND']._serialized_end = 20206 - _globals['_EXPRESSION_LITERAL_INTERVALCOMPOUND']._serialized_start = 20209 - _globals['_EXPRESSION_LITERAL_INTERVALCOMPOUND']._serialized_end = 20427 - _globals['_EXPRESSION_LITERAL_STRUCT']._serialized_start = 20429 - _globals['_EXPRESSION_LITERAL_STRUCT']._serialized_end = 20488 - _globals['_EXPRESSION_LITERAL_LIST']._serialized_start = 20490 - _globals['_EXPRESSION_LITERAL_LIST']._serialized_end = 20547 - _globals['_EXPRESSION_LITERAL_USERDEFINED']._serialized_start = 20550 - _globals['_EXPRESSION_LITERAL_USERDEFINED']._serialized_end = 20779 - _globals['_EXPRESSION_NESTED']._serialized_start = 20798 - _globals['_EXPRESSION_NESTED']._serialized_end = 21341 - _globals['_EXPRESSION_NESTED_MAP']._serialized_start = 21057 - _globals['_EXPRESSION_NESTED_MAP']._serialized_end = 21222 - _globals['_EXPRESSION_NESTED_MAP_KEYVALUE']._serialized_start = 21134 - _globals['_EXPRESSION_NESTED_MAP_KEYVALUE']._serialized_end = 21222 - _globals['_EXPRESSION_NESTED_STRUCT']._serialized_start = 21224 - _globals['_EXPRESSION_NESTED_STRUCT']._serialized_end = 21275 - _globals['_EXPRESSION_NESTED_LIST']._serialized_start = 21277 - _globals['_EXPRESSION_NESTED_LIST']._serialized_end = 21326 - _globals['_EXPRESSION_SCALARFUNCTION']._serialized_start = 21344 - _globals['_EXPRESSION_SCALARFUNCTION']._serialized_end = 21600 - _globals['_EXPRESSION_WINDOWFUNCTION']._serialized_start = 21603 - _globals['_EXPRESSION_WINDOWFUNCTION']._serialized_end = 22840 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND']._serialized_start = 22304 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND']._serialized_end = 22752 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_PRECEDING']._serialized_start = 22645 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_PRECEDING']._serialized_end = 22680 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_FOLLOWING']._serialized_start = 22682 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_FOLLOWING']._serialized_end = 22717 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_CURRENTROW']._serialized_start = 22719 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_CURRENTROW']._serialized_end = 22731 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_UNBOUNDED']._serialized_start = 22733 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_UNBOUNDED']._serialized_end = 22744 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUNDSTYPE']._serialized_start = 22754 - _globals['_EXPRESSION_WINDOWFUNCTION_BOUNDSTYPE']._serialized_end = 22840 - _globals['_EXPRESSION_IFTHEN']._serialized_start = 22843 - _globals['_EXPRESSION_IFTHEN']._serialized_end = 23029 - _globals['_EXPRESSION_IFTHEN_IFCLAUSE']._serialized_start = 22945 - _globals['_EXPRESSION_IFTHEN_IFCLAUSE']._serialized_end = 23029 - _globals['_EXPRESSION_CAST']._serialized_start = 23032 - _globals['_EXPRESSION_CAST']._serialized_end = 23320 - _globals['_EXPRESSION_CAST_FAILUREBEHAVIOR']._serialized_start = 23197 - _globals['_EXPRESSION_CAST_FAILUREBEHAVIOR']._serialized_end = 23320 - _globals['_EXPRESSION_SWITCHEXPRESSION']._serialized_start = 23323 - _globals['_EXPRESSION_SWITCHEXPRESSION']._serialized_end = 23576 - _globals['_EXPRESSION_SWITCHEXPRESSION_IFVALUE']._serialized_start = 23485 - _globals['_EXPRESSION_SWITCHEXPRESSION_IFVALUE']._serialized_end = 23576 - _globals['_EXPRESSION_SINGULARORLIST']._serialized_start = 23578 - _globals['_EXPRESSION_SINGULARORLIST']._serialized_end = 23680 - _globals['_EXPRESSION_MULTIORLIST']._serialized_start = 23683 - _globals['_EXPRESSION_MULTIORLIST']._serialized_end = 23854 - _globals['_EXPRESSION_MULTIORLIST_RECORD']._serialized_start = 23803 - _globals['_EXPRESSION_MULTIORLIST_RECORD']._serialized_end = 23854 - _globals['_EXPRESSION_EMBEDDEDFUNCTION']._serialized_start = 23857 - _globals['_EXPRESSION_EMBEDDEDFUNCTION']._serialized_end = 24372 - _globals['_EXPRESSION_EMBEDDEDFUNCTION_PYTHONPICKLEFUNCTION']._serialized_start = 24195 - _globals['_EXPRESSION_EMBEDDEDFUNCTION_PYTHONPICKLEFUNCTION']._serialized_end = 24281 - _globals['_EXPRESSION_EMBEDDEDFUNCTION_WEBASSEMBLYFUNCTION']._serialized_start = 24283 - _globals['_EXPRESSION_EMBEDDEDFUNCTION_WEBASSEMBLYFUNCTION']._serialized_end = 24364 - _globals['_EXPRESSION_REFERENCESEGMENT']._serialized_start = 24375 - _globals['_EXPRESSION_REFERENCESEGMENT']._serialized_end = 24963 - _globals['_EXPRESSION_REFERENCESEGMENT_MAPKEY']._serialized_start = 24635 - _globals['_EXPRESSION_REFERENCESEGMENT_MAPKEY']._serialized_end = 24753 - _globals['_EXPRESSION_REFERENCESEGMENT_STRUCTFIELD']._serialized_start = 24755 - _globals['_EXPRESSION_REFERENCESEGMENT_STRUCTFIELD']._serialized_end = 24848 - _globals['_EXPRESSION_REFERENCESEGMENT_LISTELEMENT']._serialized_start = 24850 - _globals['_EXPRESSION_REFERENCESEGMENT_LISTELEMENT']._serialized_end = 24945 - _globals['_EXPRESSION_MASKEXPRESSION']._serialized_start = 24966 - _globals['_EXPRESSION_MASKEXPRESSION']._serialized_end = 26356 - _globals['_EXPRESSION_MASKEXPRESSION_SELECT']._serialized_start = 25114 - _globals['_EXPRESSION_MASKEXPRESSION_SELECT']._serialized_end = 25334 - _globals['_EXPRESSION_MASKEXPRESSION_STRUCTSELECT']._serialized_start = 25336 - _globals['_EXPRESSION_MASKEXPRESSION_STRUCTSELECT']._serialized_end = 25430 - _globals['_EXPRESSION_MASKEXPRESSION_STRUCTITEM']._serialized_start = 25432 - _globals['_EXPRESSION_MASKEXPRESSION_STRUCTITEM']._serialized_end = 25529 - _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT']._serialized_start = 25532 - _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT']._serialized_end = 26002 - _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM']._serialized_start = 25700 - _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM']._serialized_end = 26002 - _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM_LISTELEMENT']._serialized_start = 25906 - _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM_LISTELEMENT']._serialized_end = 25941 - _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM_LISTSLICE']._serialized_start = 25943 - _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM_LISTSLICE']._serialized_end = 25994 - _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT']._serialized_start = 26005 - _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT']._serialized_end = 26356 - _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT_MAPKEY']._serialized_start = 26247 - _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT_MAPKEY']._serialized_end = 26280 - _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT_MAPKEYEXPRESSION']._serialized_start = 26282 - _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT_MAPKEYEXPRESSION']._serialized_end = 26346 - _globals['_EXPRESSION_FIELDREFERENCE']._serialized_start = 26359 - _globals['_EXPRESSION_FIELDREFERENCE']._serialized_end = 26864 - _globals['_EXPRESSION_FIELDREFERENCE_ROOTREFERENCE']._serialized_start = 26771 - _globals['_EXPRESSION_FIELDREFERENCE_ROOTREFERENCE']._serialized_end = 26786 - _globals['_EXPRESSION_FIELDREFERENCE_OUTERREFERENCE']._serialized_start = 26788 - _globals['_EXPRESSION_FIELDREFERENCE_OUTERREFERENCE']._serialized_end = 26833 - _globals['_EXPRESSION_SUBQUERY']._serialized_start = 26867 - _globals['_EXPRESSION_SUBQUERY']._serialized_end = 28116 - _globals['_EXPRESSION_SUBQUERY_SCALAR']._serialized_start = 27180 - _globals['_EXPRESSION_SUBQUERY_SCALAR']._serialized_end = 27222 - _globals['_EXPRESSION_SUBQUERY_INPREDICATE']._serialized_start = 27224 - _globals['_EXPRESSION_SUBQUERY_INPREDICATE']._serialized_end = 27322 - _globals['_EXPRESSION_SUBQUERY_SETPREDICATE']._serialized_start = 27325 - _globals['_EXPRESSION_SUBQUERY_SETPREDICATE']._serialized_end = 27558 - _globals['_EXPRESSION_SUBQUERY_SETPREDICATE_PREDICATEOP']._serialized_start = 27465 - _globals['_EXPRESSION_SUBQUERY_SETPREDICATE_PREDICATEOP']._serialized_end = 27558 - _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON']._serialized_start = 27561 - _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON']._serialized_end = 28099 - _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON_COMPARISONOP']._serialized_start = 27833 - _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON_COMPARISONOP']._serialized_end = 28010 - _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON_REDUCTIONOP']._serialized_start = 28012 - _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON_REDUCTIONOP']._serialized_end = 28099 - _globals['_DYNAMICPARAMETER']._serialized_start = 28130 - _globals['_DYNAMICPARAMETER']._serialized_end = 28230 - _globals['_SORTFIELD']._serialized_start = 28233 - _globals['_SORTFIELD']._serialized_end = 28654 - _globals['_SORTFIELD_SORTDIRECTION']._serialized_start = 28420 - _globals['_SORTFIELD_SORTDIRECTION']._serialized_end = 28641 - _globals['_AGGREGATEFUNCTION']._serialized_start = 28657 - _globals['_AGGREGATEFUNCTION']._serialized_end = 29218 - _globals['_AGGREGATEFUNCTION_AGGREGATIONINVOCATION']._serialized_start = 29086 - _globals['_AGGREGATEFUNCTION_AGGREGATIONINVOCATION']._serialized_end = 29218 - _globals['_REFERENCEREL']._serialized_start = 29220 - _globals['_REFERENCEREL']._serialized_end = 29275 \ No newline at end of file + _globals['_RELCOMMON_HINT_SAVEDCOMPUTATION']._serialized_start = 1117 + _globals['_RELCOMMON_HINT_SAVEDCOMPUTATION']._serialized_end = 1317 + _globals['_RELCOMMON_HINT_LOADEDCOMPUTATION']._serialized_start = 1320 + _globals['_RELCOMMON_HINT_LOADEDCOMPUTATION']._serialized_end = 1540 + _globals['_RELCOMMON_HINT_COMPUTATIONTYPE']._serialized_start = 1543 + _globals['_RELCOMMON_HINT_COMPUTATIONTYPE']._serialized_end = 1692 + _globals['_READREL']._serialized_start = 1708 + _globals['_READREL']._serialized_end = 4273 + _globals['_READREL_NAMEDTABLE']._serialized_start = 2406 + _globals['_READREL_NAMEDTABLE']._serialized_end = 2524 + _globals['_READREL_ICEBERGTABLE']._serialized_start = 2527 + _globals['_READREL_ICEBERGTABLE']._serialized_end = 2779 + _globals['_READREL_ICEBERGTABLE_METADATAFILEREAD']._serialized_start = 2616 + _globals['_READREL_ICEBERGTABLE_METADATAFILEREAD']._serialized_end = 2765 + _globals['_READREL_VIRTUALTABLE']._serialized_start = 2782 + _globals['_READREL_VIRTUALTABLE']._serialized_end = 2925 + _globals['_READREL_EXTENSIONTABLE']._serialized_start = 2927 + _globals['_READREL_EXTENSIONTABLE']._serialized_end = 2989 + _globals['_READREL_LOCALFILES']._serialized_start = 2992 + _globals['_READREL_LOCALFILES']._serialized_end = 4260 + _globals['_READREL_LOCALFILES_FILEORFILES']._serialized_start = 3152 + _globals['_READREL_LOCALFILES_FILEORFILES']._serialized_end = 4260 + _globals['_READREL_LOCALFILES_FILEORFILES_PARQUETREADOPTIONS']._serialized_start = 3849 + _globals['_READREL_LOCALFILES_FILEORFILES_PARQUETREADOPTIONS']._serialized_end = 3869 + _globals['_READREL_LOCALFILES_FILEORFILES_ARROWREADOPTIONS']._serialized_start = 3871 + _globals['_READREL_LOCALFILES_FILEORFILES_ARROWREADOPTIONS']._serialized_end = 3889 + _globals['_READREL_LOCALFILES_FILEORFILES_ORCREADOPTIONS']._serialized_start = 3891 + _globals['_READREL_LOCALFILES_FILEORFILES_ORCREADOPTIONS']._serialized_end = 3907 + _globals['_READREL_LOCALFILES_FILEORFILES_DWRFREADOPTIONS']._serialized_start = 3909 + _globals['_READREL_LOCALFILES_FILEORFILES_DWRFREADOPTIONS']._serialized_end = 3926 + _globals['_READREL_LOCALFILES_FILEORFILES_DELIMITERSEPARATEDTEXTREADOPTIONS']._serialized_start = 3929 + _globals['_READREL_LOCALFILES_FILEORFILES_DELIMITERSEPARATEDTEXTREADOPTIONS']._serialized_end = 4218 + _globals['_PROJECTREL']._serialized_start = 4276 + _globals['_PROJECTREL']._serialized_end = 4501 + _globals['_JOINREL']._serialized_start = 4504 + _globals['_JOINREL']._serialized_end = 5193 + _globals['_JOINREL_JOINTYPE']._serialized_start = 4865 + _globals['_JOINREL_JOINTYPE']._serialized_end = 5193 + _globals['_CROSSREL']._serialized_start = 5196 + _globals['_CROSSREL']._serialized_end = 5398 + _globals['_FETCHREL']._serialized_start = 5401 + _globals['_FETCHREL']._serialized_end = 5764 + _globals['_AGGREGATEREL']._serialized_start = 5767 + _globals['_AGGREGATEREL']._serialized_end = 6374 + _globals['_AGGREGATEREL_GROUPING']._serialized_start = 6131 + _globals['_AGGREGATEREL_GROUPING']._serialized_end = 6268 + _globals['_AGGREGATEREL_MEASURE']._serialized_start = 6270 + _globals['_AGGREGATEREL_MEASURE']._serialized_end = 6374 + _globals['_CONSISTENTPARTITIONWINDOWREL']._serialized_start = 6377 + _globals['_CONSISTENTPARTITIONWINDOWREL']._serialized_end = 7347 + _globals['_CONSISTENTPARTITIONWINDOWREL_WINDOWRELFUNCTION']._serialized_start = 6780 + _globals['_CONSISTENTPARTITIONWINDOWREL_WINDOWRELFUNCTION']._serialized_end = 7347 + _globals['_SORTREL']._serialized_start = 7350 + _globals['_SORTREL']._serialized_end = 7559 + _globals['_FILTERREL']._serialized_start = 7562 + _globals['_FILTERREL']._serialized_end = 7782 + _globals['_SETREL']._serialized_start = 7785 + _globals['_SETREL']._serialized_end = 8263 + _globals['_SETREL_SETOP']._serialized_start = 7995 + _globals['_SETREL_SETOP']._serialized_end = 8263 + _globals['_EXTENSIONSINGLEREL']._serialized_start = 8266 + _globals['_EXTENSIONSINGLEREL']._serialized_end = 8408 + _globals['_EXTENSIONLEAFREL']._serialized_start = 8410 + _globals['_EXTENSIONLEAFREL']._serialized_end = 8516 + _globals['_EXTENSIONMULTIREL']._serialized_start = 8519 + _globals['_EXTENSIONMULTIREL']._serialized_end = 8662 + _globals['_EXCHANGEREL']._serialized_start = 8665 + _globals['_EXCHANGEREL']._serialized_end = 9794 + _globals['_EXCHANGEREL_SCATTERFIELDS']._serialized_start = 9311 + _globals['_EXCHANGEREL_SCATTERFIELDS']._serialized_end = 9384 + _globals['_EXCHANGEREL_SINGLEBUCKETEXPRESSION']._serialized_start = 9386 + _globals['_EXCHANGEREL_SINGLEBUCKETEXPRESSION']._serialized_end = 9461 + _globals['_EXCHANGEREL_MULTIBUCKETEXPRESSION']._serialized_start = 9463 + _globals['_EXCHANGEREL_MULTIBUCKETEXPRESSION']._serialized_end = 9587 + _globals['_EXCHANGEREL_BROADCAST']._serialized_start = 9589 + _globals['_EXCHANGEREL_BROADCAST']._serialized_end = 9600 + _globals['_EXCHANGEREL_ROUNDROBIN']._serialized_start = 9602 + _globals['_EXCHANGEREL_ROUNDROBIN']._serialized_end = 9636 + _globals['_EXCHANGEREL_EXCHANGETARGET']._serialized_start = 9639 + _globals['_EXCHANGEREL_EXCHANGETARGET']._serialized_end = 9777 + _globals['_EXPANDREL']._serialized_start = 9797 + _globals['_EXPANDREL']._serialized_end = 10177 + _globals['_EXPANDREL_EXPANDFIELD']._serialized_start = 9941 + _globals['_EXPANDREL_EXPANDFIELD']._serialized_end = 10108 + _globals['_EXPANDREL_SWITCHINGFIELD']._serialized_start = 10110 + _globals['_EXPANDREL_SWITCHINGFIELD']._serialized_end = 10177 + _globals['_RELROOT']._serialized_start = 10179 + _globals['_RELROOT']._serialized_end = 10244 + _globals['_REL']._serialized_start = 10247 + _globals['_REL']._serialized_end = 11351 + _globals['_NAMEDOBJECTWRITE']._serialized_start = 11353 + _globals['_NAMEDOBJECTWRITE']._serialized_end = 11477 + _globals['_EXTENSIONOBJECT']._serialized_start = 11479 + _globals['_EXTENSIONOBJECT']._serialized_end = 11542 + _globals['_DDLREL']._serialized_start = 11545 + _globals['_DDLREL']._serialized_end = 12319 + _globals['_DDLREL_DDLOBJECT']._serialized_start = 12079 + _globals['_DDLREL_DDLOBJECT']._serialized_end = 12161 + _globals['_DDLREL_DDLOP']._serialized_start = 12164 + _globals['_DDLREL_DDLOP']._serialized_end = 12305 + _globals['_WRITEREL']._serialized_start = 12322 + _globals['_WRITEREL']._serialized_end = 13245 + _globals['_WRITEREL_WRITEOP']._serialized_start = 12830 + _globals['_WRITEREL_WRITEOP']._serialized_end = 12947 + _globals['_WRITEREL_CREATEMODE']._serialized_start = 12950 + _globals['_WRITEREL_CREATEMODE']._serialized_end = 13127 + _globals['_WRITEREL_OUTPUTMODE']._serialized_start = 13129 + _globals['_WRITEREL_OUTPUTMODE']._serialized_end = 13231 + _globals['_UPDATEREL']._serialized_start = 13248 + _globals['_UPDATEREL']._serialized_end = 13715 + _globals['_UPDATEREL_TRANSFORMEXPRESSION']._serialized_start = 13583 + _globals['_UPDATEREL_TRANSFORMEXPRESSION']._serialized_end = 13700 + _globals['_NAMEDTABLE']._serialized_start = 2406 + _globals['_NAMEDTABLE']._serialized_end = 2524 + _globals['_COMPARISONJOINKEY']._serialized_start = 13838 + _globals['_COMPARISONJOINKEY']._serialized_end = 14393 + _globals['_COMPARISONJOINKEY_COMPARISONTYPE']._serialized_start = 14043 + _globals['_COMPARISONJOINKEY_COMPARISONTYPE']._serialized_end = 14208 + _globals['_COMPARISONJOINKEY_SIMPLECOMPARISONTYPE']._serialized_start = 14211 + _globals['_COMPARISONJOINKEY_SIMPLECOMPARISONTYPE']._serialized_end = 14393 + _globals['_HASHJOINREL']._serialized_start = 14396 + _globals['_HASHJOINREL']._serialized_end = 15376 + _globals['_HASHJOINREL_JOINTYPE']._serialized_start = 14960 + _globals['_HASHJOINREL_JOINTYPE']._serialized_end = 15288 + _globals['_HASHJOINREL_BUILDINPUT']._serialized_start = 15290 + _globals['_HASHJOINREL_BUILDINPUT']._serialized_end = 15376 + _globals['_MERGEJOINREL']._serialized_start = 15379 + _globals['_MERGEJOINREL']._serialized_end = 16209 + _globals['_MERGEJOINREL_JOINTYPE']._serialized_start = 14960 + _globals['_MERGEJOINREL_JOINTYPE']._serialized_end = 15288 + _globals['_NESTEDLOOPJOINREL']._serialized_start = 16212 + _globals['_NESTEDLOOPJOINREL']._serialized_end = 16860 + _globals['_NESTEDLOOPJOINREL_JOINTYPE']._serialized_start = 14960 + _globals['_NESTEDLOOPJOINREL_JOINTYPE']._serialized_end = 15288 + _globals['_FUNCTIONARGUMENT']._serialized_start = 16863 + _globals['_FUNCTIONARGUMENT']._serialized_end = 16993 + _globals['_FUNCTIONOPTION']._serialized_start = 16995 + _globals['_FUNCTIONOPTION']._serialized_end = 17063 + _globals['_EXPRESSION']._serialized_start = 17066 + _globals['_EXPRESSION']._serialized_end = 28297 + _globals['_EXPRESSION_ENUM']._serialized_start = 17917 + _globals['_EXPRESSION_ENUM']._serialized_end = 18051 + _globals['_EXPRESSION_ENUM_EMPTY']._serialized_start = 18023 + _globals['_EXPRESSION_ENUM_EMPTY']._serialized_end = 18034 + _globals['_EXPRESSION_LITERAL']._serialized_start = 18054 + _globals['_EXPRESSION_LITERAL']._serialized_end = 20964 + _globals['_EXPRESSION_LITERAL_VARCHAR']._serialized_start = 19644 + _globals['_EXPRESSION_LITERAL_VARCHAR']._serialized_end = 19699 + _globals['_EXPRESSION_LITERAL_DECIMAL']._serialized_start = 19701 + _globals['_EXPRESSION_LITERAL_DECIMAL']._serialized_end = 19784 + _globals['_EXPRESSION_LITERAL_PRECISIONTIME']._serialized_start = 19786 + _globals['_EXPRESSION_LITERAL_PRECISIONTIME']._serialized_end = 19853 + _globals['_EXPRESSION_LITERAL_PRECISIONTIMESTAMP']._serialized_start = 19855 + _globals['_EXPRESSION_LITERAL_PRECISIONTIMESTAMP']._serialized_end = 19927 + _globals['_EXPRESSION_LITERAL_MAP']._serialized_start = 19930 + _globals['_EXPRESSION_LITERAL_MAP']._serialized_end = 20112 + _globals['_EXPRESSION_LITERAL_MAP_KEYVALUE']._serialized_start = 20008 + _globals['_EXPRESSION_LITERAL_MAP_KEYVALUE']._serialized_end = 20112 + _globals['_EXPRESSION_LITERAL_INTERVALYEARTOMONTH']._serialized_start = 20114 + _globals['_EXPRESSION_LITERAL_INTERVALYEARTOMONTH']._serialized_end = 20181 + _globals['_EXPRESSION_LITERAL_INTERVALDAYTOSECOND']._serialized_start = 20184 + _globals['_EXPRESSION_LITERAL_INTERVALDAYTOSECOND']._serialized_end = 20375 + _globals['_EXPRESSION_LITERAL_INTERVALCOMPOUND']._serialized_start = 20378 + _globals['_EXPRESSION_LITERAL_INTERVALCOMPOUND']._serialized_end = 20596 + _globals['_EXPRESSION_LITERAL_STRUCT']._serialized_start = 20598 + _globals['_EXPRESSION_LITERAL_STRUCT']._serialized_end = 20657 + _globals['_EXPRESSION_LITERAL_LIST']._serialized_start = 20659 + _globals['_EXPRESSION_LITERAL_LIST']._serialized_end = 20716 + _globals['_EXPRESSION_LITERAL_USERDEFINED']._serialized_start = 20719 + _globals['_EXPRESSION_LITERAL_USERDEFINED']._serialized_end = 20948 + _globals['_EXPRESSION_NESTED']._serialized_start = 20967 + _globals['_EXPRESSION_NESTED']._serialized_end = 21510 + _globals['_EXPRESSION_NESTED_MAP']._serialized_start = 21226 + _globals['_EXPRESSION_NESTED_MAP']._serialized_end = 21391 + _globals['_EXPRESSION_NESTED_MAP_KEYVALUE']._serialized_start = 21303 + _globals['_EXPRESSION_NESTED_MAP_KEYVALUE']._serialized_end = 21391 + _globals['_EXPRESSION_NESTED_STRUCT']._serialized_start = 21393 + _globals['_EXPRESSION_NESTED_STRUCT']._serialized_end = 21444 + _globals['_EXPRESSION_NESTED_LIST']._serialized_start = 21446 + _globals['_EXPRESSION_NESTED_LIST']._serialized_end = 21495 + _globals['_EXPRESSION_SCALARFUNCTION']._serialized_start = 21513 + _globals['_EXPRESSION_SCALARFUNCTION']._serialized_end = 21769 + _globals['_EXPRESSION_WINDOWFUNCTION']._serialized_start = 21772 + _globals['_EXPRESSION_WINDOWFUNCTION']._serialized_end = 23009 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND']._serialized_start = 22473 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND']._serialized_end = 22921 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_PRECEDING']._serialized_start = 22814 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_PRECEDING']._serialized_end = 22849 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_FOLLOWING']._serialized_start = 22851 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_FOLLOWING']._serialized_end = 22886 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_CURRENTROW']._serialized_start = 22888 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_CURRENTROW']._serialized_end = 22900 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_UNBOUNDED']._serialized_start = 22902 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUND_UNBOUNDED']._serialized_end = 22913 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUNDSTYPE']._serialized_start = 22923 + _globals['_EXPRESSION_WINDOWFUNCTION_BOUNDSTYPE']._serialized_end = 23009 + _globals['_EXPRESSION_IFTHEN']._serialized_start = 23012 + _globals['_EXPRESSION_IFTHEN']._serialized_end = 23198 + _globals['_EXPRESSION_IFTHEN_IFCLAUSE']._serialized_start = 23114 + _globals['_EXPRESSION_IFTHEN_IFCLAUSE']._serialized_end = 23198 + _globals['_EXPRESSION_CAST']._serialized_start = 23201 + _globals['_EXPRESSION_CAST']._serialized_end = 23489 + _globals['_EXPRESSION_CAST_FAILUREBEHAVIOR']._serialized_start = 23366 + _globals['_EXPRESSION_CAST_FAILUREBEHAVIOR']._serialized_end = 23489 + _globals['_EXPRESSION_SWITCHEXPRESSION']._serialized_start = 23492 + _globals['_EXPRESSION_SWITCHEXPRESSION']._serialized_end = 23745 + _globals['_EXPRESSION_SWITCHEXPRESSION_IFVALUE']._serialized_start = 23654 + _globals['_EXPRESSION_SWITCHEXPRESSION_IFVALUE']._serialized_end = 23745 + _globals['_EXPRESSION_SINGULARORLIST']._serialized_start = 23747 + _globals['_EXPRESSION_SINGULARORLIST']._serialized_end = 23849 + _globals['_EXPRESSION_MULTIORLIST']._serialized_start = 23852 + _globals['_EXPRESSION_MULTIORLIST']._serialized_end = 24023 + _globals['_EXPRESSION_MULTIORLIST_RECORD']._serialized_start = 23972 + _globals['_EXPRESSION_MULTIORLIST_RECORD']._serialized_end = 24023 + _globals['_EXPRESSION_EMBEDDEDFUNCTION']._serialized_start = 24026 + _globals['_EXPRESSION_EMBEDDEDFUNCTION']._serialized_end = 24541 + _globals['_EXPRESSION_EMBEDDEDFUNCTION_PYTHONPICKLEFUNCTION']._serialized_start = 24364 + _globals['_EXPRESSION_EMBEDDEDFUNCTION_PYTHONPICKLEFUNCTION']._serialized_end = 24450 + _globals['_EXPRESSION_EMBEDDEDFUNCTION_WEBASSEMBLYFUNCTION']._serialized_start = 24452 + _globals['_EXPRESSION_EMBEDDEDFUNCTION_WEBASSEMBLYFUNCTION']._serialized_end = 24533 + _globals['_EXPRESSION_REFERENCESEGMENT']._serialized_start = 24544 + _globals['_EXPRESSION_REFERENCESEGMENT']._serialized_end = 25132 + _globals['_EXPRESSION_REFERENCESEGMENT_MAPKEY']._serialized_start = 24804 + _globals['_EXPRESSION_REFERENCESEGMENT_MAPKEY']._serialized_end = 24922 + _globals['_EXPRESSION_REFERENCESEGMENT_STRUCTFIELD']._serialized_start = 24924 + _globals['_EXPRESSION_REFERENCESEGMENT_STRUCTFIELD']._serialized_end = 25017 + _globals['_EXPRESSION_REFERENCESEGMENT_LISTELEMENT']._serialized_start = 25019 + _globals['_EXPRESSION_REFERENCESEGMENT_LISTELEMENT']._serialized_end = 25114 + _globals['_EXPRESSION_MASKEXPRESSION']._serialized_start = 25135 + _globals['_EXPRESSION_MASKEXPRESSION']._serialized_end = 26525 + _globals['_EXPRESSION_MASKEXPRESSION_SELECT']._serialized_start = 25283 + _globals['_EXPRESSION_MASKEXPRESSION_SELECT']._serialized_end = 25503 + _globals['_EXPRESSION_MASKEXPRESSION_STRUCTSELECT']._serialized_start = 25505 + _globals['_EXPRESSION_MASKEXPRESSION_STRUCTSELECT']._serialized_end = 25599 + _globals['_EXPRESSION_MASKEXPRESSION_STRUCTITEM']._serialized_start = 25601 + _globals['_EXPRESSION_MASKEXPRESSION_STRUCTITEM']._serialized_end = 25698 + _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT']._serialized_start = 25701 + _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT']._serialized_end = 26171 + _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM']._serialized_start = 25869 + _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM']._serialized_end = 26171 + _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM_LISTELEMENT']._serialized_start = 26075 + _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM_LISTELEMENT']._serialized_end = 26110 + _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM_LISTSLICE']._serialized_start = 26112 + _globals['_EXPRESSION_MASKEXPRESSION_LISTSELECT_LISTSELECTITEM_LISTSLICE']._serialized_end = 26163 + _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT']._serialized_start = 26174 + _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT']._serialized_end = 26525 + _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT_MAPKEY']._serialized_start = 26416 + _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT_MAPKEY']._serialized_end = 26449 + _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT_MAPKEYEXPRESSION']._serialized_start = 26451 + _globals['_EXPRESSION_MASKEXPRESSION_MAPSELECT_MAPKEYEXPRESSION']._serialized_end = 26515 + _globals['_EXPRESSION_FIELDREFERENCE']._serialized_start = 26528 + _globals['_EXPRESSION_FIELDREFERENCE']._serialized_end = 27033 + _globals['_EXPRESSION_FIELDREFERENCE_ROOTREFERENCE']._serialized_start = 26940 + _globals['_EXPRESSION_FIELDREFERENCE_ROOTREFERENCE']._serialized_end = 26955 + _globals['_EXPRESSION_FIELDREFERENCE_OUTERREFERENCE']._serialized_start = 26957 + _globals['_EXPRESSION_FIELDREFERENCE_OUTERREFERENCE']._serialized_end = 27002 + _globals['_EXPRESSION_SUBQUERY']._serialized_start = 27036 + _globals['_EXPRESSION_SUBQUERY']._serialized_end = 28285 + _globals['_EXPRESSION_SUBQUERY_SCALAR']._serialized_start = 27349 + _globals['_EXPRESSION_SUBQUERY_SCALAR']._serialized_end = 27391 + _globals['_EXPRESSION_SUBQUERY_INPREDICATE']._serialized_start = 27393 + _globals['_EXPRESSION_SUBQUERY_INPREDICATE']._serialized_end = 27491 + _globals['_EXPRESSION_SUBQUERY_SETPREDICATE']._serialized_start = 27494 + _globals['_EXPRESSION_SUBQUERY_SETPREDICATE']._serialized_end = 27727 + _globals['_EXPRESSION_SUBQUERY_SETPREDICATE_PREDICATEOP']._serialized_start = 27634 + _globals['_EXPRESSION_SUBQUERY_SETPREDICATE_PREDICATEOP']._serialized_end = 27727 + _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON']._serialized_start = 27730 + _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON']._serialized_end = 28268 + _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON_COMPARISONOP']._serialized_start = 28002 + _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON_COMPARISONOP']._serialized_end = 28179 + _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON_REDUCTIONOP']._serialized_start = 28181 + _globals['_EXPRESSION_SUBQUERY_SETCOMPARISON_REDUCTIONOP']._serialized_end = 28268 + _globals['_DYNAMICPARAMETER']._serialized_start = 28299 + _globals['_DYNAMICPARAMETER']._serialized_end = 28399 + _globals['_SORTFIELD']._serialized_start = 28402 + _globals['_SORTFIELD']._serialized_end = 28823 + _globals['_SORTFIELD_SORTDIRECTION']._serialized_start = 28589 + _globals['_SORTFIELD_SORTDIRECTION']._serialized_end = 28810 + _globals['_AGGREGATEFUNCTION']._serialized_start = 28826 + _globals['_AGGREGATEFUNCTION']._serialized_end = 29387 + _globals['_AGGREGATEFUNCTION_AGGREGATIONINVOCATION']._serialized_start = 29255 + _globals['_AGGREGATEFUNCTION_AGGREGATIONINVOCATION']._serialized_end = 29387 + _globals['_REFERENCEREL']._serialized_start = 29389 + _globals['_REFERENCEREL']._serialized_end = 29444 \ No newline at end of file diff --git a/src/substrait/gen/proto/algebra_pb2.pyi b/src/substrait/gen/proto/algebra_pb2.pyi index 6f56aba..04b9be3 100644 --- a/src/substrait/gen/proto/algebra_pb2.pyi +++ b/src/substrait/gen/proto/algebra_pb2.pyi @@ -152,15 +152,23 @@ class RelCommon(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor COMPUTATION_ID_FIELD_NUMBER: builtins.int TYPE_FIELD_NUMBER: builtins.int + ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int computation_id: builtins.int 'The value corresponds to a plan unique number for that datastructure. Any particular\n computation may be saved only once but it may be loaded multiple times.\n ' type: global___RelCommon.Hint.ComputationType.ValueType 'The type of this computation. While a plan may use COMPUTATION_TYPE_UNKNOWN for all\n of its types it is recommended to use a more specific type so that the optimization\n is more portable. The consumer should be able to decide if an unknown type here\n matches the same unknown type at a different plan and ignore the optimization if they\n are mismatched.\n ' - def __init__(self, *, computation_id: builtins.int=..., type: global___RelCommon.Hint.ComputationType.ValueType=...) -> None: + @property + def advanced_extension(self) -> proto.extensions.extensions_pb2.AdvancedExtension: + ... + + def __init__(self, *, computation_id: builtins.int=..., type: global___RelCommon.Hint.ComputationType.ValueType=..., advanced_extension: proto.extensions.extensions_pb2.AdvancedExtension | None=...) -> None: + ... + + def HasField(self, field_name: typing.Literal['advanced_extension', b'advanced_extension']) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal['computation_id', b'computation_id', 'type', b'type']) -> None: + def ClearField(self, field_name: typing.Literal['advanced_extension', b'advanced_extension', 'computation_id', b'computation_id', 'type', b'type']) -> None: ... @typing.final @@ -168,15 +176,23 @@ class RelCommon(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor COMPUTATION_ID_REFERENCE_FIELD_NUMBER: builtins.int TYPE_FIELD_NUMBER: builtins.int + ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int computation_id_reference: builtins.int 'The value corresponds to a plan unique number for that datastructure. Any particular\n computation may be saved only once but it may be loaded multiple times.\n ' type: global___RelCommon.Hint.ComputationType.ValueType 'The type of this computation. While a plan may use COMPUTATION_TYPE_UNKNOWN for all\n of its types it is recommended to use a more specific type so that the optimization\n is more portable. The consumer should be able to decide if an unknown type here\n matches the same unknown type at a different plan and ignore the optimization if they\n are mismatched.\n ' - def __init__(self, *, computation_id_reference: builtins.int=..., type: global___RelCommon.Hint.ComputationType.ValueType=...) -> None: + @property + def advanced_extension(self) -> proto.extensions.extensions_pb2.AdvancedExtension: + ... + + def __init__(self, *, computation_id_reference: builtins.int=..., type: global___RelCommon.Hint.ComputationType.ValueType=..., advanced_extension: proto.extensions.extensions_pb2.AdvancedExtension | None=...) -> None: + ... + + def HasField(self, field_name: typing.Literal['advanced_extension', b'advanced_extension']) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal['computation_id_reference', b'computation_id_reference', 'type', b'type']) -> None: + def ClearField(self, field_name: typing.Literal['advanced_extension', b'advanced_extension', 'computation_id_reference', b'computation_id_reference', 'type', b'type']) -> None: ... STATS_FIELD_NUMBER: builtins.int CONSTRAINT_FIELD_NUMBER: builtins.int diff --git a/src/substrait/gen/proto/extended_expression_pb2.py b/src/substrait/gen/proto/extended_expression_pb2.py index 34ae34c..cc612b9 100644 --- a/src/substrait/gen/proto/extended_expression_pb2.py +++ b/src/substrait/gen/proto/extended_expression_pb2.py @@ -10,14 +10,16 @@ from ..proto.extensions import extensions_pb2 as proto_dot_extensions_dot_extensions__pb2 from ..proto import plan_pb2 as proto_dot_plan__pb2 from ..proto import type_pb2 as proto_dot_type__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fproto/extended_expression.proto\x12\x05proto\x1a\x13proto/algebra.proto\x1a!proto/extensions/extensions.proto\x1a\x10proto/plan.proto\x1a\x10proto/type.proto"\xb0\x01\n\x13ExpressionReference\x123\n\nexpression\x18\x01 \x01(\x0b2\x11.proto.ExpressionH\x00R\nexpression\x124\n\x07measure\x18\x02 \x01(\x0b2\x18.proto.AggregateFunctionH\x00R\x07measure\x12!\n\x0coutput_names\x18\x03 \x03(\tR\x0boutputNamesB\x0b\n\texpr_type"\xd3\x03\n\x12ExtendedExpression\x12(\n\x07version\x18\x07 \x01(\x0b2\x0e.proto.VersionR\x07version\x12K\n\x0eextension_uris\x18\x01 \x03(\x0b2$.proto.extensions.SimpleExtensionURIR\rextensionUris\x12L\n\nextensions\x18\x02 \x03(\x0b2,.proto.extensions.SimpleExtensionDeclarationR\nextensions\x12?\n\rreferred_expr\x18\x03 \x03(\x0b2\x1a.proto.ExpressionReferenceR\x0creferredExpr\x123\n\x0bbase_schema\x18\x04 \x01(\x0b2\x12.proto.NamedStructR\nbaseSchema\x12T\n\x13advanced_extensions\x18\x05 \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x12advancedExtensions\x12,\n\x12expected_type_urls\x18\x06 \x03(\tR\x10expectedTypeUrlsB#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fproto/extended_expression.proto\x12\x05proto\x1a\x13proto/algebra.proto\x1a!proto/extensions/extensions.proto\x1a\x10proto/plan.proto\x1a\x10proto/type.proto"\xb0\x01\n\x13ExpressionReference\x123\n\nexpression\x18\x01 \x01(\x0b2\x11.proto.ExpressionH\x00R\nexpression\x124\n\x07measure\x18\x02 \x01(\x0b2\x18.proto.AggregateFunctionH\x00R\x07measure\x12!\n\x0coutput_names\x18\x03 \x03(\tR\x0boutputNamesB\x0b\n\texpr_type"\xa4\x04\n\x12ExtendedExpression\x12(\n\x07version\x18\x07 \x01(\x0b2\x0e.proto.VersionR\x07version\x12O\n\x0eextension_uris\x18\x01 \x03(\x0b2$.proto.extensions.SimpleExtensionURIB\x02\x18\x01R\rextensionUris\x12K\n\x0eextension_urns\x18\x08 \x03(\x0b2$.proto.extensions.SimpleExtensionURNR\rextensionUrns\x12L\n\nextensions\x18\x02 \x03(\x0b2,.proto.extensions.SimpleExtensionDeclarationR\nextensions\x12?\n\rreferred_expr\x18\x03 \x03(\x0b2\x1a.proto.ExpressionReferenceR\x0creferredExpr\x123\n\x0bbase_schema\x18\x04 \x01(\x0b2\x12.proto.NamedStructR\nbaseSchema\x12T\n\x13advanced_extensions\x18\x05 \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x12advancedExtensions\x12,\n\x12expected_type_urls\x18\x06 \x03(\tR\x10expectedTypeUrlsB#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.extended_expression_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobuf' + _globals['_EXTENDEDEXPRESSION'].fields_by_name['extension_uris']._loaded_options = None + _globals['_EXTENDEDEXPRESSION'].fields_by_name['extension_uris']._serialized_options = b'\x18\x01' _globals['_EXPRESSIONREFERENCE']._serialized_start = 135 _globals['_EXPRESSIONREFERENCE']._serialized_end = 311 _globals['_EXTENDEDEXPRESSION']._serialized_start = 314 - _globals['_EXTENDEDEXPRESSION']._serialized_end = 781 \ No newline at end of file + _globals['_EXTENDEDEXPRESSION']._serialized_end = 862 \ No newline at end of file diff --git a/src/substrait/gen/proto/extended_expression_pb2.pyi b/src/substrait/gen/proto/extended_expression_pb2.pyi index 52d349a..27829c8 100644 --- a/src/substrait/gen/proto/extended_expression_pb2.pyi +++ b/src/substrait/gen/proto/extended_expression_pb2.pyi @@ -51,6 +51,7 @@ class ExtendedExpression(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor VERSION_FIELD_NUMBER: builtins.int EXTENSION_URIS_FIELD_NUMBER: builtins.int + EXTENSION_URNS_FIELD_NUMBER: builtins.int EXTENSIONS_FIELD_NUMBER: builtins.int REFERRED_EXPR_FIELD_NUMBER: builtins.int BASE_SCHEMA_FIELD_NUMBER: builtins.int @@ -65,7 +66,15 @@ class ExtendedExpression(google.protobuf.message.Message): @property def extension_uris(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.extensions.extensions_pb2.SimpleExtensionURI]: - """a list of yaml specifications this expression may depend on""" + """a list of yaml specifications this expression may depend on + this is now deprecated and extension_urns should be used instead. + """ + + @property + def extension_urns(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.extensions.extensions_pb2.SimpleExtensionURN]: + """a list of extension specifications this expression may depend on, + referenced by Extension URN + """ @property def extensions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.extensions.extensions_pb2.SimpleExtensionDeclaration]: @@ -92,12 +101,12 @@ class ExtendedExpression(google.protobuf.message.Message): one or more message types defined here are unknown. """ - def __init__(self, *, version: proto.plan_pb2.Version | None=..., extension_uris: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionURI] | None=..., extensions: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionDeclaration] | None=..., referred_expr: collections.abc.Iterable[global___ExpressionReference] | None=..., base_schema: proto.type_pb2.NamedStruct | None=..., advanced_extensions: proto.extensions.extensions_pb2.AdvancedExtension | None=..., expected_type_urls: collections.abc.Iterable[builtins.str] | None=...) -> None: + def __init__(self, *, version: proto.plan_pb2.Version | None=..., extension_uris: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionURI] | None=..., extension_urns: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionURN] | None=..., extensions: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionDeclaration] | None=..., referred_expr: collections.abc.Iterable[global___ExpressionReference] | None=..., base_schema: proto.type_pb2.NamedStruct | None=..., advanced_extensions: proto.extensions.extensions_pb2.AdvancedExtension | None=..., expected_type_urls: collections.abc.Iterable[builtins.str] | None=...) -> None: ... def HasField(self, field_name: typing.Literal['advanced_extensions', b'advanced_extensions', 'base_schema', b'base_schema', 'version', b'version']) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal['advanced_extensions', b'advanced_extensions', 'base_schema', b'base_schema', 'expected_type_urls', b'expected_type_urls', 'extension_uris', b'extension_uris', 'extensions', b'extensions', 'referred_expr', b'referred_expr', 'version', b'version']) -> None: + def ClearField(self, field_name: typing.Literal['advanced_extensions', b'advanced_extensions', 'base_schema', b'base_schema', 'expected_type_urls', b'expected_type_urls', 'extension_uris', b'extension_uris', 'extension_urns', b'extension_urns', 'extensions', b'extensions', 'referred_expr', b'referred_expr', 'version', b'version']) -> None: ... global___ExtendedExpression = ExtendedExpression \ No newline at end of file diff --git a/src/substrait/gen/proto/extensions/extensions_pb2.py b/src/substrait/gen/proto/extensions/extensions_pb2.py index 2147ac4..cd74ec8 100644 --- a/src/substrait/gen/proto/extensions/extensions_pb2.py +++ b/src/substrait/gen/proto/extensions/extensions_pb2.py @@ -7,22 +7,32 @@ _runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 5, '', 'proto/extensions/extensions.proto') _sym_db = _symbol_database.Default() from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!proto/extensions/extensions.proto\x12\x10proto.extensions\x1a\x19google/protobuf/any.proto"X\n\x12SimpleExtensionURI\x120\n\x14extension_uri_anchor\x18\x01 \x01(\rR\x12extensionUriAnchor\x12\x10\n\x03uri\x18\x02 \x01(\tR\x03uri"\xa7\x06\n\x1aSimpleExtensionDeclaration\x12c\n\x0eextension_type\x18\x01 \x01(\x0b2:.proto.extensions.SimpleExtensionDeclaration.ExtensionTypeH\x00R\rextensionType\x12\x7f\n\x18extension_type_variation\x18\x02 \x01(\x0b2C.proto.extensions.SimpleExtensionDeclaration.ExtensionTypeVariationH\x00R\x16extensionTypeVariation\x12o\n\x12extension_function\x18\x03 \x01(\x0b2>.proto.extensions.SimpleExtensionDeclaration.ExtensionFunctionH\x00R\x11extensionFunction\x1a|\n\rExtensionType\x126\n\x17extension_uri_reference\x18\x01 \x01(\rR\x15extensionUriReference\x12\x1f\n\x0btype_anchor\x18\x02 \x01(\rR\ntypeAnchor\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x1a\x98\x01\n\x16ExtensionTypeVariation\x126\n\x17extension_uri_reference\x18\x01 \x01(\rR\x15extensionUriReference\x122\n\x15type_variation_anchor\x18\x02 \x01(\rR\x13typeVariationAnchor\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x1a\x88\x01\n\x11ExtensionFunction\x126\n\x17extension_uri_reference\x18\x01 \x01(\rR\x15extensionUriReference\x12\'\n\x0ffunction_anchor\x18\x02 \x01(\rR\x0efunctionAnchor\x12\x12\n\x04name\x18\x03 \x01(\tR\x04nameB\x0e\n\x0cmapping_type"\x85\x01\n\x11AdvancedExtension\x128\n\x0coptimization\x18\x01 \x03(\x0b2\x14.google.protobuf.AnyR\x0coptimization\x126\n\x0benhancement\x18\x02 \x01(\x0b2\x14.google.protobuf.AnyR\x0benhancementB#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!proto/extensions/extensions.proto\x12\x10proto.extensions\x1a\x19google/protobuf/any.proto"\\\n\x12SimpleExtensionURI\x120\n\x14extension_uri_anchor\x18\x01 \x01(\rR\x12extensionUriAnchor\x12\x10\n\x03uri\x18\x02 \x01(\tR\x03uri:\x02\x18\x01"X\n\x12SimpleExtensionURN\x120\n\x14extension_urn_anchor\x18\x01 \x01(\rR\x12extensionUrnAnchor\x12\x10\n\x03urn\x18\x02 \x01(\tR\x03urn"\xdc\x07\n\x1aSimpleExtensionDeclaration\x12c\n\x0eextension_type\x18\x01 \x01(\x0b2:.proto.extensions.SimpleExtensionDeclaration.ExtensionTypeH\x00R\rextensionType\x12\x7f\n\x18extension_type_variation\x18\x02 \x01(\x0b2C.proto.extensions.SimpleExtensionDeclaration.ExtensionTypeVariationH\x00R\x16extensionTypeVariation\x12o\n\x12extension_function\x18\x03 \x01(\x0b2>.proto.extensions.SimpleExtensionDeclaration.ExtensionFunctionH\x00R\x11extensionFunction\x1a\xb8\x01\n\rExtensionType\x12:\n\x17extension_uri_reference\x18\x01 \x01(\rB\x02\x18\x01R\x15extensionUriReference\x126\n\x17extension_urn_reference\x18\x04 \x01(\rR\x15extensionUrnReference\x12\x1f\n\x0btype_anchor\x18\x02 \x01(\rR\ntypeAnchor\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x1a\xd4\x01\n\x16ExtensionTypeVariation\x12:\n\x17extension_uri_reference\x18\x01 \x01(\rB\x02\x18\x01R\x15extensionUriReference\x126\n\x17extension_urn_reference\x18\x04 \x01(\rR\x15extensionUrnReference\x122\n\x15type_variation_anchor\x18\x02 \x01(\rR\x13typeVariationAnchor\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x1a\xc4\x01\n\x11ExtensionFunction\x12:\n\x17extension_uri_reference\x18\x01 \x01(\rB\x02\x18\x01R\x15extensionUriReference\x126\n\x17extension_urn_reference\x18\x04 \x01(\rR\x15extensionUrnReference\x12\'\n\x0ffunction_anchor\x18\x02 \x01(\rR\x0efunctionAnchor\x12\x12\n\x04name\x18\x03 \x01(\tR\x04nameB\x0e\n\x0cmapping_type"\x85\x01\n\x11AdvancedExtension\x128\n\x0coptimization\x18\x01 \x03(\x0b2\x14.google.protobuf.AnyR\x0coptimization\x126\n\x0benhancement\x18\x02 \x01(\x0b2\x14.google.protobuf.AnyR\x0benhancementB#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.extensions.extensions_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobuf' + _globals['_SIMPLEEXTENSIONURI']._loaded_options = None + _globals['_SIMPLEEXTENSIONURI']._serialized_options = b'\x18\x01' + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPE'].fields_by_name['extension_uri_reference']._loaded_options = None + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPE'].fields_by_name['extension_uri_reference']._serialized_options = b'\x18\x01' + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPEVARIATION'].fields_by_name['extension_uri_reference']._loaded_options = None + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPEVARIATION'].fields_by_name['extension_uri_reference']._serialized_options = b'\x18\x01' + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONFUNCTION'].fields_by_name['extension_uri_reference']._loaded_options = None + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONFUNCTION'].fields_by_name['extension_uri_reference']._serialized_options = b'\x18\x01' _globals['_SIMPLEEXTENSIONURI']._serialized_start = 82 - _globals['_SIMPLEEXTENSIONURI']._serialized_end = 170 - _globals['_SIMPLEEXTENSIONDECLARATION']._serialized_start = 173 - _globals['_SIMPLEEXTENSIONDECLARATION']._serialized_end = 980 - _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPE']._serialized_start = 546 - _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPE']._serialized_end = 670 - _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPEVARIATION']._serialized_start = 673 - _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPEVARIATION']._serialized_end = 825 - _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONFUNCTION']._serialized_start = 828 - _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONFUNCTION']._serialized_end = 964 - _globals['_ADVANCEDEXTENSION']._serialized_start = 983 - _globals['_ADVANCEDEXTENSION']._serialized_end = 1116 \ No newline at end of file + _globals['_SIMPLEEXTENSIONURI']._serialized_end = 174 + _globals['_SIMPLEEXTENSIONURN']._serialized_start = 176 + _globals['_SIMPLEEXTENSIONURN']._serialized_end = 264 + _globals['_SIMPLEEXTENSIONDECLARATION']._serialized_start = 267 + _globals['_SIMPLEEXTENSIONDECLARATION']._serialized_end = 1255 + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPE']._serialized_start = 641 + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPE']._serialized_end = 825 + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPEVARIATION']._serialized_start = 828 + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONTYPEVARIATION']._serialized_end = 1040 + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONFUNCTION']._serialized_start = 1043 + _globals['_SIMPLEEXTENSIONDECLARATION_EXTENSIONFUNCTION']._serialized_end = 1239 + _globals['_ADVANCEDEXTENSION']._serialized_start = 1258 + _globals['_ADVANCEDEXTENSION']._serialized_end = 1391 \ No newline at end of file diff --git a/src/substrait/gen/proto/extensions/extensions_pb2.pyi b/src/substrait/gen/proto/extensions/extensions_pb2.pyi index f866b3d..5b1765c 100644 --- a/src/substrait/gen/proto/extensions/extensions_pb2.pyi +++ b/src/substrait/gen/proto/extensions/extensions_pb2.pyi @@ -13,6 +13,7 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor @typing.final class SimpleExtensionURI(google.protobuf.message.Message): + """This message is deprecated, use SimpleExtensionURN moving forwards""" DESCRIPTOR: google.protobuf.descriptor.Descriptor EXTENSION_URI_ANCHOR_FIELD_NUMBER: builtins.int URI_FIELD_NUMBER: builtins.int @@ -28,9 +29,26 @@ class SimpleExtensionURI(google.protobuf.message.Message): ... global___SimpleExtensionURI = SimpleExtensionURI +@typing.final +class SimpleExtensionURN(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + EXTENSION_URN_ANCHOR_FIELD_NUMBER: builtins.int + URN_FIELD_NUMBER: builtins.int + extension_urn_anchor: builtins.int + 'A surrogate key used in the context of a single plan used to reference the\n URN associated with an extension.\n ' + urn: builtins.str + 'The extension URN that uniquely identifies this extension. This must follow the\n format extension:: and serves as the "namespace" of this extension.\n ' + + def __init__(self, *, extension_urn_anchor: builtins.int=..., urn: builtins.str=...) -> None: + ... + + def ClearField(self, field_name: typing.Literal['extension_urn_anchor', b'extension_urn_anchor', 'urn', b'urn']) -> None: + ... +global___SimpleExtensionURN = SimpleExtensionURN + @typing.final class SimpleExtensionDeclaration(google.protobuf.message.Message): - """Describes a mapping between a specific extension entity and the uri where + """Describes a mapping between a specific extension entity and the uri/urn where that extension can be found. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -40,57 +58,66 @@ class SimpleExtensionDeclaration(google.protobuf.message.Message): """Describes a Type""" DESCRIPTOR: google.protobuf.descriptor.Descriptor EXTENSION_URI_REFERENCE_FIELD_NUMBER: builtins.int + EXTENSION_URN_REFERENCE_FIELD_NUMBER: builtins.int TYPE_ANCHOR_FIELD_NUMBER: builtins.int NAME_FIELD_NUMBER: builtins.int extension_uri_reference: builtins.int - 'references the extension_uri_anchor defined for a specific extension URI.' + 'references the extension_uri_anchor defined for a specific extension URI.\n this is now deprecated and extension_urn_reference should be used instead.\n ' + extension_urn_reference: builtins.int + 'references the extension_urn_anchor defined for a specific extension URN.\n If both extension_urn_reference and extension_uri_reference are present,\n extension_urn_reference takes precedence.\n ' type_anchor: builtins.int 'A surrogate key used in the context of a single plan to reference a\n specific extension type\n ' name: builtins.str 'the name of the type in the defined extension YAML.' - def __init__(self, *, extension_uri_reference: builtins.int=..., type_anchor: builtins.int=..., name: builtins.str=...) -> None: + def __init__(self, *, extension_uri_reference: builtins.int=..., extension_urn_reference: builtins.int=..., type_anchor: builtins.int=..., name: builtins.str=...) -> None: ... - def ClearField(self, field_name: typing.Literal['extension_uri_reference', b'extension_uri_reference', 'name', b'name', 'type_anchor', b'type_anchor']) -> None: + def ClearField(self, field_name: typing.Literal['extension_uri_reference', b'extension_uri_reference', 'extension_urn_reference', b'extension_urn_reference', 'name', b'name', 'type_anchor', b'type_anchor']) -> None: ... @typing.final class ExtensionTypeVariation(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor EXTENSION_URI_REFERENCE_FIELD_NUMBER: builtins.int + EXTENSION_URN_REFERENCE_FIELD_NUMBER: builtins.int TYPE_VARIATION_ANCHOR_FIELD_NUMBER: builtins.int NAME_FIELD_NUMBER: builtins.int extension_uri_reference: builtins.int - 'references the extension_uri_anchor defined for a specific extension URI.' + 'references the extension_uri_anchor defined for a specific extension URI.\n this is now deprecated and extension_urn_reference should be used instead.\n ' + extension_urn_reference: builtins.int + 'references the extension_urn_anchor defined for a specific extension URN.\n If both extension_urn_reference and extension_uri_reference are present,\n extension_urn_reference takes precedence.\n ' type_variation_anchor: builtins.int 'A surrogate key used in the context of a single plan to reference a\n specific type variation\n ' name: builtins.str 'the name of the type in the defined extension YAML.' - def __init__(self, *, extension_uri_reference: builtins.int=..., type_variation_anchor: builtins.int=..., name: builtins.str=...) -> None: + def __init__(self, *, extension_uri_reference: builtins.int=..., extension_urn_reference: builtins.int=..., type_variation_anchor: builtins.int=..., name: builtins.str=...) -> None: ... - def ClearField(self, field_name: typing.Literal['extension_uri_reference', b'extension_uri_reference', 'name', b'name', 'type_variation_anchor', b'type_variation_anchor']) -> None: + def ClearField(self, field_name: typing.Literal['extension_uri_reference', b'extension_uri_reference', 'extension_urn_reference', b'extension_urn_reference', 'name', b'name', 'type_variation_anchor', b'type_variation_anchor']) -> None: ... @typing.final class ExtensionFunction(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor EXTENSION_URI_REFERENCE_FIELD_NUMBER: builtins.int + EXTENSION_URN_REFERENCE_FIELD_NUMBER: builtins.int FUNCTION_ANCHOR_FIELD_NUMBER: builtins.int NAME_FIELD_NUMBER: builtins.int extension_uri_reference: builtins.int - 'references the extension_uri_anchor defined for a specific extension URI.' + 'references the extension_uri_anchor defined for a specific extension URI.\n this is now deprecated and extension_urn_reference should be used instead.\n ' + extension_urn_reference: builtins.int + 'references the extension_urn_anchor defined for a specific extension URN.\n If both extension_urn_reference and extension_uri_reference are present,\n extension_urn_reference takes precedence.\n ' function_anchor: builtins.int 'A surrogate key used in the context of a single plan to reference a\n specific function\n ' name: builtins.str 'A function signature compound name' - def __init__(self, *, extension_uri_reference: builtins.int=..., function_anchor: builtins.int=..., name: builtins.str=...) -> None: + def __init__(self, *, extension_uri_reference: builtins.int=..., extension_urn_reference: builtins.int=..., function_anchor: builtins.int=..., name: builtins.str=...) -> None: ... - def ClearField(self, field_name: typing.Literal['extension_uri_reference', b'extension_uri_reference', 'function_anchor', b'function_anchor', 'name', b'name']) -> None: + def ClearField(self, field_name: typing.Literal['extension_uri_reference', b'extension_uri_reference', 'extension_urn_reference', b'extension_urn_reference', 'function_anchor', b'function_anchor', 'name', b'name']) -> None: ... EXTENSION_TYPE_FIELD_NUMBER: builtins.int EXTENSION_TYPE_VARIATION_FIELD_NUMBER: builtins.int diff --git a/src/substrait/gen/proto/plan_pb2.py b/src/substrait/gen/proto/plan_pb2.py index ef87a85..357716b 100644 --- a/src/substrait/gen/proto/plan_pb2.py +++ b/src/substrait/gen/proto/plan_pb2.py @@ -8,20 +8,23 @@ _sym_db = _symbol_database.Default() from ..proto import algebra_pb2 as proto_dot_algebra__pb2 from ..proto.extensions import extensions_pb2 as proto_dot_extensions_dot_extensions__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10proto/plan.proto\x12\x05proto\x1a\x13proto/algebra.proto\x1a!proto/extensions/extensions.proto"[\n\x07PlanRel\x12\x1e\n\x03rel\x18\x01 \x01(\x0b2\n.proto.RelH\x00R\x03rel\x12$\n\x04root\x18\x02 \x01(\x0b2\x0e.proto.RelRootH\x00R\x04rootB\n\n\x08rel_type"\xcc\x03\n\x04Plan\x12(\n\x07version\x18\x06 \x01(\x0b2\x0e.proto.VersionR\x07version\x12K\n\x0eextension_uris\x18\x01 \x03(\x0b2$.proto.extensions.SimpleExtensionURIR\rextensionUris\x12L\n\nextensions\x18\x02 \x03(\x0b2,.proto.extensions.SimpleExtensionDeclarationR\nextensions\x12,\n\trelations\x18\x03 \x03(\x0b2\x0e.proto.PlanRelR\trelations\x12T\n\x13advanced_extensions\x18\x04 \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x12advancedExtensions\x12,\n\x12expected_type_urls\x18\x05 \x03(\tR\x10expectedTypeUrls\x12M\n\x12parameter_bindings\x18\x07 \x03(\x0b2\x1e.proto.DynamicParameterBindingR\x11parameterBindings"7\n\x0bPlanVersion\x12(\n\x07version\x18\x06 \x01(\x0b2\x0e.proto.VersionR\x07version"\xa9\x01\n\x07Version\x12!\n\x0cmajor_number\x18\x01 \x01(\rR\x0bmajorNumber\x12!\n\x0cminor_number\x18\x02 \x01(\rR\x0bminorNumber\x12!\n\x0cpatch_number\x18\x03 \x01(\rR\x0bpatchNumber\x12\x19\n\x08git_hash\x18\x04 \x01(\tR\x07gitHash\x12\x1a\n\x08producer\x18\x05 \x01(\tR\x08producer"u\n\x17DynamicParameterBinding\x12)\n\x10parameter_anchor\x18\x01 \x01(\rR\x0fparameterAnchor\x12/\n\x05value\x18\x02 \x01(\x0b2\x19.proto.Expression.LiteralR\x05valueB#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') +from ..proto import type_pb2 as proto_dot_type__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10proto/plan.proto\x12\x05proto\x1a\x13proto/algebra.proto\x1a!proto/extensions/extensions.proto\x1a\x10proto/type.proto"[\n\x07PlanRel\x12\x1e\n\x03rel\x18\x01 \x01(\x0b2\n.proto.RelH\x00R\x03rel\x12$\n\x04root\x18\x02 \x01(\x0b2\x0e.proto.RelRootH\x00R\x04rootB\n\n\x08rel_type"\xd2\x04\n\x04Plan\x12(\n\x07version\x18\x06 \x01(\x0b2\x0e.proto.VersionR\x07version\x12O\n\x0eextension_uris\x18\x01 \x03(\x0b2$.proto.extensions.SimpleExtensionURIB\x02\x18\x01R\rextensionUris\x12K\n\x0eextension_urns\x18\x08 \x03(\x0b2$.proto.extensions.SimpleExtensionURNR\rextensionUrns\x12L\n\nextensions\x18\x02 \x03(\x0b2,.proto.extensions.SimpleExtensionDeclarationR\nextensions\x12,\n\trelations\x18\x03 \x03(\x0b2\x0e.proto.PlanRelR\trelations\x12T\n\x13advanced_extensions\x18\x04 \x01(\x0b2#.proto.extensions.AdvancedExtensionR\x12advancedExtensions\x12,\n\x12expected_type_urls\x18\x05 \x03(\tR\x10expectedTypeUrls\x12M\n\x12parameter_bindings\x18\x07 \x03(\x0b2\x1e.proto.DynamicParameterBindingR\x11parameterBindings\x123\n\x0ctype_aliases\x18\t \x03(\x0b2\x10.proto.TypeAliasR\x0btypeAliases"7\n\x0bPlanVersion\x12(\n\x07version\x18\x06 \x01(\x0b2\x0e.proto.VersionR\x07version"\xa9\x01\n\x07Version\x12!\n\x0cmajor_number\x18\x01 \x01(\rR\x0bmajorNumber\x12!\n\x0cminor_number\x18\x02 \x01(\rR\x0bminorNumber\x12!\n\x0cpatch_number\x18\x03 \x01(\rR\x0bpatchNumber\x12\x19\n\x08git_hash\x18\x04 \x01(\tR\x07gitHash\x12\x1a\n\x08producer\x18\x05 \x01(\tR\x08producer"u\n\x17DynamicParameterBinding\x12)\n\x10parameter_anchor\x18\x01 \x01(\rR\x0fparameterAnchor\x12/\n\x05value\x18\x02 \x01(\x0b2\x19.proto.Expression.LiteralR\x05valueB#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.plan_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobuf' - _globals['_PLANREL']._serialized_start = 83 - _globals['_PLANREL']._serialized_end = 174 - _globals['_PLAN']._serialized_start = 177 - _globals['_PLAN']._serialized_end = 637 - _globals['_PLANVERSION']._serialized_start = 639 - _globals['_PLANVERSION']._serialized_end = 694 - _globals['_VERSION']._serialized_start = 697 - _globals['_VERSION']._serialized_end = 866 - _globals['_DYNAMICPARAMETERBINDING']._serialized_start = 868 - _globals['_DYNAMICPARAMETERBINDING']._serialized_end = 985 \ No newline at end of file + _globals['_PLAN'].fields_by_name['extension_uris']._loaded_options = None + _globals['_PLAN'].fields_by_name['extension_uris']._serialized_options = b'\x18\x01' + _globals['_PLANREL']._serialized_start = 101 + _globals['_PLANREL']._serialized_end = 192 + _globals['_PLAN']._serialized_start = 195 + _globals['_PLAN']._serialized_end = 789 + _globals['_PLANVERSION']._serialized_start = 791 + _globals['_PLANVERSION']._serialized_end = 846 + _globals['_VERSION']._serialized_start = 849 + _globals['_VERSION']._serialized_end = 1018 + _globals['_DYNAMICPARAMETERBINDING']._serialized_start = 1020 + _globals['_DYNAMICPARAMETERBINDING']._serialized_end = 1137 \ No newline at end of file diff --git a/src/substrait/gen/proto/plan_pb2.pyi b/src/substrait/gen/proto/plan_pb2.pyi index 4ec1a66..fedd441 100644 --- a/src/substrait/gen/proto/plan_pb2.pyi +++ b/src/substrait/gen/proto/plan_pb2.pyi @@ -47,11 +47,13 @@ class Plan(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor VERSION_FIELD_NUMBER: builtins.int EXTENSION_URIS_FIELD_NUMBER: builtins.int + EXTENSION_URNS_FIELD_NUMBER: builtins.int EXTENSIONS_FIELD_NUMBER: builtins.int RELATIONS_FIELD_NUMBER: builtins.int ADVANCED_EXTENSIONS_FIELD_NUMBER: builtins.int EXPECTED_TYPE_URLS_FIELD_NUMBER: builtins.int PARAMETER_BINDINGS_FIELD_NUMBER: builtins.int + TYPE_ALIASES_FIELD_NUMBER: builtins.int @property def version(self) -> global___Version: @@ -61,7 +63,13 @@ class Plan(google.protobuf.message.Message): @property def extension_uris(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.extensions.extensions_pb2.SimpleExtensionURI]: - """a list of yaml specifications this plan may depend on""" + """a list of yaml specifications this plan may depend on + this is now deprecated and extension_urns should be used instead. + """ + + @property + def extension_urns(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.extensions.extensions_pb2.SimpleExtensionURN]: + """a list of extension URNs this plan may depend on""" @property def extensions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.extensions.extensions_pb2.SimpleExtensionDeclaration]: @@ -90,13 +98,24 @@ class Plan(google.protobuf.message.Message): Each binding maps a parameter_anchor to its corresponding runtime value. """ - def __init__(self, *, version: global___Version | None=..., extension_uris: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionURI] | None=..., extensions: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionDeclaration] | None=..., relations: collections.abc.Iterable[global___PlanRel] | None=..., advanced_extensions: proto.extensions.extensions_pb2.AdvancedExtension | None=..., expected_type_urls: collections.abc.Iterable[builtins.str] | None=..., parameter_bindings: collections.abc.Iterable[global___DynamicParameterBinding] | None=...) -> None: + @property + def type_aliases(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.type_pb2.TypeAlias]: + """An optional list of type aliases. Types can be specified here once, and + then referenced within the plan using the TypeAliasReference type. This + feature is intended to assist with the usability of parameterized types, + which require that all parameters be specified when they are declared. + This can bloat plans with redundant redeclarations, especially if the + parameterized types being declared have many parameters (e.g., struct with + many fields, nested parameterized types, string as a type parameter). + """ + + def __init__(self, *, version: global___Version | None=..., extension_uris: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionURI] | None=..., extension_urns: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionURN] | None=..., extensions: collections.abc.Iterable[proto.extensions.extensions_pb2.SimpleExtensionDeclaration] | None=..., relations: collections.abc.Iterable[global___PlanRel] | None=..., advanced_extensions: proto.extensions.extensions_pb2.AdvancedExtension | None=..., expected_type_urls: collections.abc.Iterable[builtins.str] | None=..., parameter_bindings: collections.abc.Iterable[global___DynamicParameterBinding] | None=..., type_aliases: collections.abc.Iterable[proto.type_pb2.TypeAlias] | None=...) -> None: ... def HasField(self, field_name: typing.Literal['advanced_extensions', b'advanced_extensions', 'version', b'version']) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal['advanced_extensions', b'advanced_extensions', 'expected_type_urls', b'expected_type_urls', 'extension_uris', b'extension_uris', 'extensions', b'extensions', 'parameter_bindings', b'parameter_bindings', 'relations', b'relations', 'version', b'version']) -> None: + def ClearField(self, field_name: typing.Literal['advanced_extensions', b'advanced_extensions', 'expected_type_urls', b'expected_type_urls', 'extension_uris', b'extension_uris', 'extension_urns', b'extension_urns', 'extensions', b'extensions', 'parameter_bindings', b'parameter_bindings', 'relations', b'relations', 'type_aliases', b'type_aliases', 'version', b'version']) -> None: ... global___Plan = Plan diff --git a/src/substrait/gen/proto/type_pb2.py b/src/substrait/gen/proto/type_pb2.py index 2c67564..018007e 100644 --- a/src/substrait/gen/proto/type_pb2.py +++ b/src/substrait/gen/proto/type_pb2.py @@ -7,7 +7,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 5, '', 'proto/type.proto') _sym_db = _symbol_database.Default() from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10proto/type.proto\x12\x05proto\x1a\x1bgoogle/protobuf/empty.proto"\xf3.\n\x04Type\x12)\n\x04bool\x18\x01 \x01(\x0b2\x13.proto.Type.BooleanH\x00R\x04bool\x12 \n\x02i8\x18\x02 \x01(\x0b2\x0e.proto.Type.I8H\x00R\x02i8\x12#\n\x03i16\x18\x03 \x01(\x0b2\x0f.proto.Type.I16H\x00R\x03i16\x12#\n\x03i32\x18\x05 \x01(\x0b2\x0f.proto.Type.I32H\x00R\x03i32\x12#\n\x03i64\x18\x07 \x01(\x0b2\x0f.proto.Type.I64H\x00R\x03i64\x12&\n\x04fp32\x18\n \x01(\x0b2\x10.proto.Type.FP32H\x00R\x04fp32\x12&\n\x04fp64\x18\x0b \x01(\x0b2\x10.proto.Type.FP64H\x00R\x04fp64\x12,\n\x06string\x18\x0c \x01(\x0b2\x12.proto.Type.StringH\x00R\x06string\x12,\n\x06binary\x18\r \x01(\x0b2\x12.proto.Type.BinaryH\x00R\x06binary\x129\n\ttimestamp\x18\x0e \x01(\x0b2\x15.proto.Type.TimestampB\x02\x18\x01H\x00R\ttimestamp\x12&\n\x04date\x18\x10 \x01(\x0b2\x10.proto.Type.DateH\x00R\x04date\x12&\n\x04time\x18\x11 \x01(\x0b2\x10.proto.Type.TimeH\x00R\x04time\x12?\n\rinterval_year\x18\x13 \x01(\x0b2\x18.proto.Type.IntervalYearH\x00R\x0cintervalYear\x12<\n\x0cinterval_day\x18\x14 \x01(\x0b2\x17.proto.Type.IntervalDayH\x00R\x0bintervalDay\x12K\n\x11interval_compound\x18# \x01(\x0b2\x1c.proto.Type.IntervalCompoundH\x00R\x10intervalCompound\x12@\n\x0ctimestamp_tz\x18\x1d \x01(\x0b2\x17.proto.Type.TimestampTZB\x02\x18\x01H\x00R\x0btimestampTz\x12&\n\x04uuid\x18 \x01(\x0b2\x10.proto.Type.UUIDH\x00R\x04uuid\x126\n\nfixed_char\x18\x15 \x01(\x0b2\x15.proto.Type.FixedCharH\x00R\tfixedChar\x12/\n\x07varchar\x18\x16 \x01(\x0b2\x13.proto.Type.VarCharH\x00R\x07varchar\x12<\n\x0cfixed_binary\x18\x17 \x01(\x0b2\x17.proto.Type.FixedBinaryH\x00R\x0bfixedBinary\x12/\n\x07decimal\x18\x18 \x01(\x0b2\x13.proto.Type.DecimalH\x00R\x07decimal\x12B\n\x0eprecision_time\x18$ \x01(\x0b2\x19.proto.Type.PrecisionTimeH\x00R\rprecisionTime\x12Q\n\x13precision_timestamp\x18! \x01(\x0b2\x1e.proto.Type.PrecisionTimestampH\x00R\x12precisionTimestamp\x12X\n\x16precision_timestamp_tz\x18" \x01(\x0b2 .proto.Type.PrecisionTimestampTZH\x00R\x14precisionTimestampTz\x12,\n\x06struct\x18\x19 \x01(\x0b2\x12.proto.Type.StructH\x00R\x06struct\x12&\n\x04list\x18\x1b \x01(\x0b2\x10.proto.Type.ListH\x00R\x04list\x12#\n\x03map\x18\x1c \x01(\x0b2\x0f.proto.Type.MapH\x00R\x03map\x12<\n\x0cuser_defined\x18\x1e \x01(\x0b2\x17.proto.Type.UserDefinedH\x00R\x0buserDefined\x12C\n\x1buser_defined_type_reference\x18\x1f \x01(\rB\x02\x18\x01H\x00R\x18userDefinedTypeReference\x1a~\n\x07Boolean\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1ay\n\x02I8\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1az\n\x03I16\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1az\n\x03I32\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1az\n\x03I64\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a{\n\x04FP32\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a{\n\x04FP64\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a}\n\x06String\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a}\n\x06Binary\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x80\x01\n\tTimestamp\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a{\n\x04Date\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a{\n\x04Time\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x82\x01\n\x0bTimestampTZ\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x83\x01\n\x0cIntervalYear\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xb3\x01\n\x0bIntervalDay\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x12!\n\tprecision\x18\x03 \x01(\x05H\x00R\tprecision\x88\x01\x01B\x0c\n\n_precision\x1a\xa5\x01\n\x10IntervalCompound\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x12\x1c\n\tprecision\x18\x03 \x01(\x05R\tprecision\x1a{\n\x04UUID\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x98\x01\n\tFixedChar\x12\x16\n\x06length\x18\x01 \x01(\x05R\x06length\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x96\x01\n\x07VarChar\x12\x16\n\x06length\x18\x01 \x01(\x05R\x06length\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x9a\x01\n\x0bFixedBinary\x12\x16\n\x06length\x18\x01 \x01(\x05R\x06length\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xb2\x01\n\x07Decimal\x12\x14\n\x05scale\x18\x01 \x01(\x05R\x05scale\x12\x1c\n\tprecision\x18\x02 \x01(\x05R\tprecision\x128\n\x18type_variation_reference\x18\x03 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x04 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xa2\x01\n\rPrecisionTime\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xa7\x01\n\x12PrecisionTimestamp\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xa9\x01\n\x14PrecisionTimestampTZ\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xa0\x01\n\x06Struct\x12!\n\x05types\x18\x01 \x03(\x0b2\x0b.proto.TypeR\x05types\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x9c\x01\n\x04List\x12\x1f\n\x04type\x18\x01 \x01(\x0b2\x0b.proto.TypeR\x04type\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xbc\x01\n\x03Map\x12\x1d\n\x03key\x18\x01 \x01(\x0b2\x0b.proto.TypeR\x03key\x12!\n\x05value\x18\x02 \x01(\x0b2\x0b.proto.TypeR\x05value\x128\n\x18type_variation_reference\x18\x03 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x04 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xe9\x01\n\x0bUserDefined\x12%\n\x0etype_reference\x18\x01 \x01(\rR\rtypeReference\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x12>\n\x0ftype_parameters\x18\x04 \x03(\x0b2\x15.proto.Type.ParameterR\x0etypeParameters\x1a\xda\x01\n\tParameter\x12,\n\x04null\x18\x01 \x01(\x0b2\x16.google.protobuf.EmptyH\x00R\x04null\x12*\n\tdata_type\x18\x02 \x01(\x0b2\x0b.proto.TypeH\x00R\x08dataType\x12\x1a\n\x07boolean\x18\x03 \x01(\x08H\x00R\x07boolean\x12\x1a\n\x07integer\x18\x04 \x01(\x03H\x00R\x07integer\x12\x14\n\x04enum\x18\x05 \x01(\tH\x00R\x04enum\x12\x18\n\x06string\x18\x06 \x01(\tH\x00R\x06stringB\x0b\n\tparameter"^\n\x0bNullability\x12\x1b\n\x17NULLABILITY_UNSPECIFIED\x10\x00\x12\x18\n\x14NULLABILITY_NULLABLE\x10\x01\x12\x18\n\x14NULLABILITY_REQUIRED\x10\x02B\x06\n\x04kind"O\n\x0bNamedStruct\x12\x14\n\x05names\x18\x01 \x03(\tR\x05names\x12*\n\x06struct\x18\x02 \x01(\x0b2\x12.proto.Type.StructR\x06structB#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10proto/type.proto\x12\x05proto\x1a\x1bgoogle/protobuf/empty.proto"\xaf0\n\x04Type\x12)\n\x04bool\x18\x01 \x01(\x0b2\x13.proto.Type.BooleanH\x00R\x04bool\x12 \n\x02i8\x18\x02 \x01(\x0b2\x0e.proto.Type.I8H\x00R\x02i8\x12#\n\x03i16\x18\x03 \x01(\x0b2\x0f.proto.Type.I16H\x00R\x03i16\x12#\n\x03i32\x18\x05 \x01(\x0b2\x0f.proto.Type.I32H\x00R\x03i32\x12#\n\x03i64\x18\x07 \x01(\x0b2\x0f.proto.Type.I64H\x00R\x03i64\x12&\n\x04fp32\x18\n \x01(\x0b2\x10.proto.Type.FP32H\x00R\x04fp32\x12&\n\x04fp64\x18\x0b \x01(\x0b2\x10.proto.Type.FP64H\x00R\x04fp64\x12,\n\x06string\x18\x0c \x01(\x0b2\x12.proto.Type.StringH\x00R\x06string\x12,\n\x06binary\x18\r \x01(\x0b2\x12.proto.Type.BinaryH\x00R\x06binary\x129\n\ttimestamp\x18\x0e \x01(\x0b2\x15.proto.Type.TimestampB\x02\x18\x01H\x00R\ttimestamp\x12&\n\x04date\x18\x10 \x01(\x0b2\x10.proto.Type.DateH\x00R\x04date\x12&\n\x04time\x18\x11 \x01(\x0b2\x10.proto.Type.TimeH\x00R\x04time\x12?\n\rinterval_year\x18\x13 \x01(\x0b2\x18.proto.Type.IntervalYearH\x00R\x0cintervalYear\x12<\n\x0cinterval_day\x18\x14 \x01(\x0b2\x17.proto.Type.IntervalDayH\x00R\x0bintervalDay\x12K\n\x11interval_compound\x18# \x01(\x0b2\x1c.proto.Type.IntervalCompoundH\x00R\x10intervalCompound\x12@\n\x0ctimestamp_tz\x18\x1d \x01(\x0b2\x17.proto.Type.TimestampTZB\x02\x18\x01H\x00R\x0btimestampTz\x12&\n\x04uuid\x18 \x01(\x0b2\x10.proto.Type.UUIDH\x00R\x04uuid\x126\n\nfixed_char\x18\x15 \x01(\x0b2\x15.proto.Type.FixedCharH\x00R\tfixedChar\x12/\n\x07varchar\x18\x16 \x01(\x0b2\x13.proto.Type.VarCharH\x00R\x07varchar\x12<\n\x0cfixed_binary\x18\x17 \x01(\x0b2\x17.proto.Type.FixedBinaryH\x00R\x0bfixedBinary\x12/\n\x07decimal\x18\x18 \x01(\x0b2\x13.proto.Type.DecimalH\x00R\x07decimal\x12B\n\x0eprecision_time\x18$ \x01(\x0b2\x19.proto.Type.PrecisionTimeH\x00R\rprecisionTime\x12Q\n\x13precision_timestamp\x18! \x01(\x0b2\x1e.proto.Type.PrecisionTimestampH\x00R\x12precisionTimestamp\x12X\n\x16precision_timestamp_tz\x18" \x01(\x0b2 .proto.Type.PrecisionTimestampTZH\x00R\x14precisionTimestampTz\x12,\n\x06struct\x18\x19 \x01(\x0b2\x12.proto.Type.StructH\x00R\x06struct\x12&\n\x04list\x18\x1b \x01(\x0b2\x10.proto.Type.ListH\x00R\x04list\x12#\n\x03map\x18\x1c \x01(\x0b2\x0f.proto.Type.MapH\x00R\x03map\x12<\n\x0cuser_defined\x18\x1e \x01(\x0b2\x17.proto.Type.UserDefinedH\x00R\x0buserDefined\x12C\n\x1buser_defined_type_reference\x18\x1f \x01(\rB\x02\x18\x01H\x00R\x18userDefinedTypeReference\x126\n\x05alias\x18% \x01(\x0b2\x1e.proto.Type.TypeAliasReferenceH\x00R\x05alias\x1a~\n\x07Boolean\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1ay\n\x02I8\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1az\n\x03I16\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1az\n\x03I32\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1az\n\x03I64\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a{\n\x04FP32\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a{\n\x04FP64\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a}\n\x06String\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a}\n\x06Binary\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x80\x01\n\tTimestamp\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a{\n\x04Date\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a{\n\x04Time\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x82\x01\n\x0bTimestampTZ\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x83\x01\n\x0cIntervalYear\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xb3\x01\n\x0bIntervalDay\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x12!\n\tprecision\x18\x03 \x01(\x05H\x00R\tprecision\x88\x01\x01B\x0c\n\n_precision\x1a\xa5\x01\n\x10IntervalCompound\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x12\x1c\n\tprecision\x18\x03 \x01(\x05R\tprecision\x1a{\n\x04UUID\x128\n\x18type_variation_reference\x18\x01 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x98\x01\n\tFixedChar\x12\x16\n\x06length\x18\x01 \x01(\x05R\x06length\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x96\x01\n\x07VarChar\x12\x16\n\x06length\x18\x01 \x01(\x05R\x06length\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x9a\x01\n\x0bFixedBinary\x12\x16\n\x06length\x18\x01 \x01(\x05R\x06length\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xb2\x01\n\x07Decimal\x12\x14\n\x05scale\x18\x01 \x01(\x05R\x05scale\x12\x1c\n\tprecision\x18\x02 \x01(\x05R\tprecision\x128\n\x18type_variation_reference\x18\x03 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x04 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xa2\x01\n\rPrecisionTime\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xa7\x01\n\x12PrecisionTimestamp\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xa9\x01\n\x14PrecisionTimestampTZ\x12\x1c\n\tprecision\x18\x01 \x01(\x05R\tprecision\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xa0\x01\n\x06Struct\x12!\n\x05types\x18\x01 \x03(\x0b2\x0b.proto.TypeR\x05types\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\x9c\x01\n\x04List\x12\x1f\n\x04type\x18\x01 \x01(\x0b2\x0b.proto.TypeR\x04type\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xbc\x01\n\x03Map\x12\x1d\n\x03key\x18\x01 \x01(\x0b2\x0b.proto.TypeR\x03key\x12!\n\x05value\x18\x02 \x01(\x0b2\x0b.proto.TypeR\x05value\x128\n\x18type_variation_reference\x18\x03 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x04 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x1a\xe9\x01\n\x0bUserDefined\x12%\n\x0etype_reference\x18\x01 \x01(\rR\rtypeReference\x128\n\x18type_variation_reference\x18\x02 \x01(\rR\x16typeVariationReference\x129\n\x0bnullability\x18\x03 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability\x12>\n\x0ftype_parameters\x18\x04 \x03(\x0b2\x15.proto.Type.ParameterR\x0etypeParameters\x1a\xda\x01\n\tParameter\x12,\n\x04null\x18\x01 \x01(\x0b2\x16.google.protobuf.EmptyH\x00R\x04null\x12*\n\tdata_type\x18\x02 \x01(\x0b2\x0b.proto.TypeH\x00R\x08dataType\x12\x1a\n\x07boolean\x18\x03 \x01(\x08H\x00R\x07boolean\x12\x1a\n\x07integer\x18\x04 \x01(\x03H\x00R\x07integer\x12\x14\n\x04enum\x18\x05 \x01(\tH\x00R\x04enum\x12\x18\n\x06string\x18\x06 \x01(\tH\x00R\x06stringB\x0b\n\tparameter\x1a\x81\x01\n\x12TypeAliasReference\x120\n\x14type_alias_reference\x18\x01 \x01(\rR\x12typeAliasReference\x129\n\x0bnullability\x18\x02 \x01(\x0e2\x17.proto.Type.NullabilityR\x0bnullability"^\n\x0bNullability\x12\x1b\n\x17NULLABILITY_UNSPECIFIED\x10\x00\x12\x18\n\x14NULLABILITY_NULLABLE\x10\x01\x12\x18\n\x14NULLABILITY_REQUIRED\x10\x02B\x06\n\x04kind"X\n\tTypeAlias\x12*\n\x11type_alias_anchor\x18\x01 \x01(\rR\x0ftypeAliasAnchor\x12\x1f\n\x04type\x18\x02 \x01(\x0b2\x0b.proto.TypeR\x04type"O\n\x0bNamedStruct\x12\x14\n\x05names\x18\x01 \x03(\tR\x05names\x12*\n\x06struct\x18\x02 \x01(\x0b2\x12.proto.Type.StructR\x06structB#\n\x0eio.proto.protoP\x01\xaa\x02\x0eProto.Protobufb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.type_pb2', _globals) @@ -21,66 +21,70 @@ _globals['_TYPE'].fields_by_name['user_defined_type_reference']._loaded_options = None _globals['_TYPE'].fields_by_name['user_defined_type_reference']._serialized_options = b'\x18\x01' _globals['_TYPE']._serialized_start = 57 - _globals['_TYPE']._serialized_end = 6060 - _globals['_TYPE_BOOLEAN']._serialized_start = 1585 - _globals['_TYPE_BOOLEAN']._serialized_end = 1711 - _globals['_TYPE_I8']._serialized_start = 1713 - _globals['_TYPE_I8']._serialized_end = 1834 - _globals['_TYPE_I16']._serialized_start = 1836 - _globals['_TYPE_I16']._serialized_end = 1958 - _globals['_TYPE_I32']._serialized_start = 1960 - _globals['_TYPE_I32']._serialized_end = 2082 - _globals['_TYPE_I64']._serialized_start = 2084 - _globals['_TYPE_I64']._serialized_end = 2206 - _globals['_TYPE_FP32']._serialized_start = 2208 - _globals['_TYPE_FP32']._serialized_end = 2331 - _globals['_TYPE_FP64']._serialized_start = 2333 - _globals['_TYPE_FP64']._serialized_end = 2456 - _globals['_TYPE_STRING']._serialized_start = 2458 - _globals['_TYPE_STRING']._serialized_end = 2583 - _globals['_TYPE_BINARY']._serialized_start = 2585 - _globals['_TYPE_BINARY']._serialized_end = 2710 - _globals['_TYPE_TIMESTAMP']._serialized_start = 2713 - _globals['_TYPE_TIMESTAMP']._serialized_end = 2841 - _globals['_TYPE_DATE']._serialized_start = 2843 - _globals['_TYPE_DATE']._serialized_end = 2966 - _globals['_TYPE_TIME']._serialized_start = 2968 - _globals['_TYPE_TIME']._serialized_end = 3091 - _globals['_TYPE_TIMESTAMPTZ']._serialized_start = 3094 - _globals['_TYPE_TIMESTAMPTZ']._serialized_end = 3224 - _globals['_TYPE_INTERVALYEAR']._serialized_start = 3227 - _globals['_TYPE_INTERVALYEAR']._serialized_end = 3358 - _globals['_TYPE_INTERVALDAY']._serialized_start = 3361 - _globals['_TYPE_INTERVALDAY']._serialized_end = 3540 - _globals['_TYPE_INTERVALCOMPOUND']._serialized_start = 3543 - _globals['_TYPE_INTERVALCOMPOUND']._serialized_end = 3708 - _globals['_TYPE_UUID']._serialized_start = 3710 - _globals['_TYPE_UUID']._serialized_end = 3833 - _globals['_TYPE_FIXEDCHAR']._serialized_start = 3836 - _globals['_TYPE_FIXEDCHAR']._serialized_end = 3988 - _globals['_TYPE_VARCHAR']._serialized_start = 3991 - _globals['_TYPE_VARCHAR']._serialized_end = 4141 - _globals['_TYPE_FIXEDBINARY']._serialized_start = 4144 - _globals['_TYPE_FIXEDBINARY']._serialized_end = 4298 - _globals['_TYPE_DECIMAL']._serialized_start = 4301 - _globals['_TYPE_DECIMAL']._serialized_end = 4479 - _globals['_TYPE_PRECISIONTIME']._serialized_start = 4482 - _globals['_TYPE_PRECISIONTIME']._serialized_end = 4644 - _globals['_TYPE_PRECISIONTIMESTAMP']._serialized_start = 4647 - _globals['_TYPE_PRECISIONTIMESTAMP']._serialized_end = 4814 - _globals['_TYPE_PRECISIONTIMESTAMPTZ']._serialized_start = 4817 - _globals['_TYPE_PRECISIONTIMESTAMPTZ']._serialized_end = 4986 - _globals['_TYPE_STRUCT']._serialized_start = 4989 - _globals['_TYPE_STRUCT']._serialized_end = 5149 - _globals['_TYPE_LIST']._serialized_start = 5152 - _globals['_TYPE_LIST']._serialized_end = 5308 - _globals['_TYPE_MAP']._serialized_start = 5311 - _globals['_TYPE_MAP']._serialized_end = 5499 - _globals['_TYPE_USERDEFINED']._serialized_start = 5502 - _globals['_TYPE_USERDEFINED']._serialized_end = 5735 - _globals['_TYPE_PARAMETER']._serialized_start = 5738 - _globals['_TYPE_PARAMETER']._serialized_end = 5956 - _globals['_TYPE_NULLABILITY']._serialized_start = 5958 - _globals['_TYPE_NULLABILITY']._serialized_end = 6052 - _globals['_NAMEDSTRUCT']._serialized_start = 6062 - _globals['_NAMEDSTRUCT']._serialized_end = 6141 \ No newline at end of file + _globals['_TYPE']._serialized_end = 6248 + _globals['_TYPE_BOOLEAN']._serialized_start = 1641 + _globals['_TYPE_BOOLEAN']._serialized_end = 1767 + _globals['_TYPE_I8']._serialized_start = 1769 + _globals['_TYPE_I8']._serialized_end = 1890 + _globals['_TYPE_I16']._serialized_start = 1892 + _globals['_TYPE_I16']._serialized_end = 2014 + _globals['_TYPE_I32']._serialized_start = 2016 + _globals['_TYPE_I32']._serialized_end = 2138 + _globals['_TYPE_I64']._serialized_start = 2140 + _globals['_TYPE_I64']._serialized_end = 2262 + _globals['_TYPE_FP32']._serialized_start = 2264 + _globals['_TYPE_FP32']._serialized_end = 2387 + _globals['_TYPE_FP64']._serialized_start = 2389 + _globals['_TYPE_FP64']._serialized_end = 2512 + _globals['_TYPE_STRING']._serialized_start = 2514 + _globals['_TYPE_STRING']._serialized_end = 2639 + _globals['_TYPE_BINARY']._serialized_start = 2641 + _globals['_TYPE_BINARY']._serialized_end = 2766 + _globals['_TYPE_TIMESTAMP']._serialized_start = 2769 + _globals['_TYPE_TIMESTAMP']._serialized_end = 2897 + _globals['_TYPE_DATE']._serialized_start = 2899 + _globals['_TYPE_DATE']._serialized_end = 3022 + _globals['_TYPE_TIME']._serialized_start = 3024 + _globals['_TYPE_TIME']._serialized_end = 3147 + _globals['_TYPE_TIMESTAMPTZ']._serialized_start = 3150 + _globals['_TYPE_TIMESTAMPTZ']._serialized_end = 3280 + _globals['_TYPE_INTERVALYEAR']._serialized_start = 3283 + _globals['_TYPE_INTERVALYEAR']._serialized_end = 3414 + _globals['_TYPE_INTERVALDAY']._serialized_start = 3417 + _globals['_TYPE_INTERVALDAY']._serialized_end = 3596 + _globals['_TYPE_INTERVALCOMPOUND']._serialized_start = 3599 + _globals['_TYPE_INTERVALCOMPOUND']._serialized_end = 3764 + _globals['_TYPE_UUID']._serialized_start = 3766 + _globals['_TYPE_UUID']._serialized_end = 3889 + _globals['_TYPE_FIXEDCHAR']._serialized_start = 3892 + _globals['_TYPE_FIXEDCHAR']._serialized_end = 4044 + _globals['_TYPE_VARCHAR']._serialized_start = 4047 + _globals['_TYPE_VARCHAR']._serialized_end = 4197 + _globals['_TYPE_FIXEDBINARY']._serialized_start = 4200 + _globals['_TYPE_FIXEDBINARY']._serialized_end = 4354 + _globals['_TYPE_DECIMAL']._serialized_start = 4357 + _globals['_TYPE_DECIMAL']._serialized_end = 4535 + _globals['_TYPE_PRECISIONTIME']._serialized_start = 4538 + _globals['_TYPE_PRECISIONTIME']._serialized_end = 4700 + _globals['_TYPE_PRECISIONTIMESTAMP']._serialized_start = 4703 + _globals['_TYPE_PRECISIONTIMESTAMP']._serialized_end = 4870 + _globals['_TYPE_PRECISIONTIMESTAMPTZ']._serialized_start = 4873 + _globals['_TYPE_PRECISIONTIMESTAMPTZ']._serialized_end = 5042 + _globals['_TYPE_STRUCT']._serialized_start = 5045 + _globals['_TYPE_STRUCT']._serialized_end = 5205 + _globals['_TYPE_LIST']._serialized_start = 5208 + _globals['_TYPE_LIST']._serialized_end = 5364 + _globals['_TYPE_MAP']._serialized_start = 5367 + _globals['_TYPE_MAP']._serialized_end = 5555 + _globals['_TYPE_USERDEFINED']._serialized_start = 5558 + _globals['_TYPE_USERDEFINED']._serialized_end = 5791 + _globals['_TYPE_PARAMETER']._serialized_start = 5794 + _globals['_TYPE_PARAMETER']._serialized_end = 6012 + _globals['_TYPE_TYPEALIASREFERENCE']._serialized_start = 6015 + _globals['_TYPE_TYPEALIASREFERENCE']._serialized_end = 6144 + _globals['_TYPE_NULLABILITY']._serialized_start = 6146 + _globals['_TYPE_NULLABILITY']._serialized_end = 6240 + _globals['_TYPEALIAS']._serialized_start = 6250 + _globals['_TYPEALIAS']._serialized_end = 6338 + _globals['_NAMEDSTRUCT']._serialized_start = 6340 + _globals['_NAMEDSTRUCT']._serialized_end = 6419 \ No newline at end of file diff --git a/src/substrait/gen/proto/type_pb2.pyi b/src/substrait/gen/proto/type_pb2.pyi index 76e2ec6..4e0b797 100644 --- a/src/substrait/gen/proto/type_pb2.pyi +++ b/src/substrait/gen/proto/type_pb2.pyi @@ -533,6 +533,21 @@ class Type(google.protobuf.message.Message): def WhichOneof(self, oneof_group: typing.Literal['parameter', b'parameter']) -> typing.Literal['null', 'data_type', 'boolean', 'integer', 'enum', 'string'] | None: ... + + @typing.final + class TypeAliasReference(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + TYPE_ALIAS_REFERENCE_FIELD_NUMBER: builtins.int + NULLABILITY_FIELD_NUMBER: builtins.int + type_alias_reference: builtins.int + nullability: global___Type.Nullability.ValueType + 'Nullability of the referenced type alias. Must be specified.' + + def __init__(self, *, type_alias_reference: builtins.int=..., nullability: global___Type.Nullability.ValueType=...) -> None: + ... + + def ClearField(self, field_name: typing.Literal['nullability', b'nullability', 'type_alias_reference', b'type_alias_reference']) -> None: + ... BOOL_FIELD_NUMBER: builtins.int I8_FIELD_NUMBER: builtins.int I16_FIELD_NUMBER: builtins.int @@ -562,6 +577,7 @@ class Type(google.protobuf.message.Message): MAP_FIELD_NUMBER: builtins.int USER_DEFINED_FIELD_NUMBER: builtins.int USER_DEFINED_TYPE_REFERENCE_FIELD_NUMBER: builtins.int + ALIAS_FIELD_NUMBER: builtins.int user_defined_type_reference: builtins.int 'Deprecated in favor of user_defined, which allows nullability and\n variations to be specified. If user_defined_type_reference is\n encountered, treat it as being non-nullable and having the default\n variation.\n ' @@ -677,19 +693,52 @@ class Type(google.protobuf.message.Message): def user_defined(self) -> global___Type.UserDefined: ... - def __init__(self, *, bool: global___Type.Boolean | None=..., i8: global___Type.I8 | None=..., i16: global___Type.I16 | None=..., i32: global___Type.I32 | None=..., i64: global___Type.I64 | None=..., fp32: global___Type.FP32 | None=..., fp64: global___Type.FP64 | None=..., string: global___Type.String | None=..., binary: global___Type.Binary | None=..., timestamp: global___Type.Timestamp | None=..., date: global___Type.Date | None=..., time: global___Type.Time | None=..., interval_year: global___Type.IntervalYear | None=..., interval_day: global___Type.IntervalDay | None=..., interval_compound: global___Type.IntervalCompound | None=..., timestamp_tz: global___Type.TimestampTZ | None=..., uuid: global___Type.UUID | None=..., fixed_char: global___Type.FixedChar | None=..., varchar: global___Type.VarChar | None=..., fixed_binary: global___Type.FixedBinary | None=..., decimal: global___Type.Decimal | None=..., precision_time: global___Type.PrecisionTime | None=..., precision_timestamp: global___Type.PrecisionTimestamp | None=..., precision_timestamp_tz: global___Type.PrecisionTimestampTZ | None=..., struct: global___Type.Struct | None=..., list: global___Type.List | None=..., map: global___Type.Map | None=..., user_defined: global___Type.UserDefined | None=..., user_defined_type_reference: builtins.int=...) -> None: + @property + def alias(self) -> global___Type.TypeAliasReference: + """Reference an aliased type in `Plan.type_aliases`.""" + + def __init__(self, *, bool: global___Type.Boolean | None=..., i8: global___Type.I8 | None=..., i16: global___Type.I16 | None=..., i32: global___Type.I32 | None=..., i64: global___Type.I64 | None=..., fp32: global___Type.FP32 | None=..., fp64: global___Type.FP64 | None=..., string: global___Type.String | None=..., binary: global___Type.Binary | None=..., timestamp: global___Type.Timestamp | None=..., date: global___Type.Date | None=..., time: global___Type.Time | None=..., interval_year: global___Type.IntervalYear | None=..., interval_day: global___Type.IntervalDay | None=..., interval_compound: global___Type.IntervalCompound | None=..., timestamp_tz: global___Type.TimestampTZ | None=..., uuid: global___Type.UUID | None=..., fixed_char: global___Type.FixedChar | None=..., varchar: global___Type.VarChar | None=..., fixed_binary: global___Type.FixedBinary | None=..., decimal: global___Type.Decimal | None=..., precision_time: global___Type.PrecisionTime | None=..., precision_timestamp: global___Type.PrecisionTimestamp | None=..., precision_timestamp_tz: global___Type.PrecisionTimestampTZ | None=..., struct: global___Type.Struct | None=..., list: global___Type.List | None=..., map: global___Type.Map | None=..., user_defined: global___Type.UserDefined | None=..., user_defined_type_reference: builtins.int=..., alias: global___Type.TypeAliasReference | None=...) -> None: ... - def HasField(self, field_name: typing.Literal['binary', b'binary', 'bool', b'bool', 'date', b'date', 'decimal', b'decimal', 'fixed_binary', b'fixed_binary', 'fixed_char', b'fixed_char', 'fp32', b'fp32', 'fp64', b'fp64', 'i16', b'i16', 'i32', b'i32', 'i64', b'i64', 'i8', b'i8', 'interval_compound', b'interval_compound', 'interval_day', b'interval_day', 'interval_year', b'interval_year', 'kind', b'kind', 'list', b'list', 'map', b'map', 'precision_time', b'precision_time', 'precision_timestamp', b'precision_timestamp', 'precision_timestamp_tz', b'precision_timestamp_tz', 'string', b'string', 'struct', b'struct', 'time', b'time', 'timestamp', b'timestamp', 'timestamp_tz', b'timestamp_tz', 'user_defined', b'user_defined', 'user_defined_type_reference', b'user_defined_type_reference', 'uuid', b'uuid', 'varchar', b'varchar']) -> builtins.bool: + def HasField(self, field_name: typing.Literal['alias', b'alias', 'binary', b'binary', 'bool', b'bool', 'date', b'date', 'decimal', b'decimal', 'fixed_binary', b'fixed_binary', 'fixed_char', b'fixed_char', 'fp32', b'fp32', 'fp64', b'fp64', 'i16', b'i16', 'i32', b'i32', 'i64', b'i64', 'i8', b'i8', 'interval_compound', b'interval_compound', 'interval_day', b'interval_day', 'interval_year', b'interval_year', 'kind', b'kind', 'list', b'list', 'map', b'map', 'precision_time', b'precision_time', 'precision_timestamp', b'precision_timestamp', 'precision_timestamp_tz', b'precision_timestamp_tz', 'string', b'string', 'struct', b'struct', 'time', b'time', 'timestamp', b'timestamp', 'timestamp_tz', b'timestamp_tz', 'user_defined', b'user_defined', 'user_defined_type_reference', b'user_defined_type_reference', 'uuid', b'uuid', 'varchar', b'varchar']) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal['binary', b'binary', 'bool', b'bool', 'date', b'date', 'decimal', b'decimal', 'fixed_binary', b'fixed_binary', 'fixed_char', b'fixed_char', 'fp32', b'fp32', 'fp64', b'fp64', 'i16', b'i16', 'i32', b'i32', 'i64', b'i64', 'i8', b'i8', 'interval_compound', b'interval_compound', 'interval_day', b'interval_day', 'interval_year', b'interval_year', 'kind', b'kind', 'list', b'list', 'map', b'map', 'precision_time', b'precision_time', 'precision_timestamp', b'precision_timestamp', 'precision_timestamp_tz', b'precision_timestamp_tz', 'string', b'string', 'struct', b'struct', 'time', b'time', 'timestamp', b'timestamp', 'timestamp_tz', b'timestamp_tz', 'user_defined', b'user_defined', 'user_defined_type_reference', b'user_defined_type_reference', 'uuid', b'uuid', 'varchar', b'varchar']) -> None: + def ClearField(self, field_name: typing.Literal['alias', b'alias', 'binary', b'binary', 'bool', b'bool', 'date', b'date', 'decimal', b'decimal', 'fixed_binary', b'fixed_binary', 'fixed_char', b'fixed_char', 'fp32', b'fp32', 'fp64', b'fp64', 'i16', b'i16', 'i32', b'i32', 'i64', b'i64', 'i8', b'i8', 'interval_compound', b'interval_compound', 'interval_day', b'interval_day', 'interval_year', b'interval_year', 'kind', b'kind', 'list', b'list', 'map', b'map', 'precision_time', b'precision_time', 'precision_timestamp', b'precision_timestamp', 'precision_timestamp_tz', b'precision_timestamp_tz', 'string', b'string', 'struct', b'struct', 'time', b'time', 'timestamp', b'timestamp', 'timestamp_tz', b'timestamp_tz', 'user_defined', b'user_defined', 'user_defined_type_reference', b'user_defined_type_reference', 'uuid', b'uuid', 'varchar', b'varchar']) -> None: ... - def WhichOneof(self, oneof_group: typing.Literal['kind', b'kind']) -> typing.Literal['bool', 'i8', 'i16', 'i32', 'i64', 'fp32', 'fp64', 'string', 'binary', 'timestamp', 'date', 'time', 'interval_year', 'interval_day', 'interval_compound', 'timestamp_tz', 'uuid', 'fixed_char', 'varchar', 'fixed_binary', 'decimal', 'precision_time', 'precision_timestamp', 'precision_timestamp_tz', 'struct', 'list', 'map', 'user_defined', 'user_defined_type_reference'] | None: + def WhichOneof(self, oneof_group: typing.Literal['kind', b'kind']) -> typing.Literal['bool', 'i8', 'i16', 'i32', 'i64', 'fp32', 'fp64', 'string', 'binary', 'timestamp', 'date', 'time', 'interval_year', 'interval_day', 'interval_compound', 'timestamp_tz', 'uuid', 'fixed_char', 'varchar', 'fixed_binary', 'decimal', 'precision_time', 'precision_timestamp', 'precision_timestamp_tz', 'struct', 'list', 'map', 'user_defined', 'user_defined_type_reference', 'alias'] | None: ... global___Type = Type +@typing.final +class TypeAlias(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + TYPE_ALIAS_ANCHOR_FIELD_NUMBER: builtins.int + TYPE_FIELD_NUMBER: builtins.int + type_alias_anchor: builtins.int + 'A surrogate key used in the context of a single plan to reference a\n specific type alias.\n ' + + @property + def type(self) -> global___Type: + """A concrete type to be aliased. + + * All type parameters must be specified. + * Cannot directly be another alias. + * Type parameters can reference other aliased types as long as no circular dependencies are introduced. + * Nullability of aliased type is **ignored**. Nullability must be specified when the aliased type is referenced. + * Type variation may be specified in the aliased type. + """ + + def __init__(self, *, type_alias_anchor: builtins.int=..., type: global___Type | None=...) -> None: + ... + + def HasField(self, field_name: typing.Literal['type', b'type']) -> builtins.bool: + ... + + def ClearField(self, field_name: typing.Literal['type', b'type', 'type_alias_anchor', b'type_alias_anchor']) -> None: + ... +global___TypeAlias = TypeAlias + @typing.final class NamedStruct(google.protobuf.message.Message): """A message for modeling name/type pairs. diff --git a/src/substrait/simple_extension_utils.py b/src/substrait/simple_extension_utils.py index 0e5acef..27b300e 100644 --- a/src/substrait/simple_extension_utils.py +++ b/src/substrait/simple_extension_utils.py @@ -144,6 +144,7 @@ def build_type_variation(d: dict) -> se.TypeVariation: def build_simple_extensions(d: dict) -> se.SimpleExtensions: return se.SimpleExtensions( + urn=d["urn"], dependencies=d.get("dependencies"), types=[build_type_model(t) for t in d["types"]] if "types" in d else None, type_variations=[build_type_variation(t) for t in d["type_variations"]] diff --git a/src/substrait/sql/sql_to_substrait.py b/src/substrait/sql/sql_to_substrait.py index 40c14ef..1b2b6c2 100644 --- a/src/substrait/sql/sql_to_substrait.py +++ b/src/substrait/sql/sql_to_substrait.py @@ -28,18 +28,20 @@ SchemaResolver = Callable[[str], stt.NamedStruct] function_mapping = { - "Plus": ("functions_arithmetic.yaml", "add"), - "Minus": ("functions_arithmetic.yaml", "subtract"), - "Gt": ("functions_comparison.yaml", "gt"), - "GtEq": ("functions_comparison.yaml", "gte"), - "Lt": ("functions_comparison.yaml", "lt"), - "Eq": ("functions_comparison.yaml", "equal"), + "Plus": ("extension:io.substrait:functions_arithmetic", "add"), + "Minus": ("extension:io.substrait:functions_arithmetic", "subtract"), + "Gt": ("extension:io.substrait:functions_comparison", "gt"), + "GtEq": ("extension:io.substrait:functions_comparison", "gte"), + "Lt": ("extension:io.substrait:functions_comparison", "lt"), + "Eq": ("extension:io.substrait:functions_comparison", "equal"), } -aggregate_function_mapping = {"SUM": ("functions_arithmetic.yaml", "sum")} +aggregate_function_mapping = { + "SUM": ("extension:io.substrait:functions_arithmetic", "sum") +} window_function_mapping = { - "row_number": ("functions_arithmetic.yaml", "row_number"), + "row_number": ("extension:io.substrait:functions_arithmetic", "row_number"), } diff --git a/src/substrait/utils/__init__.py b/src/substrait/utils/__init__.py index 0a8e5b4..0a4793b 100644 --- a/src/substrait/utils/__init__.py +++ b/src/substrait/utils/__init__.py @@ -20,6 +20,23 @@ def type_num_names(typ: stp.Type): return 1 +def merge_extension_urns(*extension_urns: Iterable[ste.SimpleExtensionURN]): + """Merges multiple sets of SimpleExtensionURN objects into a single set. + The order of extensions is kept intact, while duplicates are discarded. + Assumes that there are no collisions (different extensions having identical anchors). + """ + seen_urns = set() + ret = [] + + for urns in extension_urns: + for urn in urns: + if urn.urn not in seen_urns: + seen_urns.add(urn.urn) + ret.append(urn) + + return ret + + def merge_extension_uris(*extension_uris: Iterable[ste.SimpleExtensionURI]): """Merges multiple sets of SimpleExtensionURI objects into a single set. The order of extensions is kept intact, while duplicates are discarded. @@ -43,6 +60,9 @@ def merge_extension_declarations( """Merges multiple sets of SimpleExtensionDeclaration objects into a single set. The order of extension declarations is kept intact, while duplicates are discarded. Assumes that there are no collisions (different extension declarations having identical anchors). + + During the URI/URN migration, declarations may have either or both references set. + We deduplicate based on both references and the name without trying to resolve between them. """ seen_extension_functions = set() @@ -51,9 +71,14 @@ def merge_extension_declarations( for declarations in extension_declarations: for declaration in declarations: if declaration.WhichOneof("mapping_type") == "extension_function": + ext_func = declaration.extension_function + + # Use both URI and URN references as-is in the identifier + # Don't try to resolve or pick between them - just treat them as distinct types ident = ( - declaration.extension_function.extension_uri_reference, - declaration.extension_function.name, + ext_func.extension_urn_reference, + ext_func.extension_uri_reference, + ext_func.name, ) if ident not in seen_extension_functions: seen_extension_functions.add(ident) diff --git a/src/substrait/utils/display.py b/src/substrait/utils/display.py index 0b5d3c1..2148571 100644 --- a/src/substrait/utils/display.py +++ b/src/substrait/utils/display.py @@ -721,8 +721,9 @@ def _stream_literal_value( f"{indent}{self._color('fp64', Colors.BLUE)}: {self._color(literal.fp64, Colors.GREEN)}\n" ) elif literal.HasField("string"): + string_value = f'"{literal.string}"' stream.write( - f"{indent}{self._color('string', Colors.BLUE)}: {self._color(f'"{literal.string}"', Colors.GREEN)}\n" + f"{indent}{self._color('string', Colors.BLUE)}: {self._color(string_value, Colors.GREEN)}\n" ) elif literal.HasField("date"): stream.write( @@ -782,8 +783,9 @@ def _stream_struct_literal( f"{self._get_indent_with_arrow(depth + 2)}{self._color('i32', Colors.BLUE)}: {self._color(field.i32, Colors.GREEN)}\n" ) elif field.HasField("string"): + field_string_value = f'"{field.string}"' stream.write( - f"{self._get_indent_with_arrow(depth + 2)}{self._color('string', Colors.BLUE)}: {self._color(f'"{field.string}"', Colors.GREEN)}\n" + f"{self._get_indent_with_arrow(depth + 2)}{self._color('string', Colors.BLUE)}: {self._color(field_string_value, Colors.GREEN)}\n" ) elif field.HasField("boolean"): stream.write( diff --git a/tests/builders/extended_expression/test_aggregate_function.py b/tests/builders/extended_expression/test_aggregate_function.py index 3211c0c..cbbe2ea 100644 --- a/tests/builders/extended_expression/test_aggregate_function.py +++ b/tests/builders/extended_expression/test_aggregate_function.py @@ -22,6 +22,7 @@ content = """%YAML 1.2 --- +urn: extension:test:urn aggregate_functions: - name: "count" description: Count a set of values @@ -37,12 +38,14 @@ registry = ExtensionRegistry(load_default_extensions=False) -registry.register_extension_dict(yaml.safe_load(content), uri="test_uri") +registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/test.yaml" +) def test_aggregate_count(): e = aggregate_function( - "test_uri", + "extension:test:urn", "count", expressions=[ literal( @@ -56,11 +59,21 @@ def test_aggregate_count(): )(named_struct, registry) expected = stee.ExtendedExpression( - extension_uris=[ste.SimpleExtensionURI(extension_uri_anchor=1, uri="test_uri")], + extension_urns=[ + ste.SimpleExtensionURN(extension_urn_anchor=1, urn="extension:test:urn") + ], + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/test.yaml" + ) + ], extensions=[ ste.SimpleExtensionDeclaration( extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( - extension_uri_reference=1, function_anchor=1, name="count:any" + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=1, + name="count:any", ) ) ], diff --git a/tests/builders/extended_expression/test_cast.py b/tests/builders/extended_expression/test_cast.py index 30defe5..704f80d 100644 --- a/tests/builders/extended_expression/test_cast.py +++ b/tests/builders/extended_expression/test_cast.py @@ -44,3 +44,100 @@ def test_cast(): ) assert e == expected + + +def test_cast_with_extension(): + import yaml + import substrait.gen.proto.extensions.extensions_pb2 as ste + from substrait.builders.extended_expression import scalar_function + + registry_with_ext = ExtensionRegistry(load_default_extensions=False) + content = """%YAML 1.2 +--- +urn: extension:test:functions +scalar_functions: + - name: "add" + description: "" + impls: + - args: + - value: i8 + - value: i8 + return: i8 +""" + registry_with_ext.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/functions.yaml" + ) + + actual = cast( + input=scalar_function( + "extension:test:functions", + "add", + expressions=[literal(1, i8()), literal(2, i8())], + ), + type=i16(), + )(named_struct, registry_with_ext) + + expected = stee.ExtendedExpression( + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/functions.yaml" + ) + ], + extension_urns=[ + ste.SimpleExtensionURN( + extension_urn_anchor=1, urn="extension:test:functions" + ) + ], + extensions=[ + ste.SimpleExtensionDeclaration( + extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( + extension_uri_reference=1, + extension_urn_reference=1, + function_anchor=1, + name="add:i8_i8", + ) + ) + ], + referred_expr=[ + stee.ExpressionReference( + expression=stalg.Expression( + cast=stalg.Expression.Cast( + type=stt.Type( + i16=stt.Type.I16(nullability=stt.Type.NULLABILITY_NULLABLE) + ), + input=stalg.Expression( + scalar_function=stalg.Expression.ScalarFunction( + function_reference=1, + output_type=stt.Type( + i8=stt.Type.I8( + nullability=stt.Type.NULLABILITY_NULLABLE + ) + ), + arguments=[ + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal( + i8=1, nullable=True + ) + ) + ), + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal( + i8=2, nullable=True + ) + ) + ), + ], + ) + ), + failure_behavior=stalg.Expression.Cast.FAILURE_BEHAVIOR_RETURN_NULL, + ) + ), + output_names=["cast"], + ) + ], + base_schema=named_struct, + ) + + assert actual == expected diff --git a/tests/builders/extended_expression/test_if_then.py b/tests/builders/extended_expression/test_if_then.py index 8392b3a..81d27d6 100644 --- a/tests/builders/extended_expression/test_if_then.py +++ b/tests/builders/extended_expression/test_if_then.py @@ -1,7 +1,14 @@ import substrait.gen.proto.algebra_pb2 as stalg import substrait.gen.proto.type_pb2 as stt import substrait.gen.proto.extended_expression_pb2 as stee -from substrait.builders.extended_expression import if_then, literal +import substrait.gen.proto.extensions.extensions_pb2 as ste +from substrait.builders.extended_expression import ( + if_then, + literal, + scalar_function, + column, +) +from substrait.extension_registry import ExtensionRegistry struct = stt.Type.Struct( @@ -75,3 +82,148 @@ def test_if_else(): ) assert actual == expected + + +def test_if_then_with_extension(): + import yaml + + registry = ExtensionRegistry(load_default_extensions=False) + content = """%YAML 1.2 +--- +urn: extension:io.substrait:functions_comparison +scalar_functions: + - name: "gt" + description: "" + impls: + - args: + - value: fp32 + - value: fp32 + return: boolean +""" + registry.register_extension_dict( + yaml.safe_load(content), + uri="https://github.com/substrait-io/substrait/blob/main/extensions/functions_comparison.yaml", + ) + + # Create if_then: if order_total > 100 then "expensive" else "cheap" + actual = if_then( + ifs=[ + ( + scalar_function( + "extension:io.substrait:functions_comparison", + "gt", + expressions=[ + column("order_total"), + literal( + 100.0, + type=stt.Type( + fp32=stt.Type.FP32( + nullability=stt.Type.NULLABILITY_REQUIRED + ) + ), + ), + ], + ), + literal( + "expensive", + type=stt.Type( + string=stt.Type.String( + nullability=stt.Type.NULLABILITY_REQUIRED + ) + ), + ), + ) + ], + _else=literal( + "cheap", + type=stt.Type( + string=stt.Type.String(nullability=stt.Type.NULLABILITY_REQUIRED) + ), + ), + )(named_struct, registry) + + expected = stee.ExtendedExpression( + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, + uri="https://github.com/substrait-io/substrait/blob/main/extensions/functions_comparison.yaml", + ) + ], + extension_urns=[ + ste.SimpleExtensionURN( + extension_urn_anchor=1, + urn="extension:io.substrait:functions_comparison", + ) + ], + extensions=[ + ste.SimpleExtensionDeclaration( + extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( + extension_uri_reference=1, + extension_urn_reference=1, + function_anchor=1, + name="gt:fp32_fp32", + ) + ) + ], + referred_expr=[ + stee.ExpressionReference( + expression=stalg.Expression( + if_then=stalg.Expression.IfThen( + **{ + "ifs": [ + stalg.Expression.IfThen.IfClause( + **{ + "if": stalg.Expression( + scalar_function=stalg.Expression.ScalarFunction( + function_reference=1, + output_type=stt.Type( + bool=stt.Type.Boolean( + nullability=stt.Type.NULLABILITY_NULLABLE + ) + ), + arguments=[ + stalg.FunctionArgument( + value=stalg.Expression( + selection=stalg.Expression.FieldReference( + direct_reference=stalg.Expression.ReferenceSegment( + struct_field=stalg.Expression.ReferenceSegment.StructField( + field=2 + ) + ), + root_reference=stalg.Expression.FieldReference.RootReference(), + ) + ) + ), + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal( + fp32=100.0 + ) + ) + ), + ], + ) + ), + "then": stalg.Expression( + literal=stalg.Expression.Literal( + string="expensive" + ) + ), + } + ) + ], + "else": stalg.Expression( + literal=stalg.Expression.Literal(string="cheap") + ), + } + ) + ), + output_names=[ + "IfThen(gt(order_total,Literal(100.0)),Literal(expensive),Literal(cheap))" + ], + ) + ], + base_schema=named_struct, + ) + + assert actual == expected diff --git a/tests/builders/extended_expression/test_multi_or_list.py b/tests/builders/extended_expression/test_multi_or_list.py index 31a2a15..701847f 100644 --- a/tests/builders/extended_expression/test_multi_or_list.py +++ b/tests/builders/extended_expression/test_multi_or_list.py @@ -81,3 +81,137 @@ def test_singular_or_list(): ) assert e == expected + + +def test_multi_or_list_with_extension(): + import yaml + import substrait.gen.proto.extensions.extensions_pb2 as ste + from substrait.builders.extended_expression import scalar_function + + registry_with_ext = ExtensionRegistry(load_default_extensions=False) + content = """%YAML 1.2 +--- +urn: extension:test:functions +scalar_functions: + - name: "add" + description: "" + impls: + - args: + - value: i8 + - value: i8 + return: i8 +""" + registry_with_ext.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/functions.yaml" + ) + + actual = multi_or_list( + value=[ + scalar_function( + "extension:test:functions", + "add", + expressions=[literal(1, i8()), literal(2, i8())], + ), + literal(10, i8()), + ], + options=[ + [literal(3, i8()), literal(11, i8())], + [literal(4, i8()), literal(12, i8())], + ], + )(named_struct, registry_with_ext) + + expected = stee.ExtendedExpression( + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/functions.yaml" + ) + ], + extension_urns=[ + ste.SimpleExtensionURN( + extension_urn_anchor=1, urn="extension:test:functions" + ) + ], + extensions=[ + ste.SimpleExtensionDeclaration( + extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( + extension_uri_reference=1, + extension_urn_reference=1, + function_anchor=1, + name="add:i8_i8", + ) + ) + ], + referred_expr=[ + stee.ExpressionReference( + expression=stalg.Expression( + multi_or_list=stalg.Expression.MultiOrList( + value=[ + stalg.Expression( + scalar_function=stalg.Expression.ScalarFunction( + function_reference=1, + output_type=stt.Type( + i8=stt.Type.I8( + nullability=stt.Type.NULLABILITY_NULLABLE + ) + ), + arguments=[ + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal( + i8=1, nullable=True + ) + ) + ), + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal( + i8=2, nullable=True + ) + ) + ), + ], + ) + ), + stalg.Expression( + literal=stalg.Expression.Literal(i8=10, nullable=True) + ), + ], + options=[ + stalg.Expression.MultiOrList.Record( + fields=[ + stalg.Expression( + literal=stalg.Expression.Literal( + i8=3, nullable=True + ) + ), + stalg.Expression( + literal=stalg.Expression.Literal( + i8=11, nullable=True + ) + ), + ] + ), + stalg.Expression.MultiOrList.Record( + fields=[ + stalg.Expression( + literal=stalg.Expression.Literal( + i8=4, nullable=True + ) + ), + stalg.Expression( + literal=stalg.Expression.Literal( + i8=12, nullable=True + ) + ), + ] + ), + ], + ) + ), + output_names=["multi_or_list"], + ) + ], + base_schema=named_struct, + ) + + assert actual == expected diff --git a/tests/builders/extended_expression/test_scalar_function.py b/tests/builders/extended_expression/test_scalar_function.py index 7c0bdeb..c7819b9 100644 --- a/tests/builders/extended_expression/test_scalar_function.py +++ b/tests/builders/extended_expression/test_scalar_function.py @@ -21,6 +21,7 @@ content = """%YAML 1.2 --- +urn: extension:test:urn scalar_functions: - name: "test_func" description: "" @@ -40,12 +41,13 @@ registry = ExtensionRegistry(load_default_extensions=False) -registry.register_extension_dict(yaml.safe_load(content), uri="test_uri") +test_uri = "https://test.example.com/extension_test_urn.yaml" +registry.register_extension_dict(yaml.safe_load(content), uri=test_uri) def test_sclar_add(): e = scalar_function( - "test_uri", + "extension:test:urn", "test_func", expressions=[ literal( @@ -64,11 +66,22 @@ def test_sclar_add(): )(named_struct, registry) expected = stee.ExtendedExpression( - extension_uris=[ste.SimpleExtensionURI(extension_uri_anchor=1, uri="test_uri")], + extension_urns=[ + ste.SimpleExtensionURN(extension_urn_anchor=1, urn="extension:test:urn") + ], + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, + uri="https://test.example.com/extension_test_urn.yaml", + ) + ], extensions=[ ste.SimpleExtensionDeclaration( extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( - extension_uri_reference=1, function_anchor=1, name="test_func:i8" + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=1, + name="test_func:i8", ) ) ], @@ -109,11 +122,11 @@ def test_sclar_add(): def test_nested_scalar_calls(): e = scalar_function( - "test_uri", + "extension:test:urn", "is_positive", expressions=[ scalar_function( - "test_uri", + "extension:test:urn", "test_func", expressions=[ literal( @@ -135,16 +148,30 @@ def test_nested_scalar_calls(): )(named_struct, registry) expected = stee.ExtendedExpression( - extension_uris=[ste.SimpleExtensionURI(extension_uri_anchor=1, uri="test_uri")], + extension_urns=[ + ste.SimpleExtensionURN(extension_urn_anchor=1, urn="extension:test:urn") + ], + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, + uri="https://test.example.com/extension_test_urn.yaml", + ) + ], extensions=[ ste.SimpleExtensionDeclaration( extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( - extension_uri_reference=1, function_anchor=2, name="is_positive:i8" + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=2, + name="is_positive:i8", ) ), ste.SimpleExtensionDeclaration( extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( - extension_uri_reference=1, function_anchor=1, name="test_func:i8" + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=1, + name="test_func:i8", ) ), ], diff --git a/tests/builders/extended_expression/test_singular_or_list.py b/tests/builders/extended_expression/test_singular_or_list.py index 2408581..82e998e 100644 --- a/tests/builders/extended_expression/test_singular_or_list.py +++ b/tests/builders/extended_expression/test_singular_or_list.py @@ -50,3 +50,104 @@ def test_singular_or_list(): ) assert e == expected + + +def test_singular_or_list_with_extension(): + import yaml + import substrait.gen.proto.extensions.extensions_pb2 as ste + from substrait.builders.extended_expression import scalar_function + + registry_with_ext = ExtensionRegistry(load_default_extensions=False) + content = """%YAML 1.2 +--- +urn: extension:test:functions +scalar_functions: + - name: "add" + description: "" + impls: + - args: + - value: i8 + - value: i8 + return: i8 +""" + registry_with_ext.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/functions.yaml" + ) + + actual = singular_or_list( + value=scalar_function( + "extension:test:functions", + "add", + expressions=[literal(1, i8()), literal(2, i8())], + ), + options=[literal(3, i8()), literal(4, i8())], + )(named_struct, registry_with_ext) + + expected = stee.ExtendedExpression( + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/functions.yaml" + ) + ], + extension_urns=[ + ste.SimpleExtensionURN( + extension_urn_anchor=1, urn="extension:test:functions" + ) + ], + extensions=[ + ste.SimpleExtensionDeclaration( + extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( + extension_uri_reference=1, + extension_urn_reference=1, + function_anchor=1, + name="add:i8_i8", + ) + ) + ], + referred_expr=[ + stee.ExpressionReference( + expression=stalg.Expression( + singular_or_list=stalg.Expression.SingularOrList( + value=stalg.Expression( + scalar_function=stalg.Expression.ScalarFunction( + function_reference=1, + output_type=stt.Type( + i8=stt.Type.I8( + nullability=stt.Type.NULLABILITY_NULLABLE + ) + ), + arguments=[ + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal( + i8=1, nullable=True + ) + ) + ), + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal( + i8=2, nullable=True + ) + ) + ), + ], + ) + ), + options=[ + stalg.Expression( + literal=stalg.Expression.Literal(i8=3, nullable=True) + ), + stalg.Expression( + literal=stalg.Expression.Literal(i8=4, nullable=True) + ), + ], + ) + ), + output_names=["singular_or_list"], + ) + ], + base_schema=named_struct, + ) + + assert actual == expected diff --git a/tests/builders/extended_expression/test_switch.py b/tests/builders/extended_expression/test_switch.py index ee675b4..0ec8b71 100644 --- a/tests/builders/extended_expression/test_switch.py +++ b/tests/builders/extended_expression/test_switch.py @@ -74,3 +74,127 @@ def test_switch(): ) assert e == expected + + +def test_switch_with_extension(): + import yaml + import substrait.gen.proto.extensions.extensions_pb2 as ste + from substrait.builders.extended_expression import scalar_function + + registry_with_ext = ExtensionRegistry(load_default_extensions=False) + content = """%YAML 1.2 +--- +urn: extension:test:functions +scalar_functions: + - name: "add" + description: "" + impls: + - args: + - value: i8 + - value: i8 + return: i8 +""" + registry_with_ext.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/functions.yaml" + ) + + actual = switch( + match=scalar_function( + "extension:test:functions", + "add", + expressions=[literal(1, i8()), literal(2, i8())], + ), + ifs=[ + (literal(3, i8()), literal(10, i8())), + (literal(4, i8()), literal(20, i8())), + ], + _else=literal(0, i8()), + )(named_struct, registry_with_ext) + + expected = stee.ExtendedExpression( + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/functions.yaml" + ) + ], + extension_urns=[ + ste.SimpleExtensionURN( + extension_urn_anchor=1, urn="extension:test:functions" + ) + ], + extensions=[ + ste.SimpleExtensionDeclaration( + extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( + extension_uri_reference=1, + extension_urn_reference=1, + function_anchor=1, + name="add:i8_i8", + ) + ) + ], + referred_expr=[ + stee.ExpressionReference( + expression=stalg.Expression( + switch_expression=stalg.Expression.SwitchExpression( + match=stalg.Expression( + scalar_function=stalg.Expression.ScalarFunction( + function_reference=1, + output_type=stt.Type( + i8=stt.Type.I8( + nullability=stt.Type.NULLABILITY_NULLABLE + ) + ), + arguments=[ + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal( + i8=1, nullable=True + ) + ) + ), + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal( + i8=2, nullable=True + ) + ) + ), + ], + ) + ), + ifs=[ + stalg.Expression.SwitchExpression.IfValue( + **{ + "if": stalg.Expression.Literal(i8=3, nullable=True), + "then": stalg.Expression( + literal=stalg.Expression.Literal( + i8=10, nullable=True + ) + ), + } + ), + stalg.Expression.SwitchExpression.IfValue( + **{ + "if": stalg.Expression.Literal(i8=4, nullable=True), + "then": stalg.Expression( + literal=stalg.Expression.Literal( + i8=20, nullable=True + ) + ), + } + ), + ], + **{ + "else": stalg.Expression( + literal=stalg.Expression.Literal(i8=0, nullable=True) + ) + }, + ) + ), + output_names=["switch"], + ) + ], + base_schema=named_struct, + ) + + assert actual == expected diff --git a/tests/builders/extended_expression/test_window_function.py b/tests/builders/extended_expression/test_window_function.py index 2c218ed..2abef07 100644 --- a/tests/builders/extended_expression/test_window_function.py +++ b/tests/builders/extended_expression/test_window_function.py @@ -21,6 +21,7 @@ content = """%YAML 1.2 --- +urn: extension:test:urn window_functions: - name: "row_number" description: "the number of the current row within its partition, starting at 1" @@ -42,20 +43,32 @@ registry = ExtensionRegistry(load_default_extensions=False) -registry.register_extension_dict(yaml.safe_load(content), uri="test_uri") +registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/test.yaml" +) def test_row_number(): - e = window_function("test_uri", "row_number", expressions=[], alias="rn")( + e = window_function("extension:test:urn", "row_number", expressions=[], alias="rn")( named_struct, registry ) expected = stee.ExtendedExpression( - extension_uris=[ste.SimpleExtensionURI(extension_uri_anchor=1, uri="test_uri")], + extension_urns=[ + ste.SimpleExtensionURN(extension_urn_anchor=1, urn="extension:test:urn") + ], + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/test.yaml" + ) + ], extensions=[ ste.SimpleExtensionDeclaration( extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( - extension_uri_reference=1, function_anchor=1, name="row_number:" + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=1, + name="row_number:", ) ) ], diff --git a/tests/builders/plan/test_aggregate.py b/tests/builders/plan/test_aggregate.py index 7b15c67..0b30685 100644 --- a/tests/builders/plan/test_aggregate.py +++ b/tests/builders/plan/test_aggregate.py @@ -11,6 +11,7 @@ content = """%YAML 1.2 --- +urn: extension:test:urn aggregate_functions: - name: "count" description: Count a set of values @@ -26,7 +27,9 @@ registry = ExtensionRegistry(load_default_extensions=False) -registry.register_extension_dict(yaml.safe_load(content), uri="test_uri") +registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/test.yaml" +) struct = stt.Type.Struct( types=[i64(nullable=False), boolean()], nullability=stt.Type.NULLABILITY_REQUIRED @@ -40,7 +43,10 @@ def test_aggregate(): group_expr = column("id") measure_expr = aggregate_function( - "test_uri", "count", expressions=[column("is_applicable")], alias=["count"] + "extension:test:urn", + "count", + expressions=[column("is_applicable")], + alias=["count"], ) actual = aggregate( @@ -50,11 +56,21 @@ def test_aggregate(): ns = infer_plan_schema(table(None)) expected = stp.Plan( - extension_uris=[ste.SimpleExtensionURI(extension_uri_anchor=1, uri="test_uri")], + extension_urns=[ + ste.SimpleExtensionURN(extension_urn_anchor=1, urn="extension:test:urn") + ], + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/test.yaml" + ) + ], extensions=[ ste.SimpleExtensionDeclaration( extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( - extension_uri_reference=1, function_anchor=1, name="count:any" + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=1, + name="count:any", ) ) ], diff --git a/tests/sql/test_sql_to_substrait.py b/tests/sql/test_sql_to_substrait.py index 9b4590e..eb7b1d7 100644 --- a/tests/sql/test_sql_to_substrait.py +++ b/tests/sql/test_sql_to_substrait.py @@ -1,7 +1,6 @@ from substrait.extension_registry import ExtensionRegistry from substrait.sql.sql_to_substrait import convert import pyarrow -from google.protobuf import json_format import tempfile import pyarrow.substrait as pa_substrait import pytest @@ -94,10 +93,9 @@ def duckdb_schema_resolver(name: str): conn.install_extension("substrait", repository="community") conn.load_extension("substrait") - plan_json = json_format.MessageToJson(plan) - sql = f"CALL from_substrait_json('{plan_json}')" + sql = "CALL from_substrait(?)" + substrait_out = conn.sql(sql, params=[plan.SerializeToString()]) - substrait_out = conn.sql(sql) sql_out = conn.sql(query) substrait_arrow = substrait_out.arrow() diff --git a/tests/test_bimap.py b/tests/test_bimap.py new file mode 100644 index 0000000..c3eef02 --- /dev/null +++ b/tests/test_bimap.py @@ -0,0 +1,80 @@ +""" +Tests for the UriUrnBiDiMap class. + +This bidirectional map is temporary and used during the URI -> URN migration period. +""" + +import pytest + +from substrait.bimap import UriUrnBiDiMap + + +class TestUriUrnBiDiMap: + """Tests for the UriUrnBiDiMap class.""" + + def test_put_and_get(self): + """Test basic put and get operations.""" + bimap = UriUrnBiDiMap() + uri = "https://github.com/substrait-io/substrait/blob/main/extensions/functions_arithmetic.yaml" + urn = "extension:io.substrait:functions_arithmetic" + + bimap.put(uri, urn) + + assert bimap.get_urn(uri) == urn + assert bimap.get_uri(urn) == uri + + def test_get_nonexistent(self): + """Test getting a non-existent mapping returns None.""" + bimap = UriUrnBiDiMap() + + assert bimap.get_urn("nonexistent") is None + assert bimap.get_uri("nonexistent") is None + + def test_duplicate_uri_same_urn(self): + """Test adding the same URI-URN mapping twice is idempotent.""" + bimap = UriUrnBiDiMap() + uri = "https://example.com/test.yaml" + urn = "extension:example:test" + + bimap.put(uri, urn) + bimap.put(uri, urn) # Should not raise + + assert bimap.get_urn(uri) == urn + + def test_duplicate_uri_different_urn(self): + """Test adding the same URI with different URN raises ValueError.""" + bimap = UriUrnBiDiMap() + uri = "https://example.com/test.yaml" + urn1 = "extension:example:test1" + urn2 = "extension:example:test2" + + bimap.put(uri, urn1) + + with pytest.raises(ValueError, match="already mapped"): + bimap.put(uri, urn2) + + def test_duplicate_urn_different_uri(self): + """Test adding the same URN with different URI raises ValueError.""" + bimap = UriUrnBiDiMap() + uri1 = "https://example.com/test1.yaml" + uri2 = "https://example.com/test2.yaml" + urn = "extension:example:test" + + bimap.put(uri1, urn) + + with pytest.raises(ValueError, match="already mapped"): + bimap.put(uri2, urn) + + def test_contains(self): + """Test contains_uri and contains_urn methods.""" + bimap = UriUrnBiDiMap() + uri = "https://example.com/test.yaml" + urn = "extension:example:test" + + assert not bimap.contains_uri(uri) + assert not bimap.contains_urn(urn) + + bimap.put(uri, urn) + + assert bimap.contains_uri(uri) + assert bimap.contains_urn(urn) diff --git a/tests/test_extension_registry.py b/tests/test_extension_registry.py index b4dd046..f9d63bd 100644 --- a/tests/test_extension_registry.py +++ b/tests/test_extension_registry.py @@ -1,3 +1,4 @@ +import pytest import yaml from substrait.gen.proto.type_pb2 import Type @@ -6,6 +7,7 @@ content = """%YAML 1.2 --- +urn: extension:test:functions scalar_functions: - name: "test_fn" description: "" @@ -107,7 +109,10 @@ registry = ExtensionRegistry() -registry.register_extension_dict(yaml.safe_load(content), uri="test") +registry.register_extension_dict( + yaml.safe_load(content), + uri="https://test.example.com/extension_test_functions.yaml", +) def i8(nullable=False): @@ -152,10 +157,10 @@ def decimal(precision, scale, nullable=False): ) -def test_non_existing_uri(): +def test_non_existing_urn(): assert ( registry.lookup_function( - uri="non_existent", function_name="add", signature=[i8(), i8()] + urn="non_existent", function_name="add", signature=[i8(), i8()] ) is None ) @@ -164,7 +169,7 @@ def test_non_existing_uri(): def test_non_existing_function(): assert ( registry.lookup_function( - uri="test", function_name="sub", signature=[i8(), i8()] + urn="extension:test:functions", function_name="sub", signature=[i8(), i8()] ) is None ) @@ -172,27 +177,33 @@ def test_non_existing_function(): def test_non_existing_function_signature(): assert ( - registry.lookup_function(uri="test", function_name="add", signature=[i8()]) + registry.lookup_function( + urn="extension:test:functions", function_name="add", signature=[i8()] + ) is None ) def test_exact_match(): assert registry.lookup_function( - uri="test", function_name="add", signature=[i8(), i8()] + urn="extension:test:functions", function_name="add", signature=[i8(), i8()] )[1] == Type(i8=Type.I8(nullability=Type.NULLABILITY_REQUIRED)) def test_wildcard_match(): assert registry.lookup_function( - uri="test", function_name="add", signature=[i8(), i8(), bool()] + urn="extension:test:functions", + function_name="add", + signature=[i8(), i8(), bool()], )[1] == Type(i16=Type.I16(nullability=Type.NULLABILITY_REQUIRED)) def test_wildcard_match_fails_with_constraits(): assert ( registry.lookup_function( - uri="test", function_name="add", signature=[i8(), i16(), i16()] + urn="extension:test:functions", + function_name="add", + signature=[i8(), i16(), i16()], ) is None ) @@ -201,7 +212,9 @@ def test_wildcard_match_fails_with_constraits(): def test_wildcard_match_with_constraits(): assert ( registry.lookup_function( - uri="test", function_name="add", signature=[i16(), i16(), i8()] + urn="extension:test:functions", + function_name="add", + signature=[i16(), i16(), i8()], )[1] == i8() ) @@ -210,7 +223,9 @@ def test_wildcard_match_with_constraits(): def test_variadic(): assert ( registry.lookup_function( - uri="test", function_name="test_fn", signature=[i8(), i8(), i8()] + urn="extension:test:functions", + function_name="test_fn", + signature=[i8(), i8(), i8()], )[1] == i8() ) @@ -219,7 +234,7 @@ def test_variadic(): def test_variadic_any(): assert ( registry.lookup_function( - uri="test", + urn="extension:test:functions", function_name="test_fn_variadic_any", signature=[i16(), i16(), i16()], )[1] @@ -229,14 +244,16 @@ def test_variadic_any(): def test_variadic_fails_min_constraint(): assert ( - registry.lookup_function(uri="test", function_name="test_fn", signature=[i8()]) + registry.lookup_function( + urn="extension:test:functions", function_name="test_fn", signature=[i8()] + ) is None ) def test_decimal_happy_path(): assert registry.lookup_function( - uri="test", + urn="extension:test:functions", function_name="test_decimal", signature=[decimal(10, 8), decimal(8, 6)], )[1] == decimal(11, 7) @@ -245,7 +262,7 @@ def test_decimal_happy_path(): def test_decimal_violates_constraint(): assert ( registry.lookup_function( - uri="test", + urn="extension:test:functions", function_name="test_decimal", signature=[decimal(10, 8), decimal(12, 10)], ) @@ -255,7 +272,7 @@ def test_decimal_violates_constraint(): def test_decimal_happy_path_discrete(): assert registry.lookup_function( - uri="test", + urn="extension:test:functions", function_name="test_decimal_discrete", signature=[decimal(10, 8, nullable=True), decimal(8, 6)], )[1] == decimal(11, 7, nullable=True) @@ -264,7 +281,7 @@ def test_decimal_happy_path_discrete(): def test_enum_with_valid_option(): assert ( registry.lookup_function( - uri="test", + urn="extension:test:functions", function_name="test_enum", signature=["FLIP", i8()], )[1] @@ -275,7 +292,7 @@ def test_enum_with_valid_option(): def test_enum_with_nonexistent_option(): assert ( registry.lookup_function( - uri="test", + urn="extension:test:functions", function_name="test_enum", signature=["NONEXISTENT", i8()], ) @@ -285,26 +302,34 @@ def test_enum_with_nonexistent_option(): def test_function_with_nullable_args(): assert registry.lookup_function( - uri="test", function_name="add", signature=[i8(nullable=True), i8()] + urn="extension:test:functions", + function_name="add", + signature=[i8(nullable=True), i8()], )[1] == i8(nullable=True) def test_function_with_declared_output_nullability(): assert registry.lookup_function( - uri="test", function_name="add_declared", signature=[i8(), i8()] + urn="extension:test:functions", + function_name="add_declared", + signature=[i8(), i8()], )[1] == i8(nullable=True) def test_function_with_discrete_nullability(): assert registry.lookup_function( - uri="test", function_name="add_discrete", signature=[i8(nullable=True), i8()] + urn="extension:test:functions", + function_name="add_discrete", + signature=[i8(nullable=True), i8()], )[1] == i8(nullable=True) def test_function_with_discrete_nullability_nonexisting(): assert ( registry.lookup_function( - uri="test", function_name="add_discrete", signature=[i8(), i8()] + urn="extension:test:functions", + function_name="add_discrete", + signature=[i8(), i8()], ) is None ) @@ -333,3 +358,134 @@ def test_covers_decimal_happy_path(): def test_covers_any(): assert covers(decimal(10, 8), _parse("any"), {}) + + +def test_registry_uri_urn(): + """Test that URI to URN conversion works via the bimap.""" + urn = "extension:test:bimap" + content_with_urn = f"""%YAML 1.2 +--- +urn: {urn} +scalar_functions: + - name: "test_func" + description: "" + impls: + - args: + - value: i8 + return: i8 +""" + uri = "https://test.example.com/bimap.yaml" + registry = ExtensionRegistry(load_default_extensions=False) + registry.register_extension_dict(yaml.safe_load(content_with_urn), uri=uri) + + assert registry._uri_urn_bimap.get_urn(uri) == urn + assert registry._uri_urn_bimap.get_uri(urn) == uri + + +def test_registry_uri_anchor_lookup(): + """Test that URI anchor lookup works.""" + content_with_urn = """%YAML 1.2 +--- +urn: extension:test:anchor +scalar_functions: [] +""" + uri = "https://test.example.com/anchor.yaml" + registry = ExtensionRegistry(load_default_extensions=False) + registry.register_extension_dict(yaml.safe_load(content_with_urn), uri=uri) + + anchor = registry.lookup_uri_anchor(uri) + assert anchor is not None + assert anchor > 0 + + +def test_registry_default_extensions_have_uri_mappings(): + """Test that default extensions have URI mappings.""" + registry = ExtensionRegistry(load_default_extensions=True) + + # Check that at least one default extension has a URI mapping + urn = "extension:io.substrait:functions_comparison" + uri = registry._uri_urn_bimap.get_uri(urn) + + assert uri is not None + assert "https://github.com/substrait-io/substrait/blob/main/extensions" in uri + assert "functions_comparison.yaml" in uri + + assert registry._uri_urn_bimap.get_urn(uri) == urn + + +def test_valid_urn_format(): + """Test that valid URN formats are accepted.""" + content = """%YAML 1.2 +--- +urn: extension:io.substrait:functions_test +scalar_functions: + - name: "test_func" + description: "Test function" + impls: + - args: + - value: i8 + return: i8 +""" + registry = ExtensionRegistry(load_default_extensions=False) + + registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/functions_test.yaml" + ) # Should not raise + + +def test_invalid_urn_no_prefix(): + """Test that URN without 'extension:' prefix is rejected.""" + content = """%YAML 1.2 +--- +urn: io.substrait:functions_test +scalar_functions: [] +""" + registry = ExtensionRegistry(load_default_extensions=False) + + with pytest.raises(ValueError, match="Invalid URN format"): + registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/invalid.yaml" + ) + + +def test_invalid_urn_too_short(): + """Test that URN with insufficient parts is rejected.""" + content = """%YAML 1.2 +--- +urn: extension:test +scalar_functions: [] +""" + registry = ExtensionRegistry(load_default_extensions=False) + + with pytest.raises(ValueError, match="Invalid URN format"): + registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/invalid.yaml" + ) + + +def test_missing_urn(): + """Test that missing URN field raises ValueError.""" + content = """%YAML 1.2 +--- +scalar_functions: [] +""" + registry = ExtensionRegistry(load_default_extensions=False) + + with pytest.raises(ValueError, match="must contain a 'urn' field"): + registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/missing_urn.yaml" + ) + + +def test_register_requires_uri(): + """Test that registering an extension requires a URI during migration.""" + content = """%YAML 1.2 +--- +urn: extension:example:test +scalar_functions: [] +""" + registry = ExtensionRegistry(load_default_extensions=False) + + # During migration, URI is required - this should fail with TypeError + with pytest.raises(TypeError): + registry.register_extension_dict(yaml.safe_load(content)) diff --git a/tests/test_proto.py b/tests/test_proto.py index 55aa2ee..e59a28b 100644 --- a/tests/test_proto.py +++ b/tests/test_proto.py @@ -11,7 +11,7 @@ def test_imports(): from substrait.gen.proto.plan_pb2 import Plan from substrait.gen.proto.type_expressions_pb2 import DerivationExpression from substrait.gen.proto.type_pb2 import Type - from substrait.gen.proto.extensions.extensions_pb2 import SimpleExtensionURI + from substrait.gen.proto.extensions.extensions_pb2 import SimpleExtensionURN def test_proto_proxy_module(): diff --git a/tests/test_uri_urn_migration.py b/tests/test_uri_urn_migration.py new file mode 100644 index 0000000..184abd6 --- /dev/null +++ b/tests/test_uri_urn_migration.py @@ -0,0 +1,354 @@ +""" +test suite for URI <-> URN migration. + +This test set ensures that generated plans from builders contain both uris and urns. + +NOTE: This file is temporary and can be removed once the URI -> URN migration +is complete across all Substrait implementations. +""" + +import yaml + +import substrait.gen.proto.type_pb2 as stt +import substrait.gen.proto.plan_pb2 as stp +import substrait.gen.proto.algebra_pb2 as stalg +import substrait.gen.proto.extended_expression_pb2 as stex +import substrait.gen.proto.extensions.extensions_pb2 as ste +from substrait.builders.extended_expression import ( + scalar_function, + literal, + column, + aggregate_function, +) +from substrait.builders.type import i64 +from substrait.builders.plan import read_named_table, aggregate, project, filter +from substrait.extension_registry import ExtensionRegistry +from substrait.type_inference import infer_plan_schema + + +def test_extended_expression_outputs_both_uri_and_urn(): + """Test that scalar_function outputs both SimpleExtensionURI and SimpleExtensionURN.""" + content = """%YAML 1.2 +--- +urn: extension:test:functions +scalar_functions: + - name: "test_func" + description: "" + impls: + - args: + - value: i8 + return: i8 +""" + uri = "https://test.example.com/functions.yaml" + registry = ExtensionRegistry(load_default_extensions=False) + registry.register_extension_dict(yaml.safe_load(content), uri=uri) + + struct = stt.Type.Struct( + types=[stt.Type(i8=stt.Type.I8(nullability=stt.Type.NULLABILITY_REQUIRED))] + ) + named_struct = stt.NamedStruct(names=["value"], struct=struct) + + func_expr = scalar_function( + "extension:test:functions", + "test_func", + expressions=[ + literal( + 10, + type=stt.Type( + i8=stt.Type.I8(nullability=stt.Type.NULLABILITY_REQUIRED) + ), + ) + ], + ) + + actual = func_expr(named_struct, registry) + + expected = stex.ExtendedExpression( + extension_urns=[ + ste.SimpleExtensionURN( + extension_urn_anchor=1, urn="extension:test:functions" + ) + ], + extension_uris=[ste.SimpleExtensionURI(extension_uri_anchor=1, uri=uri)], + extensions=[ + ste.SimpleExtensionDeclaration( + extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=1, + name="test_func:i8", + ) + ) + ], + referred_expr=[ + stex.ExpressionReference( + expression=stalg.Expression( + scalar_function=stalg.Expression.ScalarFunction( + function_reference=1, + output_type=stt.Type( + i8=stt.Type.I8(nullability=stt.Type.NULLABILITY_REQUIRED) + ), + arguments=[ + stalg.FunctionArgument( + value=stalg.Expression( + literal=stalg.Expression.Literal(i8=10) + ) + ) + ], + ) + ), + output_names=["test_func(Literal(10))"], + ) + ], + base_schema=stt.NamedStruct( + names=["value"], + struct=stt.Type.Struct( + types=[ + stt.Type(i8=stt.Type.I8(nullability=stt.Type.NULLABILITY_REQUIRED)) + ] + ), + ), + ) + + assert actual == expected + + +def test_project_outputs_both_uri_and_urn(): + """Test that project plans with scalar functions have both URI and URN in proto.""" + content = """%YAML 1.2 +--- +urn: extension:test:math +scalar_functions: + - name: "add" + description: "" + impls: + - args: + - value: i64 + - value: i64 + return: i64 +""" + registry = ExtensionRegistry(load_default_extensions=False) + registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/math.yaml" + ) + + struct = stt.Type.Struct(types=[i64(nullable=False), i64(nullable=False)]) + named_struct = stt.NamedStruct(names=["a", "b"], struct=struct) + + table = read_named_table("table", named_struct) + add_expr = scalar_function( + "extension:test:math", + "add", + expressions=[column("a"), column("b")], + alias=["add"], + ) + + actual = project(table, [add_expr])(registry) + + ns = infer_plan_schema(table(None)) + + expected = stp.Plan( + extension_urns=[ + ste.SimpleExtensionURN(extension_urn_anchor=1, urn="extension:test:math") + ], + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/math.yaml" + ) + ], + extensions=[ + ste.SimpleExtensionDeclaration( + extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=1, + name="add:i64_i64", + ) + ) + ], + relations=[ + stp.PlanRel( + root=stalg.RelRoot( + input=stalg.Rel( + project=stalg.ProjectRel( + common=stalg.RelCommon( + emit=stalg.RelCommon.Emit(output_mapping=[2]) + ), + input=table(None).relations[-1].root.input, + expressions=[ + add_expr(ns, registry).referred_expr[0].expression + ], + ) + ), + names=["add"], + ) + ) + ], + ) + + assert actual == expected + + +def test_filter_outputs_both_uri_and_urn(): + """Test that filter plans with scalar functions have both URI and URN in proto.""" + content = """%YAML 1.2 +--- +urn: extension:test:comparison +scalar_functions: + - name: "greater_than" + description: "" + impls: + - args: + - value: i64 + - value: i64 + return: boolean +""" + registry = ExtensionRegistry(load_default_extensions=False) + registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/comparison.yaml" + ) + + struct = stt.Type.Struct(types=[i64(nullable=False)]) + named_struct = stt.NamedStruct(names=["value"], struct=struct) + + table = read_named_table("table", named_struct) + gt_expr = scalar_function( + "extension:test:comparison", + "greater_than", + expressions=[column("value"), literal(100, i64(nullable=False))], + ) + + actual = filter(table, gt_expr)(registry) + + ns = infer_plan_schema(table(None)) + + expected = stp.Plan( + extension_urns=[ + ste.SimpleExtensionURN( + extension_urn_anchor=1, urn="extension:test:comparison" + ) + ], + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/comparison.yaml" + ) + ], + extensions=[ + ste.SimpleExtensionDeclaration( + extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=1, + name="greater_than:i64_i64", + ) + ) + ], + relations=[ + stp.PlanRel( + root=stalg.RelRoot( + input=stalg.Rel( + filter=stalg.FilterRel( + input=table(None).relations[-1].root.input, + condition=gt_expr(ns, registry).referred_expr[0].expression, + ) + ), + names=["value"], + ) + ) + ], + ) + + assert actual == expected + + +def test_aggregate_with_aggregate_function(): + """Test that aggregate plans with aggregate functions have both URI and URN in proto.""" + content = """%YAML 1.2 +--- +urn: extension:test:aggregate +aggregate_functions: + - name: "sum" + description: "" + impls: + - args: + - value: i64 + nullability: DECLARED_OUTPUT + decomposable: MANY + intermediate: i64 + return: i64 +""" + registry = ExtensionRegistry(load_default_extensions=False) + registry.register_extension_dict( + yaml.safe_load(content), uri="https://test.example.com/aggregate.yaml" + ) + + struct = stt.Type.Struct(types=[i64(nullable=False), i64(nullable=False)]) + named_struct = stt.NamedStruct(names=["id", "value"], struct=struct) + + table = read_named_table("table", named_struct) + sum_expr = aggregate_function( + "extension:test:aggregate", "sum", expressions=[column("value")], alias=["sum"] + ) + + actual = aggregate(table, grouping_expressions=[column("id")], measures=[sum_expr])( + registry + ) + + ns = infer_plan_schema(table(None)) + + expected = stp.Plan( + extension_urns=[ + ste.SimpleExtensionURN( + extension_urn_anchor=1, urn="extension:test:aggregate" + ) + ], + extension_uris=[ + ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://test.example.com/aggregate.yaml" + ) + ], + extensions=[ + ste.SimpleExtensionDeclaration( + extension_function=ste.SimpleExtensionDeclaration.ExtensionFunction( + extension_urn_reference=1, + extension_uri_reference=1, + function_anchor=1, + name="sum:i64", + ) + ) + ], + relations=[ + stp.PlanRel( + root=stalg.RelRoot( + input=stalg.Rel( + aggregate=stalg.AggregateRel( + input=table(None).relations[-1].root.input, + grouping_expressions=[ + column("id")(ns, registry).referred_expr[0].expression + ], + groupings=[ + stalg.AggregateRel.Grouping( + grouping_expressions=[ + column("id")(ns, registry) + .referred_expr[0] + .expression + ], + expression_references=[0], + ) + ], + measures=[ + stalg.AggregateRel.Measure( + measure=sum_expr(ns, registry) + .referred_expr[0] + .measure + ) + ], + ) + ), + names=["id", "sum"], + ) + ) + ], + ) + + assert actual == expected diff --git a/tests/test_utils.py b/tests/test_utils.py index 6043364..dbbd17d 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,5 +1,6 @@ import substrait.gen.proto.type_pb2 as stt -from substrait.utils import type_num_names +import substrait.gen.proto.extensions.extensions_pb2 as ste +from substrait.utils import type_num_names, merge_extension_uris, merge_extension_urns def test_type_num_names_flat_struct(): @@ -86,3 +87,37 @@ def test_type_num_names_nested_list(): ) == 6 ) + + +def test_merge_extension_uris_deduplicates(): + """Test that merging extension URIs deduplicates correctly.""" + # Create duplicate URI extensions + uri1 = ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://example.com/test.yaml" + ) + uri2 = ste.SimpleExtensionURI( + extension_uri_anchor=1, uri="https://example.com/test.yaml" + ) + uri3 = ste.SimpleExtensionURI( + extension_uri_anchor=2, uri="https://example.com/other.yaml" + ) + + merged_uris = merge_extension_uris([uri1], [uri2, uri3]) + + assert len(merged_uris) == 2 + assert merged_uris[0].uri == "https://example.com/test.yaml" + assert merged_uris[1].uri == "https://example.com/other.yaml" + + +def test_merge_extension_urns_deduplicates(): + """Test that merging extension URNs deduplicates correctly.""" + # Create duplicate URN extensions + urn1 = ste.SimpleExtensionURN(extension_urn_anchor=1, urn="extension:example:test") + urn2 = ste.SimpleExtensionURN(extension_urn_anchor=1, urn="extension:example:test") + urn3 = ste.SimpleExtensionURN(extension_urn_anchor=2, urn="extension:example:other") + + merged_urns = merge_extension_urns([urn1], [urn2, urn3]) + + assert len(merged_urns) == 2 + assert merged_urns[0].urn == "extension:example:test" + assert merged_urns[1].urn == "extension:example:other" diff --git a/third_party/substrait b/third_party/substrait index 793c64b..3c25b1b 160000 --- a/third_party/substrait +++ b/third_party/substrait @@ -1 +1 @@ -Subproject commit 793c64ba26e337c22f5e91b658be58b1eea7efd3 +Subproject commit 3c25b1b3eaadecba6d10af6b3dd0fe038d0c5993