"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import google.protobuf.any_pb2
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
from .. import substrait
from .. import substrait
import typing
import typing_extensions
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _AggregationPhase:
    ValueType = typing.NewType('ValueType', builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _AggregationPhaseEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_AggregationPhase.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    AGGREGATION_PHASE_UNSPECIFIED: _AggregationPhase.ValueType
    AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE: _AggregationPhase.ValueType
    AGGREGATION_PHASE_INTERMEDIATE_TO_INTERMEDIATE: _AggregationPhase.ValueType
    AGGREGATION_PHASE_INITIAL_TO_RESULT: _AggregationPhase.ValueType
    AGGREGATION_PHASE_INTERMEDIATE_TO_RESULT: _AggregationPhase.ValueType

class AggregationPhase(_AggregationPhase, metaclass=_AggregationPhaseEnumTypeWrapper):
    pass
AGGREGATION_PHASE_UNSPECIFIED: AggregationPhase.ValueType
AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE: AggregationPhase.ValueType
AGGREGATION_PHASE_INTERMEDIATE_TO_INTERMEDIATE: AggregationPhase.ValueType
AGGREGATION_PHASE_INITIAL_TO_RESULT: AggregationPhase.ValueType
AGGREGATION_PHASE_INTERMEDIATE_TO_RESULT: AggregationPhase.ValueType
global___AggregationPhase = AggregationPhase

class RelCommon(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class Direct(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        def __init__(self) -> None:
            ...

    class Emit(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        OUTPUT_MAPPING_FIELD_NUMBER: builtins.int

        @property
        def output_mapping(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
            ...

        def __init__(self, *, output_mapping: typing.Optional[typing.Iterable[builtins.int]]=...) -> None:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['output_mapping', b'output_mapping']) -> None:
            ...

    class Hint(google.protobuf.message.Message):
        """Changes to the operation that can influence efficiency/performance but
        should not impact correctness.
        """
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class Stats(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            ROW_COUNT_FIELD_NUMBER: builtins.int
            RECORD_SIZE_FIELD_NUMBER: builtins.int
            ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int
            row_count: builtins.float
            record_size: builtins.float

            @property
            def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
                ...

            def __init__(self, *, row_count: builtins.float=..., record_size: builtins.float=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'record_size', b'record_size', 'row_count', b'row_count']) -> None:
                ...

        class RuntimeConstraint(google.protobuf.message.Message):
            """TODO: nodes, cpu threads/%, memory, iops, etc."""
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

            @property
            def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
                ...

            def __init__(self, *, advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension']) -> None:
                ...
        STATS_FIELD_NUMBER: builtins.int
        CONSTRAINT_FIELD_NUMBER: builtins.int
        ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

        @property
        def stats(self) -> global___RelCommon.Hint.Stats:
            ...

        @property
        def constraint(self) -> global___RelCommon.Hint.RuntimeConstraint:
            ...

        @property
        def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
            ...

        def __init__(self, *, stats: typing.Optional[global___RelCommon.Hint.Stats]=..., constraint: typing.Optional[global___RelCommon.Hint.RuntimeConstraint]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'constraint', b'constraint', 'stats', b'stats']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'constraint', b'constraint', 'stats', b'stats']) -> None:
            ...
    DIRECT_FIELD_NUMBER: builtins.int
    EMIT_FIELD_NUMBER: builtins.int
    HINT_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

    @property
    def direct(self) -> global___RelCommon.Direct:
        ...

    @property
    def emit(self) -> global___RelCommon.Emit:
        ...

    @property
    def hint(self) -> global___RelCommon.Hint:
        ...

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    def __init__(self, *, direct: typing.Optional[global___RelCommon.Direct]=..., emit: typing.Optional[global___RelCommon.Emit]=..., hint: typing.Optional[global___RelCommon.Hint]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'direct', b'direct', 'emit', b'emit', 'emit_kind', b'emit_kind', 'hint', b'hint']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'direct', b'direct', 'emit', b'emit', 'emit_kind', b'emit_kind', 'hint', b'hint']) -> None:
        ...

    def WhichOneof(self, oneof_group: typing_extensions.Literal['emit_kind', b'emit_kind']) -> typing.Optional[typing_extensions.Literal['direct', 'emit']]:
        ...
global___RelCommon = RelCommon

class ReadRel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class NamedTable(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        NAMES_FIELD_NUMBER: builtins.int
        ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

        @property
        def names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
            ...

        @property
        def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
            ...

        def __init__(self, *, names: typing.Optional[typing.Iterable[typing.Text]]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'names', b'names']) -> None:
            ...

    class VirtualTable(google.protobuf.message.Message):
        """a table composed of literals."""
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        VALUES_FIELD_NUMBER: builtins.int

        @property
        def values(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression.Literal.Struct]:
            ...

        def __init__(self, *, values: typing.Optional[typing.Iterable[global___Expression.Literal.Struct]]=...) -> None:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['values', b'values']) -> None:
            ...

    class ExtensionTable(google.protobuf.message.Message):
        """a stub type that can be used to extend/introduce new table types outside
        the specification.
        """
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        DETAIL_FIELD_NUMBER: builtins.int

        @property
        def detail(self) -> google.protobuf.any_pb2.Any:
            ...

        def __init__(self, *, detail: typing.Optional[google.protobuf.any_pb2.Any]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['detail', b'detail']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['detail', b'detail']) -> None:
            ...

    class LocalFiles(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class FileOrFiles(google.protobuf.message.Message):
            """Many files consist of indivisible chunks (e.g. parquet row groups
            or CSV rows).  If a slice partially selects an indivisible chunk
            then the consumer should employ some rule to decide which slice to
            include the chunk in (e.g. include it in the slice that contains
            the midpoint of the chunk)
            """
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            class _FileFormat:
                ValueType = typing.NewType('ValueType', builtins.int)
                V: typing_extensions.TypeAlias = ValueType

            class _FileFormatEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ReadRel.LocalFiles.FileOrFiles._FileFormat.ValueType], builtins.type):
                DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
                FILE_FORMAT_UNSPECIFIED: ReadRel.LocalFiles.FileOrFiles._FileFormat.ValueType
                FILE_FORMAT_PARQUET: ReadRel.LocalFiles.FileOrFiles._FileFormat.ValueType

            class FileFormat(_FileFormat, metaclass=_FileFormatEnumTypeWrapper):
                pass
            FILE_FORMAT_UNSPECIFIED: ReadRel.LocalFiles.FileOrFiles.FileFormat.ValueType
            FILE_FORMAT_PARQUET: ReadRel.LocalFiles.FileOrFiles.FileFormat.ValueType
            URI_PATH_FIELD_NUMBER: builtins.int
            URI_PATH_GLOB_FIELD_NUMBER: builtins.int
            URI_FILE_FIELD_NUMBER: builtins.int
            URI_FOLDER_FIELD_NUMBER: builtins.int
            FORMAT_FIELD_NUMBER: builtins.int
            PARTITION_INDEX_FIELD_NUMBER: builtins.int
            START_FIELD_NUMBER: builtins.int
            LENGTH_FIELD_NUMBER: builtins.int
            uri_path: typing.Text
            uri_path_glob: typing.Text
            uri_file: typing.Text
            uri_folder: typing.Text
            format: global___ReadRel.LocalFiles.FileOrFiles.FileFormat.ValueType
            partition_index: builtins.int
            'the index of the partition this item belongs to'
            start: builtins.int
            'the start position in byte to read from this item'
            length: builtins.int
            'the length in byte to read from this item'

            def __init__(self, *, uri_path: typing.Text=..., uri_path_glob: typing.Text=..., uri_file: typing.Text=..., uri_folder: typing.Text=..., format: global___ReadRel.LocalFiles.FileOrFiles.FileFormat.ValueType=..., partition_index: builtins.int=..., start: builtins.int=..., length: builtins.int=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['path_type', b'path_type', 'uri_file', b'uri_file', 'uri_folder', b'uri_folder', 'uri_path', b'uri_path', 'uri_path_glob', b'uri_path_glob']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['format', b'format', 'length', b'length', 'partition_index', b'partition_index', 'path_type', b'path_type', 'start', b'start', 'uri_file', b'uri_file', 'uri_folder', b'uri_folder', 'uri_path', b'uri_path', 'uri_path_glob', b'uri_path_glob']) -> None:
                ...

            def WhichOneof(self, oneof_group: typing_extensions.Literal['path_type', b'path_type']) -> typing.Optional[typing_extensions.Literal['uri_path', 'uri_path_glob', 'uri_file', 'uri_folder']]:
                ...
        ITEMS_FIELD_NUMBER: builtins.int
        ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

        @property
        def items(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ReadRel.LocalFiles.FileOrFiles]:
            ...

        @property
        def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
            ...

        def __init__(self, *, items: typing.Optional[typing.Iterable[global___ReadRel.LocalFiles.FileOrFiles]]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'items', b'items']) -> None:
            ...
    COMMON_FIELD_NUMBER: builtins.int
    BASE_SCHEMA_FIELD_NUMBER: builtins.int
    FILTER_FIELD_NUMBER: builtins.int
    PROJECTION_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int
    VIRTUAL_TABLE_FIELD_NUMBER: builtins.int
    LOCAL_FILES_FIELD_NUMBER: builtins.int
    NAMED_TABLE_FIELD_NUMBER: builtins.int
    EXTENSION_TABLE_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def base_schema(self) -> substrait.type_pb2.NamedStruct:
        ...

    @property
    def filter(self) -> global___Expression:
        ...

    @property
    def projection(self) -> global___Expression.MaskExpression:
        ...

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    @property
    def virtual_table(self) -> global___ReadRel.VirtualTable:
        ...

    @property
    def local_files(self) -> global___ReadRel.LocalFiles:
        ...

    @property
    def named_table(self) -> global___ReadRel.NamedTable:
        ...

    @property
    def extension_table(self) -> global___ReadRel.ExtensionTable:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., base_schema: typing.Optional[substrait.type_pb2.NamedStruct]=..., filter: typing.Optional[global___Expression]=..., projection: typing.Optional[global___Expression.MaskExpression]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=..., virtual_table: typing.Optional[global___ReadRel.VirtualTable]=..., local_files: typing.Optional[global___ReadRel.LocalFiles]=..., named_table: typing.Optional[global___ReadRel.NamedTable]=..., extension_table: typing.Optional[global___ReadRel.ExtensionTable]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'base_schema', b'base_schema', 'common', b'common', 'extension_table', b'extension_table', 'filter', b'filter', 'local_files', b'local_files', 'named_table', b'named_table', 'projection', b'projection', 'read_type', b'read_type', 'virtual_table', b'virtual_table']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'base_schema', b'base_schema', 'common', b'common', 'extension_table', b'extension_table', 'filter', b'filter', 'local_files', b'local_files', 'named_table', b'named_table', 'projection', b'projection', 'read_type', b'read_type', 'virtual_table', b'virtual_table']) -> None:
        ...

    def WhichOneof(self, oneof_group: typing_extensions.Literal['read_type', b'read_type']) -> typing.Optional[typing_extensions.Literal['virtual_table', 'local_files', 'named_table', 'extension_table']]:
        ...
global___ReadRel = ReadRel

class ProjectRel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    COMMON_FIELD_NUMBER: builtins.int
    INPUT_FIELD_NUMBER: builtins.int
    EXPRESSIONS_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def input(self) -> global___Rel:
        ...

    @property
    def expressions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
        ...

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., input: typing.Optional[global___Rel]=..., expressions: typing.Optional[typing.Iterable[global___Expression]]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'input', b'input']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'expressions', b'expressions', 'input', b'input']) -> None:
        ...
global___ProjectRel = ProjectRel

class JoinRel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _JoinType:
        ValueType = typing.NewType('ValueType', builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _JoinTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[JoinRel._JoinType.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        JOIN_TYPE_UNSPECIFIED: JoinRel._JoinType.ValueType
        JOIN_TYPE_INNER: JoinRel._JoinType.ValueType
        JOIN_TYPE_OUTER: JoinRel._JoinType.ValueType
        JOIN_TYPE_LEFT: JoinRel._JoinType.ValueType
        JOIN_TYPE_RIGHT: JoinRel._JoinType.ValueType
        JOIN_TYPE_SEMI: JoinRel._JoinType.ValueType
        JOIN_TYPE_ANTI: JoinRel._JoinType.ValueType
        JOIN_TYPE_SINGLE: JoinRel._JoinType.ValueType

    class JoinType(_JoinType, metaclass=_JoinTypeEnumTypeWrapper):
        pass
    JOIN_TYPE_UNSPECIFIED: JoinRel.JoinType.ValueType
    JOIN_TYPE_INNER: JoinRel.JoinType.ValueType
    JOIN_TYPE_OUTER: JoinRel.JoinType.ValueType
    JOIN_TYPE_LEFT: JoinRel.JoinType.ValueType
    JOIN_TYPE_RIGHT: JoinRel.JoinType.ValueType
    JOIN_TYPE_SEMI: JoinRel.JoinType.ValueType
    JOIN_TYPE_ANTI: JoinRel.JoinType.ValueType
    JOIN_TYPE_SINGLE: JoinRel.JoinType.ValueType
    COMMON_FIELD_NUMBER: builtins.int
    LEFT_FIELD_NUMBER: builtins.int
    RIGHT_FIELD_NUMBER: builtins.int
    EXPRESSION_FIELD_NUMBER: builtins.int
    POST_JOIN_FILTER_FIELD_NUMBER: builtins.int
    TYPE_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def left(self) -> global___Rel:
        ...

    @property
    def right(self) -> global___Rel:
        ...

    @property
    def expression(self) -> global___Expression:
        ...

    @property
    def post_join_filter(self) -> global___Expression:
        ...
    type: global___JoinRel.JoinType.ValueType

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., left: typing.Optional[global___Rel]=..., right: typing.Optional[global___Rel]=..., expression: typing.Optional[global___Expression]=..., post_join_filter: typing.Optional[global___Expression]=..., type: global___JoinRel.JoinType.ValueType=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'expression', b'expression', 'left', b'left', 'post_join_filter', b'post_join_filter', 'right', b'right']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'expression', b'expression', 'left', b'left', 'post_join_filter', b'post_join_filter', 'right', b'right', 'type', b'type']) -> None:
        ...
global___JoinRel = JoinRel

class CrossRel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    COMMON_FIELD_NUMBER: builtins.int
    LEFT_FIELD_NUMBER: builtins.int
    RIGHT_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def left(self) -> global___Rel:
        ...

    @property
    def right(self) -> global___Rel:
        ...

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., left: typing.Optional[global___Rel]=..., right: typing.Optional[global___Rel]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'left', b'left', 'right', b'right']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'left', b'left', 'right', b'right']) -> None:
        ...
global___CrossRel = CrossRel

class FetchRel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    COMMON_FIELD_NUMBER: builtins.int
    INPUT_FIELD_NUMBER: builtins.int
    OFFSET_FIELD_NUMBER: builtins.int
    COUNT_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def input(self) -> global___Rel:
        ...
    offset: builtins.int
    count: builtins.int

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., input: typing.Optional[global___Rel]=..., offset: builtins.int=..., count: builtins.int=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'input', b'input']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'count', b'count', 'input', b'input', 'offset', b'offset']) -> None:
        ...
global___FetchRel = FetchRel

class AggregateRel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class Grouping(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        GROUPING_EXPRESSIONS_FIELD_NUMBER: builtins.int

        @property
        def grouping_expressions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
            ...

        def __init__(self, *, grouping_expressions: typing.Optional[typing.Iterable[global___Expression]]=...) -> None:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['grouping_expressions', b'grouping_expressions']) -> None:
            ...

    class Measure(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        MEASURE_FIELD_NUMBER: builtins.int
        FILTER_FIELD_NUMBER: builtins.int

        @property
        def measure(self) -> global___AggregateFunction:
            ...

        @property
        def filter(self) -> global___Expression:
            """An optional boolean expression that acts to filter which records are
            included in the measure. True means include this record for calculation
            within the measure.
            """
            pass

        def __init__(self, *, measure: typing.Optional[global___AggregateFunction]=..., filter: typing.Optional[global___Expression]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['filter', b'filter', 'measure', b'measure']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['filter', b'filter', 'measure', b'measure']) -> None:
            ...
    COMMON_FIELD_NUMBER: builtins.int
    INPUT_FIELD_NUMBER: builtins.int
    GROUPINGS_FIELD_NUMBER: builtins.int
    MEASURES_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def input(self) -> global___Rel:
        ...

    @property
    def groupings(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___AggregateRel.Grouping]:
        ...

    @property
    def measures(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___AggregateRel.Measure]:
        ...

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., input: typing.Optional[global___Rel]=..., groupings: typing.Optional[typing.Iterable[global___AggregateRel.Grouping]]=..., measures: typing.Optional[typing.Iterable[global___AggregateRel.Measure]]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'input', b'input']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'groupings', b'groupings', 'input', b'input', 'measures', b'measures']) -> None:
        ...
global___AggregateRel = AggregateRel

class SortRel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    COMMON_FIELD_NUMBER: builtins.int
    INPUT_FIELD_NUMBER: builtins.int
    SORTS_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def input(self) -> global___Rel:
        ...

    @property
    def sorts(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SortField]:
        ...

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., input: typing.Optional[global___Rel]=..., sorts: typing.Optional[typing.Iterable[global___SortField]]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'input', b'input']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'input', b'input', 'sorts', b'sorts']) -> None:
        ...
global___SortRel = SortRel

class FilterRel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    COMMON_FIELD_NUMBER: builtins.int
    INPUT_FIELD_NUMBER: builtins.int
    CONDITION_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def input(self) -> global___Rel:
        ...

    @property
    def condition(self) -> global___Expression:
        ...

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., input: typing.Optional[global___Rel]=..., condition: typing.Optional[global___Expression]=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'condition', b'condition', 'input', b'input']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'condition', b'condition', 'input', b'input']) -> None:
        ...
global___FilterRel = FilterRel

class SetRel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _SetOp:
        ValueType = typing.NewType('ValueType', builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _SetOpEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SetRel._SetOp.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        SET_OP_UNSPECIFIED: SetRel._SetOp.ValueType
        SET_OP_MINUS_PRIMARY: SetRel._SetOp.ValueType
        SET_OP_MINUS_MULTISET: SetRel._SetOp.ValueType
        SET_OP_INTERSECTION_PRIMARY: SetRel._SetOp.ValueType
        SET_OP_INTERSECTION_MULTISET: SetRel._SetOp.ValueType
        SET_OP_UNION_DISTINCT: SetRel._SetOp.ValueType
        SET_OP_UNION_ALL: SetRel._SetOp.ValueType

    class SetOp(_SetOp, metaclass=_SetOpEnumTypeWrapper):
        pass
    SET_OP_UNSPECIFIED: SetRel.SetOp.ValueType
    SET_OP_MINUS_PRIMARY: SetRel.SetOp.ValueType
    SET_OP_MINUS_MULTISET: SetRel.SetOp.ValueType
    SET_OP_INTERSECTION_PRIMARY: SetRel.SetOp.ValueType
    SET_OP_INTERSECTION_MULTISET: SetRel.SetOp.ValueType
    SET_OP_UNION_DISTINCT: SetRel.SetOp.ValueType
    SET_OP_UNION_ALL: SetRel.SetOp.ValueType
    COMMON_FIELD_NUMBER: builtins.int
    INPUTS_FIELD_NUMBER: builtins.int
    OP_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSION_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def inputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Rel]:
        ...
    op: global___SetRel.SetOp.ValueType

    @property
    def advanced_extension(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., inputs: typing.Optional[typing.Iterable[global___Rel]]=..., op: global___SetRel.SetOp.ValueType=..., advanced_extension: typing.Optional[substrait.extensions.extensions_pb2.AdvancedExtension]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['advanced_extension', b'advanced_extension', 'common', b'common', 'inputs', b'inputs', 'op', b'op']) -> None:
        ...
global___SetRel = SetRel

class ExtensionSingleRel(google.protobuf.message.Message):
    """Stub to support extension with a single input"""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    COMMON_FIELD_NUMBER: builtins.int
    INPUT_FIELD_NUMBER: builtins.int
    DETAIL_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def input(self) -> global___Rel:
        ...

    @property
    def detail(self) -> google.protobuf.any_pb2.Any:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., input: typing.Optional[global___Rel]=..., detail: typing.Optional[google.protobuf.any_pb2.Any]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['common', b'common', 'detail', b'detail', 'input', b'input']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['common', b'common', 'detail', b'detail', 'input', b'input']) -> None:
        ...
global___ExtensionSingleRel = ExtensionSingleRel

class ExtensionLeafRel(google.protobuf.message.Message):
    """Stub to support extension with a zero inputs"""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    COMMON_FIELD_NUMBER: builtins.int
    DETAIL_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def detail(self) -> google.protobuf.any_pb2.Any:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., detail: typing.Optional[google.protobuf.any_pb2.Any]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['common', b'common', 'detail', b'detail']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['common', b'common', 'detail', b'detail']) -> None:
        ...
global___ExtensionLeafRel = ExtensionLeafRel

class ExtensionMultiRel(google.protobuf.message.Message):
    """Stub to support extension with multiple inputs"""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    COMMON_FIELD_NUMBER: builtins.int
    INPUTS_FIELD_NUMBER: builtins.int
    DETAIL_FIELD_NUMBER: builtins.int

    @property
    def common(self) -> global___RelCommon:
        ...

    @property
    def inputs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Rel]:
        ...

    @property
    def detail(self) -> google.protobuf.any_pb2.Any:
        ...

    def __init__(self, *, common: typing.Optional[global___RelCommon]=..., inputs: typing.Optional[typing.Iterable[global___Rel]]=..., detail: typing.Optional[google.protobuf.any_pb2.Any]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['common', b'common', 'detail', b'detail']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['common', b'common', 'detail', b'detail', 'inputs', b'inputs']) -> None:
        ...
global___ExtensionMultiRel = ExtensionMultiRel

class RelRoot(google.protobuf.message.Message):
    """A relation with output field names.

    This is for use at the root of a `Rel` tree.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    INPUT_FIELD_NUMBER: builtins.int
    NAMES_FIELD_NUMBER: builtins.int

    @property
    def input(self) -> global___Rel:
        """A relation"""
        pass

    @property
    def names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
        """Field names in depth-first order"""
        pass

    def __init__(self, *, input: typing.Optional[global___Rel]=..., names: typing.Optional[typing.Iterable[typing.Text]]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['input', b'input']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['input', b'input', 'names', b'names']) -> None:
        ...
global___RelRoot = RelRoot

class Rel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    READ_FIELD_NUMBER: builtins.int
    FILTER_FIELD_NUMBER: builtins.int
    FETCH_FIELD_NUMBER: builtins.int
    AGGREGATE_FIELD_NUMBER: builtins.int
    SORT_FIELD_NUMBER: builtins.int
    JOIN_FIELD_NUMBER: builtins.int
    PROJECT_FIELD_NUMBER: builtins.int
    SET_FIELD_NUMBER: builtins.int
    EXTENSION_SINGLE_FIELD_NUMBER: builtins.int
    EXTENSION_MULTI_FIELD_NUMBER: builtins.int
    EXTENSION_LEAF_FIELD_NUMBER: builtins.int
    CROSS_FIELD_NUMBER: builtins.int

    @property
    def read(self) -> global___ReadRel:
        ...

    @property
    def filter(self) -> global___FilterRel:
        ...

    @property
    def fetch(self) -> global___FetchRel:
        ...

    @property
    def aggregate(self) -> global___AggregateRel:
        ...

    @property
    def sort(self) -> global___SortRel:
        ...

    @property
    def join(self) -> global___JoinRel:
        ...

    @property
    def project(self) -> global___ProjectRel:
        ...

    @property
    def set(self) -> global___SetRel:
        ...

    @property
    def extension_single(self) -> global___ExtensionSingleRel:
        ...

    @property
    def extension_multi(self) -> global___ExtensionMultiRel:
        ...

    @property
    def extension_leaf(self) -> global___ExtensionLeafRel:
        ...

    @property
    def cross(self) -> global___CrossRel:
        ...

    def __init__(self, *, read: typing.Optional[global___ReadRel]=..., filter: typing.Optional[global___FilterRel]=..., fetch: typing.Optional[global___FetchRel]=..., aggregate: typing.Optional[global___AggregateRel]=..., sort: typing.Optional[global___SortRel]=..., join: typing.Optional[global___JoinRel]=..., project: typing.Optional[global___ProjectRel]=..., set: typing.Optional[global___SetRel]=..., extension_single: typing.Optional[global___ExtensionSingleRel]=..., extension_multi: typing.Optional[global___ExtensionMultiRel]=..., extension_leaf: typing.Optional[global___ExtensionLeafRel]=..., cross: typing.Optional[global___CrossRel]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['aggregate', b'aggregate', 'cross', b'cross', 'extension_leaf', b'extension_leaf', 'extension_multi', b'extension_multi', 'extension_single', b'extension_single', 'fetch', b'fetch', 'filter', b'filter', 'join', b'join', 'project', b'project', 'read', b'read', 'rel_type', b'rel_type', 'set', b'set', 'sort', b'sort']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['aggregate', b'aggregate', 'cross', b'cross', 'extension_leaf', b'extension_leaf', 'extension_multi', b'extension_multi', 'extension_single', b'extension_single', 'fetch', b'fetch', 'filter', b'filter', 'join', b'join', 'project', b'project', 'read', b'read', 'rel_type', b'rel_type', 'set', b'set', 'sort', b'sort']) -> None:
        ...

    def WhichOneof(self, oneof_group: typing_extensions.Literal['rel_type', b'rel_type']) -> typing.Optional[typing_extensions.Literal['read', 'filter', 'fetch', 'aggregate', 'sort', 'join', 'project', 'set', 'extension_single', 'extension_multi', 'extension_leaf', 'cross']]:
        ...
global___Rel = Rel

class Expression(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class Enum(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class Empty(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            def __init__(self) -> None:
                ...
        SPECIFIED_FIELD_NUMBER: builtins.int
        UNSPECIFIED_FIELD_NUMBER: builtins.int
        specified: typing.Text

        @property
        def unspecified(self) -> global___Expression.Enum.Empty:
            ...

        def __init__(self, *, specified: typing.Text=..., unspecified: typing.Optional[global___Expression.Enum.Empty]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['enum_kind', b'enum_kind', 'specified', b'specified', 'unspecified', b'unspecified']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['enum_kind', b'enum_kind', 'specified', b'specified', 'unspecified', b'unspecified']) -> None:
            ...

        def WhichOneof(self, oneof_group: typing_extensions.Literal['enum_kind', b'enum_kind']) -> typing.Optional[typing_extensions.Literal['specified', 'unspecified']]:
            ...

    class Literal(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class VarChar(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            VALUE_FIELD_NUMBER: builtins.int
            LENGTH_FIELD_NUMBER: builtins.int
            value: typing.Text
            length: builtins.int

            def __init__(self, *, value: typing.Text=..., length: builtins.int=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['length', b'length', 'value', b'value']) -> None:
                ...

        class Decimal(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            VALUE_FIELD_NUMBER: builtins.int
            PRECISION_FIELD_NUMBER: builtins.int
            SCALE_FIELD_NUMBER: builtins.int
            value: builtins.bytes
            'little-endian twos-complement integer representation of complete value\n            (ignoring precision) Always 16 bytes in length\n            '
            precision: builtins.int
            'The maximum number of digits allowed in the value.\n            the maximum precision is 38.\n            '
            scale: builtins.int
            'declared scale of decimal literal'

            def __init__(self, *, value: builtins.bytes=..., precision: builtins.int=..., scale: builtins.int=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['precision', b'precision', 'scale', b'scale', 'value', b'value']) -> None:
                ...

        class Map(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            class KeyValue(google.protobuf.message.Message):
                DESCRIPTOR: google.protobuf.descriptor.Descriptor
                KEY_FIELD_NUMBER: builtins.int
                VALUE_FIELD_NUMBER: builtins.int

                @property
                def key(self) -> global___Expression.Literal:
                    ...

                @property
                def value(self) -> global___Expression.Literal:
                    ...

                def __init__(self, *, key: typing.Optional[global___Expression.Literal]=..., value: typing.Optional[global___Expression.Literal]=...) -> None:
                    ...

                def HasField(self, field_name: typing_extensions.Literal['key', b'key', 'value', b'value']) -> builtins.bool:
                    ...

                def ClearField(self, field_name: typing_extensions.Literal['key', b'key', 'value', b'value']) -> None:
                    ...
            KEY_VALUES_FIELD_NUMBER: builtins.int

            @property
            def key_values(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression.Literal.Map.KeyValue]:
                ...

            def __init__(self, *, key_values: typing.Optional[typing.Iterable[global___Expression.Literal.Map.KeyValue]]=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['key_values', b'key_values']) -> None:
                ...

        class IntervalYearToMonth(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            YEARS_FIELD_NUMBER: builtins.int
            MONTHS_FIELD_NUMBER: builtins.int
            years: builtins.int
            months: builtins.int

            def __init__(self, *, years: builtins.int=..., months: builtins.int=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['months', b'months', 'years', b'years']) -> None:
                ...

        class IntervalDayToSecond(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            DAYS_FIELD_NUMBER: builtins.int
            SECONDS_FIELD_NUMBER: builtins.int
            days: builtins.int
            seconds: builtins.int

            def __init__(self, *, days: builtins.int=..., seconds: builtins.int=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['days', b'days', 'seconds', b'seconds']) -> None:
                ...

        class Struct(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            FIELDS_FIELD_NUMBER: builtins.int

            @property
            def fields(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression.Literal]:
                """A possibly heterogeneously typed list of literals"""
                pass

            def __init__(self, *, fields: typing.Optional[typing.Iterable[global___Expression.Literal]]=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['fields', b'fields']) -> None:
                ...

        class List(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            VALUES_FIELD_NUMBER: builtins.int

            @property
            def values(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression.Literal]:
                """A homogeneously typed list of literals"""
                pass

            def __init__(self, *, values: typing.Optional[typing.Iterable[global___Expression.Literal]]=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['values', b'values']) -> None:
                ...
        BOOLEAN_FIELD_NUMBER: builtins.int
        I8_FIELD_NUMBER: builtins.int
        I16_FIELD_NUMBER: builtins.int
        I32_FIELD_NUMBER: builtins.int
        I64_FIELD_NUMBER: builtins.int
        FP32_FIELD_NUMBER: builtins.int
        FP64_FIELD_NUMBER: builtins.int
        STRING_FIELD_NUMBER: builtins.int
        BINARY_FIELD_NUMBER: builtins.int
        TIMESTAMP_FIELD_NUMBER: builtins.int
        DATE_FIELD_NUMBER: builtins.int
        TIME_FIELD_NUMBER: builtins.int
        INTERVAL_YEAR_TO_MONTH_FIELD_NUMBER: builtins.int
        INTERVAL_DAY_TO_SECOND_FIELD_NUMBER: builtins.int
        FIXED_CHAR_FIELD_NUMBER: builtins.int
        VAR_CHAR_FIELD_NUMBER: builtins.int
        FIXED_BINARY_FIELD_NUMBER: builtins.int
        DECIMAL_FIELD_NUMBER: builtins.int
        STRUCT_FIELD_NUMBER: builtins.int
        MAP_FIELD_NUMBER: builtins.int
        TIMESTAMP_TZ_FIELD_NUMBER: builtins.int
        UUID_FIELD_NUMBER: builtins.int
        NULL_FIELD_NUMBER: builtins.int
        LIST_FIELD_NUMBER: builtins.int
        EMPTY_LIST_FIELD_NUMBER: builtins.int
        EMPTY_MAP_FIELD_NUMBER: builtins.int
        NULLABLE_FIELD_NUMBER: builtins.int
        boolean: builtins.bool
        i8: builtins.int
        i16: builtins.int
        i32: builtins.int
        i64: builtins.int
        fp32: builtins.float
        fp64: builtins.float
        string: typing.Text
        binary: builtins.bytes
        timestamp: builtins.int
        'Timestamp in units of microseconds since the UNIX epoch.'
        date: builtins.int
        'Date in units of days since the UNIX epoch.'
        time: builtins.int
        'Time in units of microseconds past midnight'

        @property
        def interval_year_to_month(self) -> global___Expression.Literal.IntervalYearToMonth:
            ...

        @property
        def interval_day_to_second(self) -> global___Expression.Literal.IntervalDayToSecond:
            ...
        fixed_char: typing.Text

        @property
        def var_char(self) -> global___Expression.Literal.VarChar:
            ...
        fixed_binary: builtins.bytes

        @property
        def decimal(self) -> global___Expression.Literal.Decimal:
            ...

        @property
        def struct(self) -> global___Expression.Literal.Struct:
            ...

        @property
        def map(self) -> global___Expression.Literal.Map:
            ...
        timestamp_tz: builtins.int
        'Timestamp in units of microseconds since the UNIX epoch.'
        uuid: builtins.bytes

        @property
        def null(self) -> substrait.type_pb2.Type:
            """a typed null literal"""
            pass

        @property
        def list(self) -> global___Expression.Literal.List:
            ...

        @property
        def empty_list(self) -> substrait.type_pb2.Type.List:
            ...

        @property
        def empty_map(self) -> substrait.type_pb2.Type.Map:
            ...
        nullable: builtins.bool
        'whether the literal type should be treated as a nullable type. Applies to\n        all members of union other than the Typed null (which should directly\n        declare nullability).\n        '

        def __init__(self, *, boolean: builtins.bool=..., i8: builtins.int=..., i16: builtins.int=..., i32: builtins.int=..., i64: builtins.int=..., fp32: builtins.float=..., fp64: builtins.float=..., string: typing.Text=..., binary: builtins.bytes=..., timestamp: builtins.int=..., date: builtins.int=..., time: builtins.int=..., interval_year_to_month: typing.Optional[global___Expression.Literal.IntervalYearToMonth]=..., interval_day_to_second: typing.Optional[global___Expression.Literal.IntervalDayToSecond]=..., fixed_char: typing.Text=..., var_char: typing.Optional[global___Expression.Literal.VarChar]=..., fixed_binary: builtins.bytes=..., decimal: typing.Optional[global___Expression.Literal.Decimal]=..., struct: typing.Optional[global___Expression.Literal.Struct]=..., map: typing.Optional[global___Expression.Literal.Map]=..., timestamp_tz: builtins.int=..., uuid: builtins.bytes=..., null: typing.Optional[substrait.type_pb2.Type]=..., list: typing.Optional[global___Expression.Literal.List]=..., empty_list: typing.Optional[substrait.type_pb2.Type.List]=..., empty_map: typing.Optional[substrait.type_pb2.Type.Map]=..., nullable: builtins.bool=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['binary', b'binary', 'boolean', b'boolean', 'date', b'date', 'decimal', b'decimal', 'empty_list', b'empty_list', 'empty_map', b'empty_map', '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_day_to_second', b'interval_day_to_second', 'interval_year_to_month', b'interval_year_to_month', 'list', b'list', 'literal_type', b'literal_type', 'map', b'map', 'null', b'null', 'string', b'string', 'struct', b'struct', 'time', b'time', 'timestamp', b'timestamp', 'timestamp_tz', b'timestamp_tz', 'uuid', b'uuid', 'var_char', b'var_char']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['binary', b'binary', 'boolean', b'boolean', 'date', b'date', 'decimal', b'decimal', 'empty_list', b'empty_list', 'empty_map', b'empty_map', '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_day_to_second', b'interval_day_to_second', 'interval_year_to_month', b'interval_year_to_month', 'list', b'list', 'literal_type', b'literal_type', 'map', b'map', 'null', b'null', 'nullable', b'nullable', 'string', b'string', 'struct', b'struct', 'time', b'time', 'timestamp', b'timestamp', 'timestamp_tz', b'timestamp_tz', 'uuid', b'uuid', 'var_char', b'var_char']) -> None:
            ...

        def WhichOneof(self, oneof_group: typing_extensions.Literal['literal_type', b'literal_type']) -> typing.Optional[typing_extensions.Literal['boolean', 'i8', 'i16', 'i32', 'i64', 'fp32', 'fp64', 'string', 'binary', 'timestamp', 'date', 'time', 'interval_year_to_month', 'interval_day_to_second', 'fixed_char', 'var_char', 'fixed_binary', 'decimal', 'struct', 'map', 'timestamp_tz', 'uuid', 'null', 'list', 'empty_list', 'empty_map']]:
            ...

    class ScalarFunction(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        FUNCTION_REFERENCE_FIELD_NUMBER: builtins.int
        ARGS_FIELD_NUMBER: builtins.int
        OUTPUT_TYPE_FIELD_NUMBER: builtins.int
        function_reference: builtins.int
        'points to a function_anchor defined in this plan'

        @property
        def args(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
            ...

        @property
        def output_type(self) -> substrait.type_pb2.Type:
            ...

        def __init__(self, *, function_reference: builtins.int=..., args: typing.Optional[typing.Iterable[global___Expression]]=..., output_type: typing.Optional[substrait.type_pb2.Type]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['output_type', b'output_type']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['args', b'args', 'function_reference', b'function_reference', 'output_type', b'output_type']) -> None:
            ...

    class WindowFunction(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class Bound(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            class Preceding(google.protobuf.message.Message):
                DESCRIPTOR: google.protobuf.descriptor.Descriptor
                OFFSET_FIELD_NUMBER: builtins.int
                offset: builtins.int

                def __init__(self, *, offset: builtins.int=...) -> None:
                    ...

                def ClearField(self, field_name: typing_extensions.Literal['offset', b'offset']) -> None:
                    ...

            class Following(google.protobuf.message.Message):
                DESCRIPTOR: google.protobuf.descriptor.Descriptor
                OFFSET_FIELD_NUMBER: builtins.int
                offset: builtins.int

                def __init__(self, *, offset: builtins.int=...) -> None:
                    ...

                def ClearField(self, field_name: typing_extensions.Literal['offset', b'offset']) -> None:
                    ...

            class CurrentRow(google.protobuf.message.Message):
                DESCRIPTOR: google.protobuf.descriptor.Descriptor

                def __init__(self) -> None:
                    ...

            class Unbounded(google.protobuf.message.Message):
                DESCRIPTOR: google.protobuf.descriptor.Descriptor

                def __init__(self) -> None:
                    ...
            PRECEDING_FIELD_NUMBER: builtins.int
            FOLLOWING_FIELD_NUMBER: builtins.int
            CURRENT_ROW_FIELD_NUMBER: builtins.int
            UNBOUNDED_FIELD_NUMBER: builtins.int

            @property
            def preceding(self) -> global___Expression.WindowFunction.Bound.Preceding:
                ...

            @property
            def following(self) -> global___Expression.WindowFunction.Bound.Following:
                ...

            @property
            def current_row(self) -> global___Expression.WindowFunction.Bound.CurrentRow:
                ...

            @property
            def unbounded(self) -> global___Expression.WindowFunction.Bound.Unbounded:
                ...

            def __init__(self, *, preceding: typing.Optional[global___Expression.WindowFunction.Bound.Preceding]=..., following: typing.Optional[global___Expression.WindowFunction.Bound.Following]=..., current_row: typing.Optional[global___Expression.WindowFunction.Bound.CurrentRow]=..., unbounded: typing.Optional[global___Expression.WindowFunction.Bound.Unbounded]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['current_row', b'current_row', 'following', b'following', 'kind', b'kind', 'preceding', b'preceding', 'unbounded', b'unbounded']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['current_row', b'current_row', 'following', b'following', 'kind', b'kind', 'preceding', b'preceding', 'unbounded', b'unbounded']) -> None:
                ...

            def WhichOneof(self, oneof_group: typing_extensions.Literal['kind', b'kind']) -> typing.Optional[typing_extensions.Literal['preceding', 'following', 'current_row', 'unbounded']]:
                ...
        FUNCTION_REFERENCE_FIELD_NUMBER: builtins.int
        PARTITIONS_FIELD_NUMBER: builtins.int
        SORTS_FIELD_NUMBER: builtins.int
        UPPER_BOUND_FIELD_NUMBER: builtins.int
        LOWER_BOUND_FIELD_NUMBER: builtins.int
        PHASE_FIELD_NUMBER: builtins.int
        OUTPUT_TYPE_FIELD_NUMBER: builtins.int
        ARGS_FIELD_NUMBER: builtins.int
        function_reference: builtins.int
        'points to a function_anchor defined in this plan'

        @property
        def partitions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
            ...

        @property
        def sorts(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SortField]:
            ...

        @property
        def upper_bound(self) -> global___Expression.WindowFunction.Bound:
            ...

        @property
        def lower_bound(self) -> global___Expression.WindowFunction.Bound:
            ...
        phase: global___AggregationPhase.ValueType

        @property
        def output_type(self) -> substrait.type_pb2.Type:
            ...

        @property
        def args(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
            ...

        def __init__(self, *, function_reference: builtins.int=..., partitions: typing.Optional[typing.Iterable[global___Expression]]=..., sorts: typing.Optional[typing.Iterable[global___SortField]]=..., upper_bound: typing.Optional[global___Expression.WindowFunction.Bound]=..., lower_bound: typing.Optional[global___Expression.WindowFunction.Bound]=..., phase: global___AggregationPhase.ValueType=..., output_type: typing.Optional[substrait.type_pb2.Type]=..., args: typing.Optional[typing.Iterable[global___Expression]]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['lower_bound', b'lower_bound', 'output_type', b'output_type', 'upper_bound', b'upper_bound']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['args', b'args', 'function_reference', b'function_reference', 'lower_bound', b'lower_bound', 'output_type', b'output_type', 'partitions', b'partitions', 'phase', b'phase', 'sorts', b'sorts', 'upper_bound', b'upper_bound']) -> None:
            ...

    class IfThen(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class IfClause(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            IF_FIELD_NUMBER: builtins.int
            THEN_FIELD_NUMBER: builtins.int

            @property
            def then(self) -> global___Expression:
                ...

            def __init__(self, *, then: typing.Optional[global___Expression]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['if', b'if', 'then', b'then']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['if', b'if', 'then', b'then']) -> None:
                ...
        IFS_FIELD_NUMBER: builtins.int
        ELSE_FIELD_NUMBER: builtins.int

        @property
        def ifs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression.IfThen.IfClause]:
            ...

        def __init__(self, *, ifs: typing.Optional[typing.Iterable[global___Expression.IfThen.IfClause]]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['else', b'else']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['else', b'else', 'ifs', b'ifs']) -> None:
            ...

    class Cast(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        TYPE_FIELD_NUMBER: builtins.int
        INPUT_FIELD_NUMBER: builtins.int

        @property
        def type(self) -> substrait.type_pb2.Type:
            ...

        @property
        def input(self) -> global___Expression:
            ...

        def __init__(self, *, type: typing.Optional[substrait.type_pb2.Type]=..., input: typing.Optional[global___Expression]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['input', b'input', 'type', b'type']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['input', b'input', 'type', b'type']) -> None:
            ...

    class SwitchExpression(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class IfValue(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            IF_FIELD_NUMBER: builtins.int
            THEN_FIELD_NUMBER: builtins.int

            @property
            def then(self) -> global___Expression:
                ...

            def __init__(self, *, then: typing.Optional[global___Expression]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['if', b'if', 'then', b'then']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['if', b'if', 'then', b'then']) -> None:
                ...
        IFS_FIELD_NUMBER: builtins.int
        ELSE_FIELD_NUMBER: builtins.int

        @property
        def ifs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression.SwitchExpression.IfValue]:
            ...

        def __init__(self, *, ifs: typing.Optional[typing.Iterable[global___Expression.SwitchExpression.IfValue]]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['else', b'else']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['else', b'else', 'ifs', b'ifs']) -> None:
            ...

    class SingularOrList(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        VALUE_FIELD_NUMBER: builtins.int
        OPTIONS_FIELD_NUMBER: builtins.int

        @property
        def value(self) -> global___Expression:
            ...

        @property
        def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
            ...

        def __init__(self, *, value: typing.Optional[global___Expression]=..., options: typing.Optional[typing.Iterable[global___Expression]]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['value', b'value']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['options', b'options', 'value', b'value']) -> None:
            ...

    class MultiOrList(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class Record(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            FIELDS_FIELD_NUMBER: builtins.int

            @property
            def fields(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
                ...

            def __init__(self, *, fields: typing.Optional[typing.Iterable[global___Expression]]=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['fields', b'fields']) -> None:
                ...
        VALUE_FIELD_NUMBER: builtins.int
        OPTIONS_FIELD_NUMBER: builtins.int

        @property
        def value(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
            ...

        @property
        def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression.MultiOrList.Record]:
            ...

        def __init__(self, *, value: typing.Optional[typing.Iterable[global___Expression]]=..., options: typing.Optional[typing.Iterable[global___Expression.MultiOrList.Record]]=...) -> None:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['options', b'options', 'value', b'value']) -> None:
            ...

    class EmbeddedFunction(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class PythonPickleFunction(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            FUNCTION_FIELD_NUMBER: builtins.int
            PREREQUISITE_FIELD_NUMBER: builtins.int
            function: builtins.bytes

            @property
            def prerequisite(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
                ...

            def __init__(self, *, function: builtins.bytes=..., prerequisite: typing.Optional[typing.Iterable[typing.Text]]=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['function', b'function', 'prerequisite', b'prerequisite']) -> None:
                ...

        class WebAssemblyFunction(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            SCRIPT_FIELD_NUMBER: builtins.int
            PREREQUISITE_FIELD_NUMBER: builtins.int
            script: builtins.bytes

            @property
            def prerequisite(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
                ...

            def __init__(self, *, script: builtins.bytes=..., prerequisite: typing.Optional[typing.Iterable[typing.Text]]=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['prerequisite', b'prerequisite', 'script', b'script']) -> None:
                ...
        ARGUMENTS_FIELD_NUMBER: builtins.int
        OUTPUT_TYPE_FIELD_NUMBER: builtins.int
        PYTHON_PICKLE_FUNCTION_FIELD_NUMBER: builtins.int
        WEB_ASSEMBLY_FUNCTION_FIELD_NUMBER: builtins.int

        @property
        def arguments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
            ...

        @property
        def output_type(self) -> substrait.type_pb2.Type:
            ...

        @property
        def python_pickle_function(self) -> global___Expression.EmbeddedFunction.PythonPickleFunction:
            ...

        @property
        def web_assembly_function(self) -> global___Expression.EmbeddedFunction.WebAssemblyFunction:
            ...

        def __init__(self, *, arguments: typing.Optional[typing.Iterable[global___Expression]]=..., output_type: typing.Optional[substrait.type_pb2.Type]=..., python_pickle_function: typing.Optional[global___Expression.EmbeddedFunction.PythonPickleFunction]=..., web_assembly_function: typing.Optional[global___Expression.EmbeddedFunction.WebAssemblyFunction]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['kind', b'kind', 'output_type', b'output_type', 'python_pickle_function', b'python_pickle_function', 'web_assembly_function', b'web_assembly_function']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['arguments', b'arguments', 'kind', b'kind', 'output_type', b'output_type', 'python_pickle_function', b'python_pickle_function', 'web_assembly_function', b'web_assembly_function']) -> None:
            ...

        def WhichOneof(self, oneof_group: typing_extensions.Literal['kind', b'kind']) -> typing.Optional[typing_extensions.Literal['python_pickle_function', 'web_assembly_function']]:
            ...

    class ReferenceSegment(google.protobuf.message.Message):
        """A way to reference the inner property of a complex record. Can reference
        either a map key by literal, a struct field by the ordinal position of
        the desired field or a particular element in an array. Supports
        expressions that would roughly translate to something similar to:
        a.b[2].c['my_map_key'].x where a,b,c and x are struct field references
        (ordinalized in the internal representation here), [2] is a list offset
        and ['my_map_key'] is a reference into a map field.
        """
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class MapKey(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            MAP_KEY_FIELD_NUMBER: builtins.int
            CHILD_FIELD_NUMBER: builtins.int

            @property
            def map_key(self) -> global___Expression.Literal:
                """literal based reference to specific possible value in map."""
                pass

            @property
            def child(self) -> global___Expression.ReferenceSegment:
                """Optional child segment"""
                pass

            def __init__(self, *, map_key: typing.Optional[global___Expression.Literal]=..., child: typing.Optional[global___Expression.ReferenceSegment]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['child', b'child', 'map_key', b'map_key']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['child', b'child', 'map_key', b'map_key']) -> None:
                ...

        class StructField(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            FIELD_FIELD_NUMBER: builtins.int
            CHILD_FIELD_NUMBER: builtins.int
            field: builtins.int
            'zero-indexed ordinal position of field in struct'

            @property
            def child(self) -> global___Expression.ReferenceSegment:
                """Optional child segment"""
                pass

            def __init__(self, *, field: builtins.int=..., child: typing.Optional[global___Expression.ReferenceSegment]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['child', b'child']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['child', b'child', 'field', b'field']) -> None:
                ...

        class ListElement(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            OFFSET_FIELD_NUMBER: builtins.int
            CHILD_FIELD_NUMBER: builtins.int
            offset: builtins.int
            'zero-indexed ordinal position of element in list'

            @property
            def child(self) -> global___Expression.ReferenceSegment:
                """Optional child segment"""
                pass

            def __init__(self, *, offset: builtins.int=..., child: typing.Optional[global___Expression.ReferenceSegment]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['child', b'child']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['child', b'child', 'offset', b'offset']) -> None:
                ...
        MAP_KEY_FIELD_NUMBER: builtins.int
        STRUCT_FIELD_FIELD_NUMBER: builtins.int
        LIST_ELEMENT_FIELD_NUMBER: builtins.int

        @property
        def map_key(self) -> global___Expression.ReferenceSegment.MapKey:
            ...

        @property
        def struct_field(self) -> global___Expression.ReferenceSegment.StructField:
            ...

        @property
        def list_element(self) -> global___Expression.ReferenceSegment.ListElement:
            ...

        def __init__(self, *, map_key: typing.Optional[global___Expression.ReferenceSegment.MapKey]=..., struct_field: typing.Optional[global___Expression.ReferenceSegment.StructField]=..., list_element: typing.Optional[global___Expression.ReferenceSegment.ListElement]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['list_element', b'list_element', 'map_key', b'map_key', 'reference_type', b'reference_type', 'struct_field', b'struct_field']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['list_element', b'list_element', 'map_key', b'map_key', 'reference_type', b'reference_type', 'struct_field', b'struct_field']) -> None:
            ...

        def WhichOneof(self, oneof_group: typing_extensions.Literal['reference_type', b'reference_type']) -> typing.Optional[typing_extensions.Literal['map_key', 'struct_field', 'list_element']]:
            ...

    class MaskExpression(google.protobuf.message.Message):
        """A reference that takes an existing subtype and selectively removes fields
        from it. For example, one might initially have an inner struct with 100
        fields but a a particular operation only needs to interact with only 2 of
        those 100 fields. In this situation, one would use a mask expression to
        eliminate the 98 fields that are not relevant to the rest of the operation
        pipeline.

        Note that this does not fundamentally alter the structure of data beyond
        the elimination of unecessary elements.
        """
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class Select(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            STRUCT_FIELD_NUMBER: builtins.int
            LIST_FIELD_NUMBER: builtins.int
            MAP_FIELD_NUMBER: builtins.int

            @property
            def struct(self) -> global___Expression.MaskExpression.StructSelect:
                ...

            @property
            def list(self) -> global___Expression.MaskExpression.ListSelect:
                ...

            @property
            def map(self) -> global___Expression.MaskExpression.MapSelect:
                ...

            def __init__(self, *, struct: typing.Optional[global___Expression.MaskExpression.StructSelect]=..., list: typing.Optional[global___Expression.MaskExpression.ListSelect]=..., map: typing.Optional[global___Expression.MaskExpression.MapSelect]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['list', b'list', 'map', b'map', 'struct', b'struct', 'type', b'type']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['list', b'list', 'map', b'map', 'struct', b'struct', 'type', b'type']) -> None:
                ...

            def WhichOneof(self, oneof_group: typing_extensions.Literal['type', b'type']) -> typing.Optional[typing_extensions.Literal['struct', 'list', 'map']]:
                ...

        class StructSelect(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            STRUCT_ITEMS_FIELD_NUMBER: builtins.int

            @property
            def struct_items(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression.MaskExpression.StructItem]:
                ...

            def __init__(self, *, struct_items: typing.Optional[typing.Iterable[global___Expression.MaskExpression.StructItem]]=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['struct_items', b'struct_items']) -> None:
                ...

        class StructItem(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            FIELD_FIELD_NUMBER: builtins.int
            CHILD_FIELD_NUMBER: builtins.int
            field: builtins.int

            @property
            def child(self) -> global___Expression.MaskExpression.Select:
                ...

            def __init__(self, *, field: builtins.int=..., child: typing.Optional[global___Expression.MaskExpression.Select]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['child', b'child']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['child', b'child', 'field', b'field']) -> None:
                ...

        class ListSelect(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            class ListSelectItem(google.protobuf.message.Message):
                DESCRIPTOR: google.protobuf.descriptor.Descriptor

                class ListElement(google.protobuf.message.Message):
                    DESCRIPTOR: google.protobuf.descriptor.Descriptor
                    FIELD_FIELD_NUMBER: builtins.int
                    field: builtins.int

                    def __init__(self, *, field: builtins.int=...) -> None:
                        ...

                    def ClearField(self, field_name: typing_extensions.Literal['field', b'field']) -> None:
                        ...

                class ListSlice(google.protobuf.message.Message):
                    DESCRIPTOR: google.protobuf.descriptor.Descriptor
                    START_FIELD_NUMBER: builtins.int
                    END_FIELD_NUMBER: builtins.int
                    start: builtins.int
                    end: builtins.int

                    def __init__(self, *, start: builtins.int=..., end: builtins.int=...) -> None:
                        ...

                    def ClearField(self, field_name: typing_extensions.Literal['end', b'end', 'start', b'start']) -> None:
                        ...
                ITEM_FIELD_NUMBER: builtins.int
                SLICE_FIELD_NUMBER: builtins.int

                @property
                def item(self) -> global___Expression.MaskExpression.ListSelect.ListSelectItem.ListElement:
                    ...

                @property
                def slice(self) -> global___Expression.MaskExpression.ListSelect.ListSelectItem.ListSlice:
                    ...

                def __init__(self, *, item: typing.Optional[global___Expression.MaskExpression.ListSelect.ListSelectItem.ListElement]=..., slice: typing.Optional[global___Expression.MaskExpression.ListSelect.ListSelectItem.ListSlice]=...) -> None:
                    ...

                def HasField(self, field_name: typing_extensions.Literal['item', b'item', 'slice', b'slice', 'type', b'type']) -> builtins.bool:
                    ...

                def ClearField(self, field_name: typing_extensions.Literal['item', b'item', 'slice', b'slice', 'type', b'type']) -> None:
                    ...

                def WhichOneof(self, oneof_group: typing_extensions.Literal['type', b'type']) -> typing.Optional[typing_extensions.Literal['item', 'slice']]:
                    ...
            SELECTION_FIELD_NUMBER: builtins.int
            CHILD_FIELD_NUMBER: builtins.int

            @property
            def selection(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression.MaskExpression.ListSelect.ListSelectItem]:
                ...

            @property
            def child(self) -> global___Expression.MaskExpression.Select:
                ...

            def __init__(self, *, selection: typing.Optional[typing.Iterable[global___Expression.MaskExpression.ListSelect.ListSelectItem]]=..., child: typing.Optional[global___Expression.MaskExpression.Select]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['child', b'child']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['child', b'child', 'selection', b'selection']) -> None:
                ...

        class MapSelect(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            class MapKey(google.protobuf.message.Message):
                DESCRIPTOR: google.protobuf.descriptor.Descriptor
                MAP_KEY_FIELD_NUMBER: builtins.int
                map_key: typing.Text

                def __init__(self, *, map_key: typing.Text=...) -> None:
                    ...

                def ClearField(self, field_name: typing_extensions.Literal['map_key', b'map_key']) -> None:
                    ...

            class MapKeyExpression(google.protobuf.message.Message):
                DESCRIPTOR: google.protobuf.descriptor.Descriptor
                MAP_KEY_EXPRESSION_FIELD_NUMBER: builtins.int
                map_key_expression: typing.Text

                def __init__(self, *, map_key_expression: typing.Text=...) -> None:
                    ...

                def ClearField(self, field_name: typing_extensions.Literal['map_key_expression', b'map_key_expression']) -> None:
                    ...
            KEY_FIELD_NUMBER: builtins.int
            EXPRESSION_FIELD_NUMBER: builtins.int
            CHILD_FIELD_NUMBER: builtins.int

            @property
            def key(self) -> global___Expression.MaskExpression.MapSelect.MapKey:
                ...

            @property
            def expression(self) -> global___Expression.MaskExpression.MapSelect.MapKeyExpression:
                ...

            @property
            def child(self) -> global___Expression.MaskExpression.Select:
                ...

            def __init__(self, *, key: typing.Optional[global___Expression.MaskExpression.MapSelect.MapKey]=..., expression: typing.Optional[global___Expression.MaskExpression.MapSelect.MapKeyExpression]=..., child: typing.Optional[global___Expression.MaskExpression.Select]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['child', b'child', 'expression', b'expression', 'key', b'key', 'select', b'select']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['child', b'child', 'expression', b'expression', 'key', b'key', 'select', b'select']) -> None:
                ...

            def WhichOneof(self, oneof_group: typing_extensions.Literal['select', b'select']) -> typing.Optional[typing_extensions.Literal['key', 'expression']]:
                ...
        SELECT_FIELD_NUMBER: builtins.int
        MAINTAIN_SINGULAR_STRUCT_FIELD_NUMBER: builtins.int

        @property
        def select(self) -> global___Expression.MaskExpression.StructSelect:
            ...
        maintain_singular_struct: builtins.bool

        def __init__(self, *, select: typing.Optional[global___Expression.MaskExpression.StructSelect]=..., maintain_singular_struct: builtins.bool=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['select', b'select']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['maintain_singular_struct', b'maintain_singular_struct', 'select', b'select']) -> None:
            ...

    class FieldReference(google.protobuf.message.Message):
        """A reference to an inner part of a complex object. Can reference reference a
        single element or a masked version of elements
        """
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class RootReference(google.protobuf.message.Message):
            """Singleton that expresses this FieldReference is rooted off the root
            incoming record type
            """
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            def __init__(self) -> None:
                ...

        class OuterReference(google.protobuf.message.Message):
            """A root reference for the outer relation's subquery"""
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            STEPS_OUT_FIELD_NUMBER: builtins.int
            steps_out: builtins.int
            "number of subquery boundaries to traverse up for this field's reference\n\n            This value must be >= 1\n            "

            def __init__(self, *, steps_out: builtins.int=...) -> None:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['steps_out', b'steps_out']) -> None:
                ...
        DIRECT_REFERENCE_FIELD_NUMBER: builtins.int
        MASKED_REFERENCE_FIELD_NUMBER: builtins.int
        EXPRESSION_FIELD_NUMBER: builtins.int
        ROOT_REFERENCE_FIELD_NUMBER: builtins.int
        OUTER_REFERENCE_FIELD_NUMBER: builtins.int

        @property
        def direct_reference(self) -> global___Expression.ReferenceSegment:
            ...

        @property
        def masked_reference(self) -> global___Expression.MaskExpression:
            ...

        @property
        def expression(self) -> global___Expression:
            ...

        @property
        def root_reference(self) -> global___Expression.FieldReference.RootReference:
            ...

        @property
        def outer_reference(self) -> global___Expression.FieldReference.OuterReference:
            ...

        def __init__(self, *, direct_reference: typing.Optional[global___Expression.ReferenceSegment]=..., masked_reference: typing.Optional[global___Expression.MaskExpression]=..., expression: typing.Optional[global___Expression]=..., root_reference: typing.Optional[global___Expression.FieldReference.RootReference]=..., outer_reference: typing.Optional[global___Expression.FieldReference.OuterReference]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['direct_reference', b'direct_reference', 'expression', b'expression', 'masked_reference', b'masked_reference', 'outer_reference', b'outer_reference', 'reference_type', b'reference_type', 'root_reference', b'root_reference', 'root_type', b'root_type']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['direct_reference', b'direct_reference', 'expression', b'expression', 'masked_reference', b'masked_reference', 'outer_reference', b'outer_reference', 'reference_type', b'reference_type', 'root_reference', b'root_reference', 'root_type', b'root_type']) -> None:
            ...

        @typing.overload
        def WhichOneof(self, oneof_group: typing_extensions.Literal['reference_type', b'reference_type']) -> typing.Optional[typing_extensions.Literal['direct_reference', 'masked_reference']]:
            ...

        @typing.overload
        def WhichOneof(self, oneof_group: typing_extensions.Literal['root_type', b'root_type']) -> typing.Optional[typing_extensions.Literal['expression', 'root_reference', 'outer_reference']]:
            ...

    class Subquery(google.protobuf.message.Message):
        """Subquery relation expression"""
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class Scalar(google.protobuf.message.Message):
            """A subquery with one row and one column. This is often an aggregate
            though not required to be.
            """
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            INPUT_FIELD_NUMBER: builtins.int

            @property
            def input(self) -> global___Rel:
                ...

            def __init__(self, *, input: typing.Optional[global___Rel]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['input', b'input']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['input', b'input']) -> None:
                ...

        class InPredicate(google.protobuf.message.Message):
            """Predicate checking that the left expression is contained in the right
            subquery

            Examples:

            x IN (SELECT * FROM t)
            (x, y) IN (SELECT a, b FROM t)
            """
            DESCRIPTOR: google.protobuf.descriptor.Descriptor
            NEEDLES_FIELD_NUMBER: builtins.int
            HAYSTACK_FIELD_NUMBER: builtins.int

            @property
            def needles(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
                ...

            @property
            def haystack(self) -> global___Rel:
                ...

            def __init__(self, *, needles: typing.Optional[typing.Iterable[global___Expression]]=..., haystack: typing.Optional[global___Rel]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['haystack', b'haystack']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['haystack', b'haystack', 'needles', b'needles']) -> None:
                ...

        class SetPredicate(google.protobuf.message.Message):
            """A predicate over a set of rows in the form of a subquery
            EXISTS and UNIQUE are common SQL forms of this operation.
            """
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            class _PredicateOp:
                ValueType = typing.NewType('ValueType', builtins.int)
                V: typing_extensions.TypeAlias = ValueType

            class _PredicateOpEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Expression.Subquery.SetPredicate._PredicateOp.ValueType], builtins.type):
                DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
                PREDICATE_OP_UNSPECIFIED: Expression.Subquery.SetPredicate._PredicateOp.ValueType
                PREDICATE_OP_EXISTS: Expression.Subquery.SetPredicate._PredicateOp.ValueType
                PREDICATE_OP_UNIQUE: Expression.Subquery.SetPredicate._PredicateOp.ValueType

            class PredicateOp(_PredicateOp, metaclass=_PredicateOpEnumTypeWrapper):
                pass
            PREDICATE_OP_UNSPECIFIED: Expression.Subquery.SetPredicate.PredicateOp.ValueType
            PREDICATE_OP_EXISTS: Expression.Subquery.SetPredicate.PredicateOp.ValueType
            PREDICATE_OP_UNIQUE: Expression.Subquery.SetPredicate.PredicateOp.ValueType
            PREDICATE_OP_FIELD_NUMBER: builtins.int
            TUPLES_FIELD_NUMBER: builtins.int
            predicate_op: global___Expression.Subquery.SetPredicate.PredicateOp.ValueType
            'TODO: should allow expressions'

            @property
            def tuples(self) -> global___Rel:
                ...

            def __init__(self, *, predicate_op: global___Expression.Subquery.SetPredicate.PredicateOp.ValueType=..., tuples: typing.Optional[global___Rel]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['tuples', b'tuples']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['predicate_op', b'predicate_op', 'tuples', b'tuples']) -> None:
                ...

        class SetComparison(google.protobuf.message.Message):
            """A subquery comparison using ANY or ALL.
            Examples:

            SELECT *
            FROM t1
            WHERE x < ANY(SELECT y from t2)
            """
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            class _ComparisonOp:
                ValueType = typing.NewType('ValueType', builtins.int)
                V: typing_extensions.TypeAlias = ValueType

            class _ComparisonOpEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Expression.Subquery.SetComparison._ComparisonOp.ValueType], builtins.type):
                DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
                COMPARISON_OP_UNSPECIFIED: Expression.Subquery.SetComparison._ComparisonOp.ValueType
                COMPARISON_OP_EQ: Expression.Subquery.SetComparison._ComparisonOp.ValueType
                COMPARISON_OP_NE: Expression.Subquery.SetComparison._ComparisonOp.ValueType
                COMPARISON_OP_LT: Expression.Subquery.SetComparison._ComparisonOp.ValueType
                COMPARISON_OP_GT: Expression.Subquery.SetComparison._ComparisonOp.ValueType
                COMPARISON_OP_LE: Expression.Subquery.SetComparison._ComparisonOp.ValueType
                COMPARISON_OP_GE: Expression.Subquery.SetComparison._ComparisonOp.ValueType

            class ComparisonOp(_ComparisonOp, metaclass=_ComparisonOpEnumTypeWrapper):
                pass
            COMPARISON_OP_UNSPECIFIED: Expression.Subquery.SetComparison.ComparisonOp.ValueType
            COMPARISON_OP_EQ: Expression.Subquery.SetComparison.ComparisonOp.ValueType
            COMPARISON_OP_NE: Expression.Subquery.SetComparison.ComparisonOp.ValueType
            COMPARISON_OP_LT: Expression.Subquery.SetComparison.ComparisonOp.ValueType
            COMPARISON_OP_GT: Expression.Subquery.SetComparison.ComparisonOp.ValueType
            COMPARISON_OP_LE: Expression.Subquery.SetComparison.ComparisonOp.ValueType
            COMPARISON_OP_GE: Expression.Subquery.SetComparison.ComparisonOp.ValueType

            class _ReductionOp:
                ValueType = typing.NewType('ValueType', builtins.int)
                V: typing_extensions.TypeAlias = ValueType

            class _ReductionOpEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Expression.Subquery.SetComparison._ReductionOp.ValueType], builtins.type):
                DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
                REDUCTION_OP_UNSPECIFIED: Expression.Subquery.SetComparison._ReductionOp.ValueType
                REDUCTION_OP_ANY: Expression.Subquery.SetComparison._ReductionOp.ValueType
                REDUCTION_OP_ALL: Expression.Subquery.SetComparison._ReductionOp.ValueType

            class ReductionOp(_ReductionOp, metaclass=_ReductionOpEnumTypeWrapper):
                pass
            REDUCTION_OP_UNSPECIFIED: Expression.Subquery.SetComparison.ReductionOp.ValueType
            REDUCTION_OP_ANY: Expression.Subquery.SetComparison.ReductionOp.ValueType
            REDUCTION_OP_ALL: Expression.Subquery.SetComparison.ReductionOp.ValueType
            REDUCTION_OP_FIELD_NUMBER: builtins.int
            COMPARISON_OP_FIELD_NUMBER: builtins.int
            LEFT_FIELD_NUMBER: builtins.int
            RIGHT_FIELD_NUMBER: builtins.int
            reduction_op: global___Expression.Subquery.SetComparison.ReductionOp.ValueType
            'ANY or ALL'
            comparison_op: global___Expression.Subquery.SetComparison.ComparisonOp.ValueType
            'A comparison operator'

            @property
            def left(self) -> global___Expression:
                """left side of the expression"""
                pass

            @property
            def right(self) -> global___Rel:
                """right side of the expression"""
                pass

            def __init__(self, *, reduction_op: global___Expression.Subquery.SetComparison.ReductionOp.ValueType=..., comparison_op: global___Expression.Subquery.SetComparison.ComparisonOp.ValueType=..., left: typing.Optional[global___Expression]=..., right: typing.Optional[global___Rel]=...) -> None:
                ...

            def HasField(self, field_name: typing_extensions.Literal['left', b'left', 'right', b'right']) -> builtins.bool:
                ...

            def ClearField(self, field_name: typing_extensions.Literal['comparison_op', b'comparison_op', 'left', b'left', 'reduction_op', b'reduction_op', 'right', b'right']) -> None:
                ...
        SCALAR_FIELD_NUMBER: builtins.int
        IN_PREDICATE_FIELD_NUMBER: builtins.int
        SET_PREDICATE_FIELD_NUMBER: builtins.int
        SET_COMPARISON_FIELD_NUMBER: builtins.int

        @property
        def scalar(self) -> global___Expression.Subquery.Scalar:
            """Scalar subquery"""
            pass

        @property
        def in_predicate(self) -> global___Expression.Subquery.InPredicate:
            """x IN y predicate"""
            pass

        @property
        def set_predicate(self) -> global___Expression.Subquery.SetPredicate:
            """EXISTS/UNIQUE predicate"""
            pass

        @property
        def set_comparison(self) -> global___Expression.Subquery.SetComparison:
            """ANY/ALL predicate"""
            pass

        def __init__(self, *, scalar: typing.Optional[global___Expression.Subquery.Scalar]=..., in_predicate: typing.Optional[global___Expression.Subquery.InPredicate]=..., set_predicate: typing.Optional[global___Expression.Subquery.SetPredicate]=..., set_comparison: typing.Optional[global___Expression.Subquery.SetComparison]=...) -> None:
            ...

        def HasField(self, field_name: typing_extensions.Literal['in_predicate', b'in_predicate', 'scalar', b'scalar', 'set_comparison', b'set_comparison', 'set_predicate', b'set_predicate', 'subquery_type', b'subquery_type']) -> builtins.bool:
            ...

        def ClearField(self, field_name: typing_extensions.Literal['in_predicate', b'in_predicate', 'scalar', b'scalar', 'set_comparison', b'set_comparison', 'set_predicate', b'set_predicate', 'subquery_type', b'subquery_type']) -> None:
            ...

        def WhichOneof(self, oneof_group: typing_extensions.Literal['subquery_type', b'subquery_type']) -> typing.Optional[typing_extensions.Literal['scalar', 'in_predicate', 'set_predicate', 'set_comparison']]:
            ...
    LITERAL_FIELD_NUMBER: builtins.int
    SELECTION_FIELD_NUMBER: builtins.int
    SCALAR_FUNCTION_FIELD_NUMBER: builtins.int
    WINDOW_FUNCTION_FIELD_NUMBER: builtins.int
    IF_THEN_FIELD_NUMBER: builtins.int
    SWITCH_EXPRESSION_FIELD_NUMBER: builtins.int
    SINGULAR_OR_LIST_FIELD_NUMBER: builtins.int
    MULTI_OR_LIST_FIELD_NUMBER: builtins.int
    ENUM_FIELD_NUMBER: builtins.int
    CAST_FIELD_NUMBER: builtins.int
    SUBQUERY_FIELD_NUMBER: builtins.int

    @property
    def literal(self) -> global___Expression.Literal:
        ...

    @property
    def selection(self) -> global___Expression.FieldReference:
        ...

    @property
    def scalar_function(self) -> global___Expression.ScalarFunction:
        ...

    @property
    def window_function(self) -> global___Expression.WindowFunction:
        ...

    @property
    def if_then(self) -> global___Expression.IfThen:
        ...

    @property
    def switch_expression(self) -> global___Expression.SwitchExpression:
        ...

    @property
    def singular_or_list(self) -> global___Expression.SingularOrList:
        ...

    @property
    def multi_or_list(self) -> global___Expression.MultiOrList:
        ...

    @property
    def enum(self) -> global___Expression.Enum:
        ...

    @property
    def cast(self) -> global___Expression.Cast:
        ...

    @property
    def subquery(self) -> global___Expression.Subquery:
        ...

    def __init__(self, *, literal: typing.Optional[global___Expression.Literal]=..., selection: typing.Optional[global___Expression.FieldReference]=..., scalar_function: typing.Optional[global___Expression.ScalarFunction]=..., window_function: typing.Optional[global___Expression.WindowFunction]=..., if_then: typing.Optional[global___Expression.IfThen]=..., switch_expression: typing.Optional[global___Expression.SwitchExpression]=..., singular_or_list: typing.Optional[global___Expression.SingularOrList]=..., multi_or_list: typing.Optional[global___Expression.MultiOrList]=..., enum: typing.Optional[global___Expression.Enum]=..., cast: typing.Optional[global___Expression.Cast]=..., subquery: typing.Optional[global___Expression.Subquery]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['cast', b'cast', 'enum', b'enum', 'if_then', b'if_then', 'literal', b'literal', 'multi_or_list', b'multi_or_list', 'rex_type', b'rex_type', 'scalar_function', b'scalar_function', 'selection', b'selection', 'singular_or_list', b'singular_or_list', 'subquery', b'subquery', 'switch_expression', b'switch_expression', 'window_function', b'window_function']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['cast', b'cast', 'enum', b'enum', 'if_then', b'if_then', 'literal', b'literal', 'multi_or_list', b'multi_or_list', 'rex_type', b'rex_type', 'scalar_function', b'scalar_function', 'selection', b'selection', 'singular_or_list', b'singular_or_list', 'subquery', b'subquery', 'switch_expression', b'switch_expression', 'window_function', b'window_function']) -> None:
        ...

    def WhichOneof(self, oneof_group: typing_extensions.Literal['rex_type', b'rex_type']) -> typing.Optional[typing_extensions.Literal['literal', 'selection', 'scalar_function', 'window_function', 'if_then', 'switch_expression', 'singular_or_list', 'multi_or_list', 'enum', 'cast', 'subquery']]:
        ...
global___Expression = Expression

class SortField(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _SortDirection:
        ValueType = typing.NewType('ValueType', builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _SortDirectionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SortField._SortDirection.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        SORT_DIRECTION_UNSPECIFIED: SortField._SortDirection.ValueType
        SORT_DIRECTION_ASC_NULLS_FIRST: SortField._SortDirection.ValueType
        SORT_DIRECTION_ASC_NULLS_LAST: SortField._SortDirection.ValueType
        SORT_DIRECTION_DESC_NULLS_FIRST: SortField._SortDirection.ValueType
        SORT_DIRECTION_DESC_NULLS_LAST: SortField._SortDirection.ValueType
        SORT_DIRECTION_CLUSTERED: SortField._SortDirection.ValueType

    class SortDirection(_SortDirection, metaclass=_SortDirectionEnumTypeWrapper):
        pass
    SORT_DIRECTION_UNSPECIFIED: SortField.SortDirection.ValueType
    SORT_DIRECTION_ASC_NULLS_FIRST: SortField.SortDirection.ValueType
    SORT_DIRECTION_ASC_NULLS_LAST: SortField.SortDirection.ValueType
    SORT_DIRECTION_DESC_NULLS_FIRST: SortField.SortDirection.ValueType
    SORT_DIRECTION_DESC_NULLS_LAST: SortField.SortDirection.ValueType
    SORT_DIRECTION_CLUSTERED: SortField.SortDirection.ValueType
    EXPR_FIELD_NUMBER: builtins.int
    DIRECTION_FIELD_NUMBER: builtins.int
    COMPARISON_FUNCTION_REFERENCE_FIELD_NUMBER: builtins.int

    @property
    def expr(self) -> global___Expression:
        ...
    direction: global___SortField.SortDirection.ValueType
    comparison_function_reference: builtins.int

    def __init__(self, *, expr: typing.Optional[global___Expression]=..., direction: global___SortField.SortDirection.ValueType=..., comparison_function_reference: builtins.int=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['comparison_function_reference', b'comparison_function_reference', 'direction', b'direction', 'expr', b'expr', 'sort_kind', b'sort_kind']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['comparison_function_reference', b'comparison_function_reference', 'direction', b'direction', 'expr', b'expr', 'sort_kind', b'sort_kind']) -> None:
        ...

    def WhichOneof(self, oneof_group: typing_extensions.Literal['sort_kind', b'sort_kind']) -> typing.Optional[typing_extensions.Literal['direction', 'comparison_function_reference']]:
        ...
global___SortField = SortField

class AggregateFunction(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    FUNCTION_REFERENCE_FIELD_NUMBER: builtins.int
    ARGS_FIELD_NUMBER: builtins.int
    SORTS_FIELD_NUMBER: builtins.int
    PHASE_FIELD_NUMBER: builtins.int
    OUTPUT_TYPE_FIELD_NUMBER: builtins.int
    function_reference: builtins.int
    'points to a function_anchor defined in this plan'

    @property
    def args(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Expression]:
        ...

    @property
    def sorts(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SortField]:
        ...
    phase: global___AggregationPhase.ValueType

    @property
    def output_type(self) -> substrait.type_pb2.Type:
        ...

    def __init__(self, *, function_reference: builtins.int=..., args: typing.Optional[typing.Iterable[global___Expression]]=..., sorts: typing.Optional[typing.Iterable[global___SortField]]=..., phase: global___AggregationPhase.ValueType=..., output_type: typing.Optional[substrait.type_pb2.Type]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['output_type', b'output_type']) -> builtins.bool:
        ...

    def ClearField(self, field_name: typing_extensions.Literal['args', b'args', 'function_reference', b'function_reference', 'output_type', b'output_type', 'phase', b'phase', 'sorts', b'sorts']) -> None:
        ...
global___AggregateFunction = AggregateFunction