"""
@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
from .. import substrait
import typing
import typing_extensions
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...

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):
            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[substrait.expression_pb2.Expression.Literal.Struct]:
            ...

        def __init__(self, *, values: typing.Optional[typing.Iterable[substrait.expression_pb2.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):
            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[_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) -> substrait.expression_pb2.Expression:
        ...

    @property
    def projection(self) -> substrait.expression_pb2.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[substrait.expression_pb2.Expression]=..., projection: typing.Optional[substrait.expression_pb2.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[substrait.expression_pb2.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[substrait.expression_pb2.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[_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 = ...

    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 = ...
    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) -> substrait.expression_pb2.Expression:
        ...

    @property
    def post_join_filter(self) -> substrait.expression_pb2.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[substrait.expression_pb2.Expression]=..., post_join_filter: typing.Optional[substrait.expression_pb2.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 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[substrait.expression_pb2.Expression]:
            ...

        def __init__(self, *, grouping_expressions: typing.Optional[typing.Iterable[substrait.expression_pb2.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) -> substrait.expression_pb2.AggregateFunction:
            ...

        @property
        def filter(self) -> substrait.expression_pb2.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[substrait.expression_pb2.AggregateFunction]=..., filter: typing.Optional[substrait.expression_pb2.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[substrait.expression_pb2.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[substrait.expression_pb2.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) -> substrait.expression_pb2.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[substrait.expression_pb2.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[_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

    @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:
        ...

    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]=...) -> None:
        ...

    def HasField(self, field_name: typing_extensions.Literal['aggregate', b'aggregate', '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', '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']]:
        ...
global___Rel = Rel