From c7f3a7a4a7e4313b9599cbc11502e2bfa9b35eb7 Mon Sep 17 00:00:00 2001 From: Daniil Timizhev Date: Tue, 18 Nov 2025 12:24:15 +0300 Subject: [PATCH 1/5] Support arrow result set format for QueryService --- ydb-api-protos | 2 +- ydb/_grpc/grpcwrapper/ydb_query.py | 10 +- .../grpcwrapper/ydb_query_public_types.py | 55 ++++- ydb/_grpc/v3/protos/ydb_formats_pb2.py | 176 ++++++++++++++- ydb/_grpc/v3/protos/ydb_query_pb2.py | 208 ++++++++++++------ ydb/_grpc/v3/protos/ydb_value_pb2.py | 128 ++++++++--- ydb/_grpc/v4/protos/ydb_formats_pb2.py | 10 +- ydb/_grpc/v4/protos/ydb_formats_pb2.pyi | 26 +++ ydb/_grpc/v4/protos/ydb_query_pb2.py | 143 ++++++------ ydb/_grpc/v4/protos/ydb_query_pb2.pyi | 19 +- ydb/_grpc/v4/protos/ydb_value_pb2.py | 73 +++--- ydb/_grpc/v4/protos/ydb_value_pb2.pyi | 16 +- ydb/_grpc/v5/protos/ydb_formats_pb2.py | 10 +- ydb/_grpc/v5/protos/ydb_formats_pb2.pyi | 26 +++ ydb/_grpc/v5/protos/ydb_query_pb2.py | 143 ++++++------ ydb/_grpc/v5/protos/ydb_query_pb2.pyi | 19 +- ydb/_grpc/v5/protos/ydb_value_pb2.py | 73 +++--- ydb/_grpc/v5/protos/ydb_value_pb2.pyi | 16 +- ydb/aio/query/session.py | 13 ++ ydb/aio/query/transaction.py | 13 ++ ydb/convert.py | 31 ++- ydb/query/__init__.py | 12 + ydb/query/base.py | 23 ++ ydb/query/session.py | 19 ++ ydb/query/transaction.py | 19 ++ 25 files changed, 949 insertions(+), 334 deletions(-) diff --git a/ydb-api-protos b/ydb-api-protos index 97ae28e0..a0c108c3 160000 --- a/ydb-api-protos +++ b/ydb-api-protos @@ -1 +1 @@ -Subproject commit 97ae28e0194df0daabf5aba34a019413e0e487ad +Subproject commit a0c108c3525a7fd602705257cc716d9e7086393e diff --git a/ydb/_grpc/grpcwrapper/ydb_query.py b/ydb/_grpc/grpcwrapper/ydb_query.py index 913b8480..321a8f59 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query.py +++ b/ydb/_grpc/grpcwrapper/ydb_query.py @@ -2,7 +2,6 @@ import typing from typing import Optional - # Workaround for good IDE and universal for runtime if typing.TYPE_CHECKING: from ..v4.protos import ydb_query_pb2 @@ -168,15 +167,24 @@ class ExecuteQueryRequest(IToProto): exec_mode: int parameters: dict stats_mode: int + schema_inclusion_mode: int + result_set_format: int + arrow_format_settings: Optional[public_types.ArrowFormatSettings] def to_proto(self) -> ydb_query_pb2.ExecuteQueryRequest: tx_control = self.tx_control.to_proto() if self.tx_control is not None else self.tx_control + arrow_format_settings = ( + self.arrow_format_settings.to_proto() if self.arrow_format_settings is not None else None + ) return ydb_query_pb2.ExecuteQueryRequest( session_id=self.session_id, tx_control=tx_control, query_content=self.query_content.to_proto(), exec_mode=self.exec_mode, stats_mode=self.stats_mode, + schema_inclusion_mode=self.schema_inclusion_mode, + result_set_format=self.result_set_format, + arrow_format_settings=arrow_format_settings, concurrent_result_sets=self.concurrent_result_sets, parameters=convert.query_parameters_to_pb(self.parameters), ) diff --git a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py index fc952652..22e919ad 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py @@ -1,13 +1,14 @@ import abc +import enum import typing -from .common_utils import IToProto +from .common_utils import IFromProto, IToProto # Workaround for good IDE and universal for runtime if typing.TYPE_CHECKING: - from ..v4.protos import ydb_query_pb2 + from ..v4.protos import ydb_query_pb2, ydb_formats_pb2 else: - from ..common.protos import ydb_query_pb2 + from ..common.protos import ydb_query_pb2, ydb_formats_pb2 class BaseQueryTxMode(IToProto): @@ -93,3 +94,51 @@ def name(self): def to_proto(self) -> ydb_query_pb2.StaleModeSettings: return ydb_query_pb2.StaleModeSettings() + + +class ArrowCompressionCodecType(enum.IntEnum): + UNSPECIFIED = 0 + NONE = 1 + ZSTD = 2 + LZ4_FRAME = 3 + + +class ArrowCompressionCodec(IToProto): + """Compression codec for Arrow format result sets.""" + + def __init__( + self, codec_type: typing.Optional[ArrowCompressionCodecType] = None, level: typing.Optional[int] = None + ): + self.type = codec_type if codec_type is not None else ArrowCompressionCodecType.UNSPECIFIED + self.level = level + + def to_proto(self): + return ydb_formats_pb2.ArrowFormatSettings.CompressionCodec(type=self.type, level=self.level) + + +class ArrowFormatSettings(IToProto): + """Settings for Arrow format result sets.""" + + def __init__(self, compression_codec: typing.Optional[ArrowCompressionCodec] = None): + self.compression_codec = compression_codec + + def to_proto(self): + settings = ydb_formats_pb2.ArrowFormatSettings() + if self.compression_codec is not None: + codec_proto = self.compression_codec.to_proto() + settings.compression_codec.CopyFrom(codec_proto) + return settings + + +class ArrowFormatMeta(IFromProto): + """Metadata for Arrow format result sets containing the schema.""" + + def __init__(self, schema: bytes): + self.schema = schema + + @classmethod + def from_proto(cls, proto_message): + return cls(schema=proto_message.schema) + + def __repr__(self): + return f"ArrowFormatMeta(schema_size={len(self.schema)} bytes)" diff --git a/ydb/_grpc/v3/protos/ydb_formats_pb2.py b/ydb/_grpc/v3/protos/ydb_formats_pb2.py index e5cc82cb..3746ee8d 100644 --- a/ydb/_grpc/v3/protos/ydb_formats_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_formats_pb2.py @@ -20,11 +20,46 @@ syntax='proto3', serialized_options=b'\n\026tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xda\x01\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x12\x31\n\x07quoting\x18\x05 \x01(\x0b\x32 .Ydb.Formats.CsvSettings.Quoting\x1aN\n\x07Quoting\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12\x12\n\nquote_char\x18\x02 \x01(\x0c\x12\x1d\n\x15\x64ouble_quote_disabled\x18\x03 \x01(\x08\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xda\x01\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x12\x31\n\x07quoting\x18\x05 \x01(\x0b\x32 .Ydb.Formats.CsvSettings.Quoting\x1aN\n\x07Quoting\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12\x12\n\nquote_char\x18\x02 \x01(\x0c\x12\x1d\n\x15\x64ouble_quote_disabled\x18\x03 \x01(\x08\"\xac\x02\n\x13\x41rrowFormatSettings\x12L\n\x11\x63ompression_codec\x18\x01 \x01(\x0b\x32\x31.Ydb.Formats.ArrowFormatSettings.CompressionCodec\x1a\xc6\x01\n\x10\x43ompressionCodec\x12\x44\n\x04type\x18\x01 \x01(\x0e\x32\x36.Ydb.Formats.ArrowFormatSettings.CompressionCodec.Type\x12\x12\n\x05level\x18\x02 \x01(\x05H\x00\x88\x01\x01\"N\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tTYPE_NONE\x10\x01\x12\r\n\tTYPE_ZSTD\x10\x02\x12\x12\n\x0eTYPE_LZ4_FRAME\x10\x03\x42\x08\n\x06_level\"!\n\x0f\x41rrowFormatMeta\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3' ) +_ARROWFORMATSETTINGS_COMPRESSIONCODEC_TYPE = _descriptor.EnumDescriptor( + name='Type', + full_name='Ydb.Formats.ArrowFormatSettings.CompressionCodec.Type', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='TYPE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TYPE_NONE', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TYPE_ZSTD', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TYPE_LZ4_FRAME', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=513, + serialized_end=591, +) +_sym_db.RegisterEnumDescriptor(_ARROWFORMATSETTINGS_COMPRESSIONCODEC_TYPE) + _ARROWBATCHSETTINGS = _descriptor.Descriptor( name='ArrowBatchSettings', @@ -162,10 +197,127 @@ serialized_end=298, ) + +_ARROWFORMATSETTINGS_COMPRESSIONCODEC = _descriptor.Descriptor( + name='CompressionCodec', + full_name='Ydb.Formats.ArrowFormatSettings.CompressionCodec', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='Ydb.Formats.ArrowFormatSettings.CompressionCodec.type', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='level', full_name='Ydb.Formats.ArrowFormatSettings.CompressionCodec.level', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _ARROWFORMATSETTINGS_COMPRESSIONCODEC_TYPE, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_level', full_name='Ydb.Formats.ArrowFormatSettings.CompressionCodec._level', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=403, + serialized_end=601, +) + +_ARROWFORMATSETTINGS = _descriptor.Descriptor( + name='ArrowFormatSettings', + full_name='Ydb.Formats.ArrowFormatSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='compression_codec', full_name='Ydb.Formats.ArrowFormatSettings.compression_codec', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_ARROWFORMATSETTINGS_COMPRESSIONCODEC, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=301, + serialized_end=601, +) + + +_ARROWFORMATMETA = _descriptor.Descriptor( + name='ArrowFormatMeta', + full_name='Ydb.Formats.ArrowFormatMeta', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='schema', full_name='Ydb.Formats.ArrowFormatMeta.schema', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=603, + serialized_end=636, +) + _CSVSETTINGS_QUOTING.containing_type = _CSVSETTINGS _CSVSETTINGS.fields_by_name['quoting'].message_type = _CSVSETTINGS_QUOTING +_ARROWFORMATSETTINGS_COMPRESSIONCODEC.fields_by_name['type'].enum_type = _ARROWFORMATSETTINGS_COMPRESSIONCODEC_TYPE +_ARROWFORMATSETTINGS_COMPRESSIONCODEC.containing_type = _ARROWFORMATSETTINGS +_ARROWFORMATSETTINGS_COMPRESSIONCODEC_TYPE.containing_type = _ARROWFORMATSETTINGS_COMPRESSIONCODEC +_ARROWFORMATSETTINGS_COMPRESSIONCODEC.oneofs_by_name['_level'].fields.append( + _ARROWFORMATSETTINGS_COMPRESSIONCODEC.fields_by_name['level']) +_ARROWFORMATSETTINGS_COMPRESSIONCODEC.fields_by_name['level'].containing_oneof = _ARROWFORMATSETTINGS_COMPRESSIONCODEC.oneofs_by_name['_level'] +_ARROWFORMATSETTINGS.fields_by_name['compression_codec'].message_type = _ARROWFORMATSETTINGS_COMPRESSIONCODEC DESCRIPTOR.message_types_by_name['ArrowBatchSettings'] = _ARROWBATCHSETTINGS DESCRIPTOR.message_types_by_name['CsvSettings'] = _CSVSETTINGS +DESCRIPTOR.message_types_by_name['ArrowFormatSettings'] = _ARROWFORMATSETTINGS +DESCRIPTOR.message_types_by_name['ArrowFormatMeta'] = _ARROWFORMATMETA _sym_db.RegisterFileDescriptor(DESCRIPTOR) ArrowBatchSettings = _reflection.GeneratedProtocolMessageType('ArrowBatchSettings', (_message.Message,), { @@ -190,6 +342,28 @@ _sym_db.RegisterMessage(CsvSettings) _sym_db.RegisterMessage(CsvSettings.Quoting) +ArrowFormatSettings = _reflection.GeneratedProtocolMessageType('ArrowFormatSettings', (_message.Message,), { + + 'CompressionCodec' : _reflection.GeneratedProtocolMessageType('CompressionCodec', (_message.Message,), { + 'DESCRIPTOR' : _ARROWFORMATSETTINGS_COMPRESSIONCODEC, + '__module__' : 'protos.ydb_formats_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Formats.ArrowFormatSettings.CompressionCodec) + }) + , + 'DESCRIPTOR' : _ARROWFORMATSETTINGS, + '__module__' : 'protos.ydb_formats_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Formats.ArrowFormatSettings) + }) +_sym_db.RegisterMessage(ArrowFormatSettings) +_sym_db.RegisterMessage(ArrowFormatSettings.CompressionCodec) + +ArrowFormatMeta = _reflection.GeneratedProtocolMessageType('ArrowFormatMeta', (_message.Message,), { + 'DESCRIPTOR' : _ARROWFORMATMETA, + '__module__' : 'protos.ydb_formats_pb2' + # @@protoc_insertion_point(class_scope:Ydb.Formats.ArrowFormatMeta) + }) +_sym_db.RegisterMessage(ArrowFormatMeta) + DESCRIPTOR._options = None # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v3/protos/ydb_query_pb2.py b/ydb/_grpc/v3/protos/ydb_query_pb2.py index 6edc6dca..abce1505 100644 --- a/ydb/_grpc/v3/protos/ydb_query_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_query_pb2.py @@ -19,6 +19,7 @@ from ydb._grpc.v3.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 from ydb._grpc.v3.protos import ydb_query_stats_pb2 as protos_dot_ydb__query__stats__pb2 from ydb._grpc.v3.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v3.protos import ydb_formats_pb2 as protos_dot_ydb__formats__pb2 from ydb._grpc.v3.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 @@ -28,9 +29,9 @@ syntax='proto3', serialized_options=b'\n\024tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xe1\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x12\x34\n\x19response_part_limit_bytes\x18\t \x01(\x03\x42\x11\xb2\xe6*\r[0; 33554432]\x12\x0f\n\x07pool_id\x18\n \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x9e\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07pool_id\x18\x07 \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x18protos/ydb_formats.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xb6\x05\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x12\x34\n\x19response_part_limit_bytes\x18\t \x01(\x03\x42\x11\xb2\xe6*\r[0; 33554432]\x12\x0f\n\x07pool_id\x18\n \x01(\t\x12!\n\x0fstats_period_ms\x18\x0b \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12=\n\x15schema_inclusion_mode\x18\x0c \x01(\x0e\x32\x1e.Ydb.Query.SchemaInclusionMode\x12\x30\n\x11result_set_format\x18\r \x01(\x0e\x32\x15.Ydb.ResultSet.Format\x12?\n\x15\x61rrow_format_settings\x18\x0e \x01(\x0b\x32 .Ydb.Formats.ArrowFormatSettings\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x9e\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07pool_id\x18\x07 \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\x84\x01\n\x13SchemaInclusionMode\x12%\n!SCHEMA_INCLUSION_MODE_UNSPECIFIED\x10\x00\x12 \n\x1cSCHEMA_INCLUSION_MODE_ALWAYS\x10\x01\x12$\n SCHEMA_INCLUSION_MODE_FIRST_ONLY\x10\x02*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3' , - dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__query__stats__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__value__pb2.DESCRIPTOR,]) + dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,protos_dot_annotations_dot_validation__pb2.DESCRIPTOR,protos_dot_ydb__issue__message__pb2.DESCRIPTOR,protos_dot_ydb__operation__pb2.DESCRIPTOR,protos_dot_ydb__query__stats__pb2.DESCRIPTOR,protos_dot_ydb__status__codes__pb2.DESCRIPTOR,protos_dot_ydb__formats__pb2.DESCRIPTOR,protos_dot_ydb__value__pb2.DESCRIPTOR,]) _SYNTAX = _descriptor.EnumDescriptor( name='Syntax', @@ -57,8 +58,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4014, - serialized_end=4080, + serialized_start=4253, + serialized_end=4319, ) _sym_db.RegisterEnumDescriptor(_SYNTAX) @@ -98,8 +99,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4083, - serialized_end=4217, + serialized_start=4322, + serialized_end=4456, ) _sym_db.RegisterEnumDescriptor(_EXECMODE) @@ -139,12 +140,43 @@ ], containing_type=None, serialized_options=None, - serialized_start=4219, - serialized_end=4346, + serialized_start=4458, + serialized_end=4585, ) _sym_db.RegisterEnumDescriptor(_STATSMODE) StatsMode = enum_type_wrapper.EnumTypeWrapper(_STATSMODE) +_SCHEMAINCLUSIONMODE = _descriptor.EnumDescriptor( + name='SchemaInclusionMode', + full_name='Ydb.Query.SchemaInclusionMode', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='SCHEMA_INCLUSION_MODE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SCHEMA_INCLUSION_MODE_ALWAYS', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SCHEMA_INCLUSION_MODE_FIRST_ONLY', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=4588, + serialized_end=4720, +) +_sym_db.RegisterEnumDescriptor(_SCHEMAINCLUSIONMODE) + +SchemaInclusionMode = enum_type_wrapper.EnumTypeWrapper(_SCHEMAINCLUSIONMODE) _EXECSTATUS = _descriptor.EnumDescriptor( name='ExecStatus', full_name='Ydb.Query.ExecStatus', @@ -185,8 +217,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4349, - serialized_end=4519, + serialized_start=4723, + serialized_end=4893, ) _sym_db.RegisterEnumDescriptor(_EXECSTATUS) @@ -204,6 +236,9 @@ STATS_MODE_BASIC = 20 STATS_MODE_FULL = 30 STATS_MODE_PROFILE = 40 +SCHEMA_INCLUSION_MODE_UNSPECIFIED = 0 +SCHEMA_INCLUSION_MODE_ALWAYS = 1 +SCHEMA_INCLUSION_MODE_FIRST_ONLY = 2 EXEC_STATUS_UNSPECIFIED = 0 EXEC_STATUS_STARTING = 10 EXEC_STATUS_ABORTED = 20 @@ -233,8 +268,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=251, - serialized_end=273, + serialized_start=277, + serialized_end=299, ) @@ -286,8 +321,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=276, - serialized_end=439, + serialized_start=302, + serialized_end=465, ) @@ -318,8 +353,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=441, - serialized_end=492, + serialized_start=467, + serialized_end=518, ) @@ -357,8 +392,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=494, - serialized_end=601, + serialized_start=520, + serialized_end=627, ) @@ -389,8 +424,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=603, - serialized_end=654, + serialized_start=629, + serialized_end=680, ) @@ -428,8 +463,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=656, - serialized_end=754, + serialized_start=682, + serialized_end=780, ) @@ -453,8 +488,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=756, - serialized_end=782, + serialized_start=782, + serialized_end=808, ) @@ -485,8 +520,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=784, - serialized_end=838, + serialized_start=810, + serialized_end=864, ) @@ -510,8 +545,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=840, - serialized_end=859, + serialized_start=866, + serialized_end=885, ) @@ -535,8 +570,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=861, - serialized_end=883, + serialized_start=887, + serialized_end=909, ) @@ -593,8 +628,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=886, - serialized_end=1169, + serialized_start=912, + serialized_end=1195, ) @@ -644,8 +679,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1172, - serialized_end=1304, + serialized_start=1198, + serialized_end=1330, ) @@ -683,8 +718,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1306, - serialized_end=1413, + serialized_start=1332, + serialized_end=1439, ) @@ -715,8 +750,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1415, - serialized_end=1453, + serialized_start=1441, + serialized_end=1479, ) @@ -761,8 +796,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1456, - serialized_end=1611, + serialized_start=1482, + serialized_end=1637, ) @@ -800,8 +835,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1613, - serialized_end=1692, + serialized_start=1639, + serialized_end=1718, ) @@ -839,8 +874,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1694, - serialized_end=1805, + serialized_start=1720, + serialized_end=1831, ) @@ -878,8 +913,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1807, - serialized_end=1888, + serialized_start=1833, + serialized_end=1914, ) @@ -917,8 +952,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1890, - serialized_end=2003, + serialized_start=1916, + serialized_end=2029, ) @@ -956,8 +991,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2005, - serialized_end=2068, + serialized_start=2031, + serialized_end=2094, ) @@ -995,8 +1030,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2477, - serialized_end=2543, + serialized_start=2716, + serialized_end=2782, ) _EXECUTEQUERYREQUEST = _descriptor.Descriptor( @@ -1070,6 +1105,34 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='stats_period_ms', full_name='Ydb.Query.ExecuteQueryRequest.stats_period_ms', index=9, + number=11, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\262\346*\004>= 0', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='schema_inclusion_mode', full_name='Ydb.Query.ExecuteQueryRequest.schema_inclusion_mode', index=10, + number=12, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='result_set_format', full_name='Ydb.Query.ExecuteQueryRequest.result_set_format', index=11, + number=13, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='arrow_format_settings', full_name='Ydb.Query.ExecuteQueryRequest.arrow_format_settings', index=12, + number=14, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1087,8 +1150,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=2071, - serialized_end=2552, + serialized_start=2097, + serialized_end=2791, ) @@ -1119,8 +1182,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2554, - serialized_end=2599, + serialized_start=2793, + serialized_end=2838, ) @@ -1186,8 +1249,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2602, - serialized_end=2877, + serialized_start=2841, + serialized_end=3116, ) @@ -1225,8 +1288,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2477, - serialized_end=2543, + serialized_start=2716, + serialized_end=2782, ) _EXECUTESCRIPTREQUEST = _descriptor.Descriptor( @@ -1298,8 +1361,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2880, - serialized_end=3294, + serialized_start=3119, + serialized_end=3533, ) @@ -1365,8 +1428,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3297, - serialized_end=3584, + serialized_start=3536, + serialized_end=3823, ) @@ -1418,8 +1481,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3587, - serialized_end=3731, + serialized_start=3826, + serialized_end=3970, ) @@ -1478,8 +1541,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3734, - serialized_end=3953, + serialized_start=3973, + serialized_end=4192, ) @@ -1510,8 +1573,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3955, - serialized_end=4012, + serialized_start=4194, + serialized_end=4251, ) _CREATESESSIONRESPONSE.fields_by_name['status'].enum_type = protos_dot_ydb__status__codes__pb2._STATUSIDS_STATUSCODE @@ -1559,6 +1622,9 @@ _EXECUTEQUERYREQUEST.fields_by_name['query_content'].message_type = _QUERYCONTENT _EXECUTEQUERYREQUEST.fields_by_name['parameters'].message_type = _EXECUTEQUERYREQUEST_PARAMETERSENTRY _EXECUTEQUERYREQUEST.fields_by_name['stats_mode'].enum_type = _STATSMODE +_EXECUTEQUERYREQUEST.fields_by_name['schema_inclusion_mode'].enum_type = _SCHEMAINCLUSIONMODE +_EXECUTEQUERYREQUEST.fields_by_name['result_set_format'].enum_type = protos_dot_ydb__value__pb2._RESULTSET_FORMAT +_EXECUTEQUERYREQUEST.fields_by_name['arrow_format_settings'].message_type = protos_dot_ydb__formats__pb2._ARROWFORMATSETTINGS _EXECUTEQUERYREQUEST.oneofs_by_name['query'].fields.append( _EXECUTEQUERYREQUEST.fields_by_name['query_content']) _EXECUTEQUERYREQUEST.fields_by_name['query_content'].containing_oneof = _EXECUTEQUERYREQUEST.oneofs_by_name['query'] @@ -1616,6 +1682,7 @@ DESCRIPTOR.enum_types_by_name['Syntax'] = _SYNTAX DESCRIPTOR.enum_types_by_name['ExecMode'] = _EXECMODE DESCRIPTOR.enum_types_by_name['StatsMode'] = _STATSMODE +DESCRIPTOR.enum_types_by_name['SchemaInclusionMode'] = _SCHEMAINCLUSIONMODE DESCRIPTOR.enum_types_by_name['ExecStatus'] = _EXECSTATUS _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -1847,6 +1914,7 @@ _EXECUTEQUERYREQUEST_PARAMETERSENTRY._options = None _EXECUTEQUERYREQUEST.fields_by_name['session_id']._options = None _EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._options = None +_EXECUTEQUERYREQUEST.fields_by_name['stats_period_ms']._options = None _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._options = None _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._options = None _EXECUTESCRIPTMETADATA.fields_by_name['execution_id']._options = None diff --git a/ydb/_grpc/v3/protos/ydb_value_pb2.py b/ydb/_grpc/v3/protos/ydb_value_pb2.py index 8d0cdda1..8a6d3f66 100644 --- a/ydb/_grpc/v3/protos/ydb_value_pb2.py +++ b/ydb/_grpc/v3/protos/ydb_value_pb2.py @@ -13,6 +13,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from ydb._grpc.v3.protos import ydb_formats_pb2 as protos_dot_ydb__formats__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -21,9 +22,9 @@ syntax='proto3', serialized_options=b'\n\016tech.ydb.protoB\013ValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"_\n\x06PgType\x12\x11\n\ttype_name\x18\n \x01(\t\x12\x15\n\rtype_modifier\x18\x0b \x01(\t\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\x9f\x08\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xad\x03\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\n\n\x06\x44\x41TE32\x10@\x12\x0e\n\nDATETIME64\x10\x41\x12\x0f\n\x0bTIMESTAMP64\x10\x42\x12\x0e\n\nINTERVAL64\x10\x43\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"V\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3' + serialized_pb=b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18protos/ydb_formats.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"_\n\x06PgType\x12\x11\n\ttype_name\x18\n \x01(\t\x12\x15\n\rtype_modifier\x18\x0b \x01(\t\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\x9f\x08\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xad\x03\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\n\n\x06\x44\x41TE32\x10@\x12\x0e\n\nDATETIME64\x10\x41\x12\x0f\n\x0bTIMESTAMP64\x10\x42\x12\x0e\n\nINTERVAL64\x10\x43\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"\x8a\x02\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x12%\n\x06\x66ormat\x18\x04 \x01(\x0e\x32\x15.Ydb.ResultSet.Format\x12\x37\n\x11\x61rrow_format_meta\x18\x05 \x01(\x0b\x32\x1c.Ydb.Formats.ArrowFormatMeta\x12\x0c\n\x04\x64\x61ta\x18\x0f \x01(\x0c\"D\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46ORMAT_VALUE\x10\x01\x12\x10\n\x0c\x46ORMAT_ARROW\x10\x02\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3' , - dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) + dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,protos_dot_ydb__formats__pb2.DESCRIPTOR,]) @@ -187,11 +188,41 @@ ], containing_type=None, serialized_options=None, - serialized_start=1270, - serialized_end=1699, + serialized_start=1296, + serialized_end=1725, ) _sym_db.RegisterEnumDescriptor(_TYPE_PRIMITIVETYPEID) +_RESULTSET_FORMAT = _descriptor.EnumDescriptor( + name='Format', + full_name='Ydb.ResultSet.Format', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='FORMAT_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='FORMAT_VALUE', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='FORMAT_ARROW', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=2552, + serialized_end=2620, +) +_sym_db.RegisterEnumDescriptor(_RESULTSET_FORMAT) + _DECIMALTYPE = _descriptor.Descriptor( name='DecimalType', @@ -227,8 +258,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=61, - serialized_end=108, + serialized_start=87, + serialized_end=134, ) @@ -259,8 +290,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=110, - serialized_end=149, + serialized_start=136, + serialized_end=175, ) @@ -291,8 +322,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=151, - serialized_end=186, + serialized_start=177, + serialized_end=212, ) @@ -335,8 +366,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=188, - serialized_end=289, + serialized_start=214, + serialized_end=315, ) @@ -367,8 +398,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=291, - serialized_end=331, + serialized_start=317, + serialized_end=357, ) @@ -406,8 +437,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=333, - serialized_end=386, + serialized_start=359, + serialized_end=412, ) @@ -438,8 +469,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=388, - serialized_end=436, + serialized_start=414, + serialized_end=462, ) @@ -477,8 +508,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=438, - serialized_end=500, + serialized_start=464, + serialized_end=526, ) @@ -516,8 +547,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=502, - serialized_end=552, + serialized_start=528, + serialized_end=578, ) @@ -576,8 +607,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=554, - serialized_end=649, + serialized_start=580, + serialized_end=675, ) @@ -705,8 +736,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=652, - serialized_end=1707, + serialized_start=678, + serialized_end=1733, ) @@ -744,8 +775,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1709, - serialized_end=1774, + serialized_start=1735, + serialized_end=1800, ) @@ -886,8 +917,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=1777, - serialized_end=2210, + serialized_start=1803, + serialized_end=2236, ) @@ -925,8 +956,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2212, - serialized_end=2276, + serialized_start=2238, + serialized_end=2302, ) @@ -964,8 +995,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2278, - serialized_end=2325, + serialized_start=2304, + serialized_end=2351, ) @@ -998,11 +1029,33 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='format', full_name='Ydb.ResultSet.format', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='arrow_format_meta', full_name='Ydb.ResultSet.arrow_format_meta', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='data', full_name='Ydb.ResultSet.data', index=5, + number=15, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ + _RESULTSET_FORMAT, ], serialized_options=None, is_extendable=False, @@ -1010,8 +1063,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2327, - serialized_end=2413, + serialized_start=2354, + serialized_end=2620, ) _OPTIONALTYPE.fields_by_name['item'].message_type = _TYPE @@ -1134,6 +1187,9 @@ _COLUMN.fields_by_name['type'].message_type = _TYPE _RESULTSET.fields_by_name['columns'].message_type = _COLUMN _RESULTSET.fields_by_name['rows'].message_type = _VALUE +_RESULTSET.fields_by_name['format'].enum_type = _RESULTSET_FORMAT +_RESULTSET.fields_by_name['arrow_format_meta'].message_type = protos_dot_ydb__formats__pb2._ARROWFORMATMETA +_RESULTSET_FORMAT.containing_type = _RESULTSET DESCRIPTOR.message_types_by_name['DecimalType'] = _DECIMALTYPE DESCRIPTOR.message_types_by_name['OptionalType'] = _OPTIONALTYPE DESCRIPTOR.message_types_by_name['ListType'] = _LISTTYPE diff --git a/ydb/_grpc/v4/protos/ydb_formats_pb2.py b/ydb/_grpc/v4/protos/ydb_formats_pb2.py index 3a58d2be..bf6ab599 100644 --- a/ydb/_grpc/v4/protos/ydb_formats_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_formats_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xda\x01\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x12\x31\n\x07quoting\x18\x05 \x01(\x0b\x32 .Ydb.Formats.CsvSettings.Quoting\x1aN\n\x07Quoting\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12\x12\n\nquote_char\x18\x02 \x01(\x0c\x12\x1d\n\x15\x64ouble_quote_disabled\x18\x03 \x01(\x08\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xda\x01\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x12\x31\n\x07quoting\x18\x05 \x01(\x0b\x32 .Ydb.Formats.CsvSettings.Quoting\x1aN\n\x07Quoting\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12\x12\n\nquote_char\x18\x02 \x01(\x0c\x12\x1d\n\x15\x64ouble_quote_disabled\x18\x03 \x01(\x08\"\xac\x02\n\x13\x41rrowFormatSettings\x12L\n\x11\x63ompression_codec\x18\x01 \x01(\x0b\x32\x31.Ydb.Formats.ArrowFormatSettings.CompressionCodec\x1a\xc6\x01\n\x10\x43ompressionCodec\x12\x44\n\x04type\x18\x01 \x01(\x0e\x32\x36.Ydb.Formats.ArrowFormatSettings.CompressionCodec.Type\x12\x12\n\x05level\x18\x02 \x01(\x05H\x00\x88\x01\x01\"N\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tTYPE_NONE\x10\x01\x12\r\n\tTYPE_ZSTD\x10\x02\x12\x12\n\x0eTYPE_LZ4_FRAME\x10\x03\x42\x08\n\x06_level\"!\n\x0f\x41rrowFormatMeta\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_formats_pb2', globals()) @@ -28,4 +28,12 @@ _CSVSETTINGS._serialized_end=298 _CSVSETTINGS_QUOTING._serialized_start=220 _CSVSETTINGS_QUOTING._serialized_end=298 + _ARROWFORMATSETTINGS._serialized_start=301 + _ARROWFORMATSETTINGS._serialized_end=601 + _ARROWFORMATSETTINGS_COMPRESSIONCODEC._serialized_start=403 + _ARROWFORMATSETTINGS_COMPRESSIONCODEC._serialized_end=601 + _ARROWFORMATSETTINGS_COMPRESSIONCODEC_TYPE._serialized_start=513 + _ARROWFORMATSETTINGS_COMPRESSIONCODEC_TYPE._serialized_end=591 + _ARROWFORMATMETA._serialized_start=603 + _ARROWFORMATMETA._serialized_end=636 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_formats_pb2.pyi b/ydb/_grpc/v4/protos/ydb_formats_pb2.pyi index 38682d14..d06709a0 100644 --- a/ydb/_grpc/v4/protos/ydb_formats_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_formats_pb2.pyi @@ -1,3 +1,4 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union @@ -10,6 +11,31 @@ class ArrowBatchSettings(_message.Message): schema: bytes def __init__(self, schema: _Optional[bytes] = ...) -> None: ... +class ArrowFormatMeta(_message.Message): + __slots__ = ["schema"] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + schema: bytes + def __init__(self, schema: _Optional[bytes] = ...) -> None: ... + +class ArrowFormatSettings(_message.Message): + __slots__ = ["compression_codec"] + class CompressionCodec(_message.Message): + __slots__ = ["level", "type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + LEVEL_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + TYPE_LZ4_FRAME: ArrowFormatSettings.CompressionCodec.Type + TYPE_NONE: ArrowFormatSettings.CompressionCodec.Type + TYPE_UNSPECIFIED: ArrowFormatSettings.CompressionCodec.Type + TYPE_ZSTD: ArrowFormatSettings.CompressionCodec.Type + level: int + type: ArrowFormatSettings.CompressionCodec.Type + def __init__(self, type: _Optional[_Union[ArrowFormatSettings.CompressionCodec.Type, str]] = ..., level: _Optional[int] = ...) -> None: ... + COMPRESSION_CODEC_FIELD_NUMBER: _ClassVar[int] + compression_codec: ArrowFormatSettings.CompressionCodec + def __init__(self, compression_codec: _Optional[_Union[ArrowFormatSettings.CompressionCodec, _Mapping]] = ...) -> None: ... + class CsvSettings(_message.Message): __slots__ = ["delimiter", "header", "null_value", "quoting", "skip_rows"] class Quoting(_message.Message): diff --git a/ydb/_grpc/v4/protos/ydb_query_pb2.py b/ydb/_grpc/v4/protos/ydb_query_pb2.py index 582ca71b..d30b1bb8 100644 --- a/ydb/_grpc/v4/protos/ydb_query_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_query_pb2.py @@ -18,10 +18,11 @@ from ydb._grpc.v4.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 from ydb._grpc.v4.protos import ydb_query_stats_pb2 as protos_dot_ydb__query__stats__pb2 from ydb._grpc.v4.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v4.protos import ydb_formats_pb2 as protos_dot_ydb__formats__pb2 from ydb._grpc.v4.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xe1\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x12\x34\n\x19response_part_limit_bytes\x18\t \x01(\x03\x42\x11\xb2\xe6*\r[0; 33554432]\x12\x0f\n\x07pool_id\x18\n \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x9e\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07pool_id\x18\x07 \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x18protos/ydb_formats.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xb6\x05\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x12\x34\n\x19response_part_limit_bytes\x18\t \x01(\x03\x42\x11\xb2\xe6*\r[0; 33554432]\x12\x0f\n\x07pool_id\x18\n \x01(\t\x12!\n\x0fstats_period_ms\x18\x0b \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12=\n\x15schema_inclusion_mode\x18\x0c \x01(\x0e\x32\x1e.Ydb.Query.SchemaInclusionMode\x12\x30\n\x11result_set_format\x18\r \x01(\x0e\x32\x15.Ydb.ResultSet.Format\x12?\n\x15\x61rrow_format_settings\x18\x0e \x01(\x0b\x32 .Ydb.Formats.ArrowFormatSettings\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x9e\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07pool_id\x18\x07 \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\x84\x01\n\x13SchemaInclusionMode\x12%\n!SCHEMA_INCLUSION_MODE_UNSPECIFIED\x10\x00\x12 \n\x1cSCHEMA_INCLUSION_MODE_ALWAYS\x10\x01\x12$\n SCHEMA_INCLUSION_MODE_FIRST_ONLY\x10\x02*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_query_pb2', globals()) @@ -57,6 +58,8 @@ _EXECUTEQUERYREQUEST.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' _EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._options = None _EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._serialized_options = b'\262\346*\r[0; 33554432]' + _EXECUTEQUERYREQUEST.fields_by_name['stats_period_ms']._options = None + _EXECUTEQUERYREQUEST.fields_by_name['stats_period_ms']._serialized_options = b'\262\346*\004>= 0' _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._options = None _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._options = None @@ -73,72 +76,74 @@ _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._options = None _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._serialized_options = b'\242\346*\003\030\200\010' - _SYNTAX._serialized_start=4014 - _SYNTAX._serialized_end=4080 - _EXECMODE._serialized_start=4083 - _EXECMODE._serialized_end=4217 - _STATSMODE._serialized_start=4219 - _STATSMODE._serialized_end=4346 - _EXECSTATUS._serialized_start=4349 - _EXECSTATUS._serialized_end=4519 - _CREATESESSIONREQUEST._serialized_start=251 - _CREATESESSIONREQUEST._serialized_end=273 - _CREATESESSIONRESPONSE._serialized_start=276 - _CREATESESSIONRESPONSE._serialized_end=439 - _DELETESESSIONREQUEST._serialized_start=441 - _DELETESESSIONREQUEST._serialized_end=492 - _DELETESESSIONRESPONSE._serialized_start=494 - _DELETESESSIONRESPONSE._serialized_end=601 - _ATTACHSESSIONREQUEST._serialized_start=603 - _ATTACHSESSIONREQUEST._serialized_end=654 - _SESSIONSTATE._serialized_start=656 - _SESSIONSTATE._serialized_end=754 - _SERIALIZABLEMODESETTINGS._serialized_start=756 - _SERIALIZABLEMODESETTINGS._serialized_end=782 - _ONLINEMODESETTINGS._serialized_start=784 - _ONLINEMODESETTINGS._serialized_end=838 - _STALEMODESETTINGS._serialized_start=840 - _STALEMODESETTINGS._serialized_end=859 - _SNAPSHOTMODESETTINGS._serialized_start=861 - _SNAPSHOTMODESETTINGS._serialized_end=883 - _TRANSACTIONSETTINGS._serialized_start=886 - _TRANSACTIONSETTINGS._serialized_end=1169 - _TRANSACTIONCONTROL._serialized_start=1172 - _TRANSACTIONCONTROL._serialized_end=1304 - _BEGINTRANSACTIONREQUEST._serialized_start=1306 - _BEGINTRANSACTIONREQUEST._serialized_end=1413 - _TRANSACTIONMETA._serialized_start=1415 - _TRANSACTIONMETA._serialized_end=1453 - _BEGINTRANSACTIONRESPONSE._serialized_start=1456 - _BEGINTRANSACTIONRESPONSE._serialized_end=1611 - _COMMITTRANSACTIONREQUEST._serialized_start=1613 - _COMMITTRANSACTIONREQUEST._serialized_end=1692 - _COMMITTRANSACTIONRESPONSE._serialized_start=1694 - _COMMITTRANSACTIONRESPONSE._serialized_end=1805 - _ROLLBACKTRANSACTIONREQUEST._serialized_start=1807 - _ROLLBACKTRANSACTIONREQUEST._serialized_end=1888 - _ROLLBACKTRANSACTIONRESPONSE._serialized_start=1890 - _ROLLBACKTRANSACTIONRESPONSE._serialized_end=2003 - _QUERYCONTENT._serialized_start=2005 - _QUERYCONTENT._serialized_end=2068 - _EXECUTEQUERYREQUEST._serialized_start=2071 - _EXECUTEQUERYREQUEST._serialized_end=2552 - _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_start=2477 - _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_end=2543 - _RESULTSETMETA._serialized_start=2554 - _RESULTSETMETA._serialized_end=2599 - _EXECUTEQUERYRESPONSEPART._serialized_start=2602 - _EXECUTEQUERYRESPONSEPART._serialized_end=2877 - _EXECUTESCRIPTREQUEST._serialized_start=2880 - _EXECUTESCRIPTREQUEST._serialized_end=3294 - _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_start=2477 - _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_end=2543 - _EXECUTESCRIPTMETADATA._serialized_start=3297 - _EXECUTESCRIPTMETADATA._serialized_end=3584 - _FETCHSCRIPTRESULTSREQUEST._serialized_start=3587 - _FETCHSCRIPTRESULTSREQUEST._serialized_end=3731 - _FETCHSCRIPTRESULTSRESPONSE._serialized_start=3734 - _FETCHSCRIPTRESULTSRESPONSE._serialized_end=3953 - _SCRIPT._serialized_start=3955 - _SCRIPT._serialized_end=4012 + _SYNTAX._serialized_start=4253 + _SYNTAX._serialized_end=4319 + _EXECMODE._serialized_start=4322 + _EXECMODE._serialized_end=4456 + _STATSMODE._serialized_start=4458 + _STATSMODE._serialized_end=4585 + _SCHEMAINCLUSIONMODE._serialized_start=4588 + _SCHEMAINCLUSIONMODE._serialized_end=4720 + _EXECSTATUS._serialized_start=4723 + _EXECSTATUS._serialized_end=4893 + _CREATESESSIONREQUEST._serialized_start=277 + _CREATESESSIONREQUEST._serialized_end=299 + _CREATESESSIONRESPONSE._serialized_start=302 + _CREATESESSIONRESPONSE._serialized_end=465 + _DELETESESSIONREQUEST._serialized_start=467 + _DELETESESSIONREQUEST._serialized_end=518 + _DELETESESSIONRESPONSE._serialized_start=520 + _DELETESESSIONRESPONSE._serialized_end=627 + _ATTACHSESSIONREQUEST._serialized_start=629 + _ATTACHSESSIONREQUEST._serialized_end=680 + _SESSIONSTATE._serialized_start=682 + _SESSIONSTATE._serialized_end=780 + _SERIALIZABLEMODESETTINGS._serialized_start=782 + _SERIALIZABLEMODESETTINGS._serialized_end=808 + _ONLINEMODESETTINGS._serialized_start=810 + _ONLINEMODESETTINGS._serialized_end=864 + _STALEMODESETTINGS._serialized_start=866 + _STALEMODESETTINGS._serialized_end=885 + _SNAPSHOTMODESETTINGS._serialized_start=887 + _SNAPSHOTMODESETTINGS._serialized_end=909 + _TRANSACTIONSETTINGS._serialized_start=912 + _TRANSACTIONSETTINGS._serialized_end=1195 + _TRANSACTIONCONTROL._serialized_start=1198 + _TRANSACTIONCONTROL._serialized_end=1330 + _BEGINTRANSACTIONREQUEST._serialized_start=1332 + _BEGINTRANSACTIONREQUEST._serialized_end=1439 + _TRANSACTIONMETA._serialized_start=1441 + _TRANSACTIONMETA._serialized_end=1479 + _BEGINTRANSACTIONRESPONSE._serialized_start=1482 + _BEGINTRANSACTIONRESPONSE._serialized_end=1637 + _COMMITTRANSACTIONREQUEST._serialized_start=1639 + _COMMITTRANSACTIONREQUEST._serialized_end=1718 + _COMMITTRANSACTIONRESPONSE._serialized_start=1720 + _COMMITTRANSACTIONRESPONSE._serialized_end=1831 + _ROLLBACKTRANSACTIONREQUEST._serialized_start=1833 + _ROLLBACKTRANSACTIONREQUEST._serialized_end=1914 + _ROLLBACKTRANSACTIONRESPONSE._serialized_start=1916 + _ROLLBACKTRANSACTIONRESPONSE._serialized_end=2029 + _QUERYCONTENT._serialized_start=2031 + _QUERYCONTENT._serialized_end=2094 + _EXECUTEQUERYREQUEST._serialized_start=2097 + _EXECUTEQUERYREQUEST._serialized_end=2791 + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_start=2716 + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_end=2782 + _RESULTSETMETA._serialized_start=2793 + _RESULTSETMETA._serialized_end=2838 + _EXECUTEQUERYRESPONSEPART._serialized_start=2841 + _EXECUTEQUERYRESPONSEPART._serialized_end=3116 + _EXECUTESCRIPTREQUEST._serialized_start=3119 + _EXECUTESCRIPTREQUEST._serialized_end=3533 + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_start=2716 + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_end=2782 + _EXECUTESCRIPTMETADATA._serialized_start=3536 + _EXECUTESCRIPTMETADATA._serialized_end=3823 + _FETCHSCRIPTRESULTSREQUEST._serialized_start=3826 + _FETCHSCRIPTRESULTSREQUEST._serialized_end=3970 + _FETCHSCRIPTRESULTSRESPONSE._serialized_start=3973 + _FETCHSCRIPTRESULTSRESPONSE._serialized_end=4192 + _SCRIPT._serialized_start=4194 + _SCRIPT._serialized_end=4251 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_query_pb2.pyi b/ydb/_grpc/v4/protos/ydb_query_pb2.pyi index 621827b2..f9aac068 100644 --- a/ydb/_grpc/v4/protos/ydb_query_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_query_pb2.pyi @@ -4,6 +4,7 @@ from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 from protos import ydb_operation_pb2 as _ydb_operation_pb2 from protos import ydb_query_stats_pb2 as _ydb_query_stats_pb2 from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from protos import ydb_formats_pb2 as _ydb_formats_pb2 from protos import ydb_value_pb2 as _ydb_value_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper @@ -23,6 +24,9 @@ EXEC_STATUS_COMPLETED: ExecStatus EXEC_STATUS_FAILED: ExecStatus EXEC_STATUS_STARTING: ExecStatus EXEC_STATUS_UNSPECIFIED: ExecStatus +SCHEMA_INCLUSION_MODE_ALWAYS: SchemaInclusionMode +SCHEMA_INCLUSION_MODE_FIRST_ONLY: SchemaInclusionMode +SCHEMA_INCLUSION_MODE_UNSPECIFIED: SchemaInclusionMode STATS_MODE_BASIC: StatsMode STATS_MODE_FULL: StatsMode STATS_MODE_NONE: StatsMode @@ -103,7 +107,7 @@ class DeleteSessionResponse(_message.Message): def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... class ExecuteQueryRequest(_message.Message): - __slots__ = ["concurrent_result_sets", "exec_mode", "parameters", "pool_id", "query_content", "response_part_limit_bytes", "session_id", "stats_mode", "tx_control"] + __slots__ = ["arrow_format_settings", "concurrent_result_sets", "exec_mode", "parameters", "pool_id", "query_content", "response_part_limit_bytes", "result_set_format", "schema_inclusion_mode", "session_id", "stats_mode", "stats_period_ms", "tx_control"] class ParametersEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -111,25 +115,33 @@ class ExecuteQueryRequest(_message.Message): key: str value: _ydb_value_pb2.TypedValue def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + ARROW_FORMAT_SETTINGS_FIELD_NUMBER: _ClassVar[int] CONCURRENT_RESULT_SETS_FIELD_NUMBER: _ClassVar[int] EXEC_MODE_FIELD_NUMBER: _ClassVar[int] PARAMETERS_FIELD_NUMBER: _ClassVar[int] POOL_ID_FIELD_NUMBER: _ClassVar[int] QUERY_CONTENT_FIELD_NUMBER: _ClassVar[int] RESPONSE_PART_LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_FORMAT_FIELD_NUMBER: _ClassVar[int] + SCHEMA_INCLUSION_MODE_FIELD_NUMBER: _ClassVar[int] SESSION_ID_FIELD_NUMBER: _ClassVar[int] STATS_MODE_FIELD_NUMBER: _ClassVar[int] + STATS_PERIOD_MS_FIELD_NUMBER: _ClassVar[int] TX_CONTROL_FIELD_NUMBER: _ClassVar[int] + arrow_format_settings: _ydb_formats_pb2.ArrowFormatSettings concurrent_result_sets: bool exec_mode: ExecMode parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] pool_id: str query_content: QueryContent response_part_limit_bytes: int + result_set_format: _ydb_value_pb2.ResultSet.Format + schema_inclusion_mode: SchemaInclusionMode session_id: str stats_mode: StatsMode + stats_period_ms: int tx_control: TransactionControl - def __init__(self, session_id: _Optional[str] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., tx_control: _Optional[_Union[TransactionControl, _Mapping]] = ..., query_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., concurrent_result_sets: bool = ..., response_part_limit_bytes: _Optional[int] = ..., pool_id: _Optional[str] = ...) -> None: ... + def __init__(self, session_id: _Optional[str] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., tx_control: _Optional[_Union[TransactionControl, _Mapping]] = ..., query_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., concurrent_result_sets: bool = ..., response_part_limit_bytes: _Optional[int] = ..., pool_id: _Optional[str] = ..., stats_period_ms: _Optional[int] = ..., schema_inclusion_mode: _Optional[_Union[SchemaInclusionMode, str]] = ..., result_set_format: _Optional[_Union[_ydb_value_pb2.ResultSet.Format, str]] = ..., arrow_format_settings: _Optional[_Union[_ydb_formats_pb2.ArrowFormatSettings, _Mapping]] = ...) -> None: ... class ExecuteQueryResponsePart(_message.Message): __slots__ = ["exec_stats", "issues", "result_set", "result_set_index", "status", "tx_meta"] @@ -313,5 +325,8 @@ class ExecMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): class StatsMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] +class SchemaInclusionMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class ExecStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] diff --git a/ydb/_grpc/v4/protos/ydb_value_pb2.py b/ydb/_grpc/v4/protos/ydb_value_pb2.py index e12a525c..75d371e0 100644 --- a/ydb/_grpc/v4/protos/ydb_value_pb2.py +++ b/ydb/_grpc/v4/protos/ydb_value_pb2.py @@ -13,9 +13,10 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from ydb._grpc.v4.protos import ydb_formats_pb2 as protos_dot_ydb__formats__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"_\n\x06PgType\x12\x11\n\ttype_name\x18\n \x01(\t\x12\x15\n\rtype_modifier\x18\x0b \x01(\t\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\x9f\x08\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xad\x03\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\n\n\x06\x44\x41TE32\x10@\x12\x0e\n\nDATETIME64\x10\x41\x12\x0f\n\x0bTIMESTAMP64\x10\x42\x12\x0e\n\nINTERVAL64\x10\x43\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"V\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18protos/ydb_formats.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"_\n\x06PgType\x12\x11\n\ttype_name\x18\n \x01(\t\x12\x15\n\rtype_modifier\x18\x0b \x01(\t\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\x9f\x08\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xad\x03\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\n\n\x06\x44\x41TE32\x10@\x12\x0e\n\nDATETIME64\x10\x41\x12\x0f\n\x0bTIMESTAMP64\x10\x42\x12\x0e\n\nINTERVAL64\x10\x43\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"\x8a\x02\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x12%\n\x06\x66ormat\x18\x04 \x01(\x0e\x32\x15.Ydb.ResultSet.Format\x12\x37\n\x11\x61rrow_format_meta\x18\x05 \x01(\x0b\x32\x1c.Ydb.Formats.ArrowFormatMeta\x12\x0c\n\x04\x64\x61ta\x18\x0f \x01(\x0c\"D\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46ORMAT_VALUE\x10\x01\x12\x10\n\x0c\x46ORMAT_ARROW\x10\x02\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_value_pb2', globals()) @@ -23,38 +24,40 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoB\013ValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001' - _DECIMALTYPE._serialized_start=61 - _DECIMALTYPE._serialized_end=108 - _OPTIONALTYPE._serialized_start=110 - _OPTIONALTYPE._serialized_end=149 - _LISTTYPE._serialized_start=151 - _LISTTYPE._serialized_end=186 - _VARIANTTYPE._serialized_start=188 - _VARIANTTYPE._serialized_end=289 - _TUPLETYPE._serialized_start=291 - _TUPLETYPE._serialized_end=331 - _STRUCTMEMBER._serialized_start=333 - _STRUCTMEMBER._serialized_end=386 - _STRUCTTYPE._serialized_start=388 - _STRUCTTYPE._serialized_end=436 - _DICTTYPE._serialized_start=438 - _DICTTYPE._serialized_end=500 - _TAGGEDTYPE._serialized_start=502 - _TAGGEDTYPE._serialized_end=552 - _PGTYPE._serialized_start=554 - _PGTYPE._serialized_end=649 - _TYPE._serialized_start=652 - _TYPE._serialized_end=1707 - _TYPE_PRIMITIVETYPEID._serialized_start=1270 - _TYPE_PRIMITIVETYPEID._serialized_end=1699 - _VALUEPAIR._serialized_start=1709 - _VALUEPAIR._serialized_end=1774 - _VALUE._serialized_start=1777 - _VALUE._serialized_end=2210 - _TYPEDVALUE._serialized_start=2212 - _TYPEDVALUE._serialized_end=2276 - _COLUMN._serialized_start=2278 - _COLUMN._serialized_end=2325 - _RESULTSET._serialized_start=2327 - _RESULTSET._serialized_end=2413 + _DECIMALTYPE._serialized_start=87 + _DECIMALTYPE._serialized_end=134 + _OPTIONALTYPE._serialized_start=136 + _OPTIONALTYPE._serialized_end=175 + _LISTTYPE._serialized_start=177 + _LISTTYPE._serialized_end=212 + _VARIANTTYPE._serialized_start=214 + _VARIANTTYPE._serialized_end=315 + _TUPLETYPE._serialized_start=317 + _TUPLETYPE._serialized_end=357 + _STRUCTMEMBER._serialized_start=359 + _STRUCTMEMBER._serialized_end=412 + _STRUCTTYPE._serialized_start=414 + _STRUCTTYPE._serialized_end=462 + _DICTTYPE._serialized_start=464 + _DICTTYPE._serialized_end=526 + _TAGGEDTYPE._serialized_start=528 + _TAGGEDTYPE._serialized_end=578 + _PGTYPE._serialized_start=580 + _PGTYPE._serialized_end=675 + _TYPE._serialized_start=678 + _TYPE._serialized_end=1733 + _TYPE_PRIMITIVETYPEID._serialized_start=1296 + _TYPE_PRIMITIVETYPEID._serialized_end=1725 + _VALUEPAIR._serialized_start=1735 + _VALUEPAIR._serialized_end=1800 + _VALUE._serialized_start=1803 + _VALUE._serialized_end=2236 + _TYPEDVALUE._serialized_start=2238 + _TYPEDVALUE._serialized_end=2302 + _COLUMN._serialized_start=2304 + _COLUMN._serialized_end=2351 + _RESULTSET._serialized_start=2354 + _RESULTSET._serialized_end=2620 + _RESULTSET_FORMAT._serialized_start=2552 + _RESULTSET_FORMAT._serialized_end=2620 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v4/protos/ydb_value_pb2.pyi b/ydb/_grpc/v4/protos/ydb_value_pb2.pyi index 8382a771..a00c2638 100644 --- a/ydb/_grpc/v4/protos/ydb_value_pb2.pyi +++ b/ydb/_grpc/v4/protos/ydb_value_pb2.pyi @@ -1,4 +1,5 @@ from google.protobuf import struct_pb2 as _struct_pb2 +from protos import ydb_formats_pb2 as _ydb_formats_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -58,14 +59,25 @@ class PgType(_message.Message): def __init__(self, type_name: _Optional[str] = ..., type_modifier: _Optional[str] = ..., oid: _Optional[int] = ..., typlen: _Optional[int] = ..., typmod: _Optional[int] = ...) -> None: ... class ResultSet(_message.Message): - __slots__ = ["columns", "rows", "truncated"] + __slots__ = ["arrow_format_meta", "columns", "data", "format", "rows", "truncated"] + class Format(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ARROW_FORMAT_META_FIELD_NUMBER: _ClassVar[int] COLUMNS_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + FORMAT_ARROW: ResultSet.Format + FORMAT_FIELD_NUMBER: _ClassVar[int] + FORMAT_UNSPECIFIED: ResultSet.Format + FORMAT_VALUE: ResultSet.Format ROWS_FIELD_NUMBER: _ClassVar[int] TRUNCATED_FIELD_NUMBER: _ClassVar[int] + arrow_format_meta: _ydb_formats_pb2.ArrowFormatMeta columns: _containers.RepeatedCompositeFieldContainer[Column] + data: bytes + format: ResultSet.Format rows: _containers.RepeatedCompositeFieldContainer[Value] truncated: bool - def __init__(self, columns: _Optional[_Iterable[_Union[Column, _Mapping]]] = ..., rows: _Optional[_Iterable[_Union[Value, _Mapping]]] = ..., truncated: bool = ...) -> None: ... + def __init__(self, columns: _Optional[_Iterable[_Union[Column, _Mapping]]] = ..., rows: _Optional[_Iterable[_Union[Value, _Mapping]]] = ..., truncated: bool = ..., format: _Optional[_Union[ResultSet.Format, str]] = ..., arrow_format_meta: _Optional[_Union[_ydb_formats_pb2.ArrowFormatMeta, _Mapping]] = ..., data: _Optional[bytes] = ...) -> None: ... class StructMember(_message.Message): __slots__ = ["name", "type"] diff --git a/ydb/_grpc/v5/protos/ydb_formats_pb2.py b/ydb/_grpc/v5/protos/ydb_formats_pb2.py index 3a58d2be..bf6ab599 100644 --- a/ydb/_grpc/v5/protos/ydb_formats_pb2.py +++ b/ydb/_grpc/v5/protos/ydb_formats_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xda\x01\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x12\x31\n\x07quoting\x18\x05 \x01(\x0b\x32 .Ydb.Formats.CsvSettings.Quoting\x1aN\n\x07Quoting\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12\x12\n\nquote_char\x18\x02 \x01(\x0c\x12\x1d\n\x15\x64ouble_quote_disabled\x18\x03 \x01(\x08\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18protos/ydb_formats.proto\x12\x0bYdb.Formats\"$\n\x12\x41rrowBatchSettings\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xda\x01\n\x0b\x43svSettings\x12\x11\n\tskip_rows\x18\x01 \x01(\r\x12\x11\n\tdelimiter\x18\x02 \x01(\x0c\x12\x12\n\nnull_value\x18\x03 \x01(\x0c\x12\x0e\n\x06header\x18\x04 \x01(\x08\x12\x31\n\x07quoting\x18\x05 \x01(\x0b\x32 .Ydb.Formats.CsvSettings.Quoting\x1aN\n\x07Quoting\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\x12\x12\n\nquote_char\x18\x02 \x01(\x0c\x12\x1d\n\x15\x64ouble_quote_disabled\x18\x03 \x01(\x08\"\xac\x02\n\x13\x41rrowFormatSettings\x12L\n\x11\x63ompression_codec\x18\x01 \x01(\x0b\x32\x31.Ydb.Formats.ArrowFormatSettings.CompressionCodec\x1a\xc6\x01\n\x10\x43ompressionCodec\x12\x44\n\x04type\x18\x01 \x01(\x0e\x32\x36.Ydb.Formats.ArrowFormatSettings.CompressionCodec.Type\x12\x12\n\x05level\x18\x02 \x01(\x05H\x00\x88\x01\x01\"N\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tTYPE_NONE\x10\x01\x12\r\n\tTYPE_ZSTD\x10\x02\x12\x12\n\x0eTYPE_LZ4_FRAME\x10\x03\x42\x08\n\x06_level\"!\n\x0f\x41rrowFormatMeta\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\x42W\n\x16tech.ydb.proto.formatsZ:github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Formats\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_formats_pb2', globals()) @@ -28,4 +28,12 @@ _CSVSETTINGS._serialized_end=298 _CSVSETTINGS_QUOTING._serialized_start=220 _CSVSETTINGS_QUOTING._serialized_end=298 + _ARROWFORMATSETTINGS._serialized_start=301 + _ARROWFORMATSETTINGS._serialized_end=601 + _ARROWFORMATSETTINGS_COMPRESSIONCODEC._serialized_start=403 + _ARROWFORMATSETTINGS_COMPRESSIONCODEC._serialized_end=601 + _ARROWFORMATSETTINGS_COMPRESSIONCODEC_TYPE._serialized_start=513 + _ARROWFORMATSETTINGS_COMPRESSIONCODEC_TYPE._serialized_end=591 + _ARROWFORMATMETA._serialized_start=603 + _ARROWFORMATMETA._serialized_end=636 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_formats_pb2.pyi b/ydb/_grpc/v5/protos/ydb_formats_pb2.pyi index 38682d14..d06709a0 100644 --- a/ydb/_grpc/v5/protos/ydb_formats_pb2.pyi +++ b/ydb/_grpc/v5/protos/ydb_formats_pb2.pyi @@ -1,3 +1,4 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union @@ -10,6 +11,31 @@ class ArrowBatchSettings(_message.Message): schema: bytes def __init__(self, schema: _Optional[bytes] = ...) -> None: ... +class ArrowFormatMeta(_message.Message): + __slots__ = ["schema"] + SCHEMA_FIELD_NUMBER: _ClassVar[int] + schema: bytes + def __init__(self, schema: _Optional[bytes] = ...) -> None: ... + +class ArrowFormatSettings(_message.Message): + __slots__ = ["compression_codec"] + class CompressionCodec(_message.Message): + __slots__ = ["level", "type"] + class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + LEVEL_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + TYPE_LZ4_FRAME: ArrowFormatSettings.CompressionCodec.Type + TYPE_NONE: ArrowFormatSettings.CompressionCodec.Type + TYPE_UNSPECIFIED: ArrowFormatSettings.CompressionCodec.Type + TYPE_ZSTD: ArrowFormatSettings.CompressionCodec.Type + level: int + type: ArrowFormatSettings.CompressionCodec.Type + def __init__(self, type: _Optional[_Union[ArrowFormatSettings.CompressionCodec.Type, str]] = ..., level: _Optional[int] = ...) -> None: ... + COMPRESSION_CODEC_FIELD_NUMBER: _ClassVar[int] + compression_codec: ArrowFormatSettings.CompressionCodec + def __init__(self, compression_codec: _Optional[_Union[ArrowFormatSettings.CompressionCodec, _Mapping]] = ...) -> None: ... + class CsvSettings(_message.Message): __slots__ = ["delimiter", "header", "null_value", "quoting", "skip_rows"] class Quoting(_message.Message): diff --git a/ydb/_grpc/v5/protos/ydb_query_pb2.py b/ydb/_grpc/v5/protos/ydb_query_pb2.py index 124341c3..13089fcb 100644 --- a/ydb/_grpc/v5/protos/ydb_query_pb2.py +++ b/ydb/_grpc/v5/protos/ydb_query_pb2.py @@ -18,10 +18,11 @@ from ydb._grpc.v5.protos import ydb_operation_pb2 as protos_dot_ydb__operation__pb2 from ydb._grpc.v5.protos import ydb_query_stats_pb2 as protos_dot_ydb__query__stats__pb2 from ydb._grpc.v5.protos import ydb_status_codes_pb2 as protos_dot_ydb__status__codes__pb2 +from ydb._grpc.v5.protos import ydb_formats_pb2 as protos_dot_ydb__formats__pb2 from ydb._grpc.v5.protos import ydb_value_pb2 as protos_dot_ydb__value__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xe1\x03\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x12\x34\n\x19response_part_limit_bytes\x18\t \x01(\x03\x42\x11\xb2\xe6*\r[0; 33554432]\x12\x0f\n\x07pool_id\x18\n \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x9e\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07pool_id\x18\x07 \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_query.proto\x12\tYdb.Query\x1a\x1egoogle/protobuf/duration.proto\x1a#protos/annotations/validation.proto\x1a\x1eprotos/ydb_issue_message.proto\x1a\x1aprotos/ydb_operation.proto\x1a\x1cprotos/ydb_query_stats.proto\x1a\x1dprotos/ydb_status_codes.proto\x1a\x18protos/ydb_formats.proto\x1a\x16protos/ydb_value.proto\"\x16\n\x14\x43reateSessionRequest\"\xa3\x01\n\x15\x43reateSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\x1b\n\nsession_id\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x19\n\x07node_id\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"3\n\x14\x44\x65leteSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"k\n\x15\x44\x65leteSessionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"3\n\x14\x41ttachSessionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"b\n\x0cSessionState\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"\x1a\n\x18SerializableModeSettings\"6\n\x12OnlineModeSettings\x12 \n\x18\x61llow_inconsistent_reads\x18\x01 \x01(\x08\"\x13\n\x11StaleModeSettings\"\x16\n\x14SnapshotModeSettings\"\x9b\x02\n\x13TransactionSettings\x12\x46\n\x17serializable_read_write\x18\x01 \x01(\x0b\x32#.Ydb.Query.SerializableModeSettingsH\x00\x12\x39\n\x10online_read_only\x18\x02 \x01(\x0b\x32\x1d.Ydb.Query.OnlineModeSettingsH\x00\x12\x37\n\x0fstale_read_only\x18\x03 \x01(\x0b\x32\x1c.Ydb.Query.StaleModeSettingsH\x00\x12=\n\x12snapshot_read_only\x18\x04 \x01(\x0b\x32\x1f.Ydb.Query.SnapshotModeSettingsH\x00\x42\t\n\x07tx_mode\"\x84\x01\n\x12TransactionControl\x12\x18\n\x05tx_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08H\x00\x12\x32\n\x08\x62\x65gin_tx\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettingsH\x00\x12\x11\n\tcommit_tx\x18\n \x01(\x08\x42\r\n\x0btx_selector\"k\n\x17\x42\x65ginTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x33\n\x0btx_settings\x18\x02 \x01(\x0b\x32\x1e.Ydb.Query.TransactionSettings\"&\n\x0fTransactionMeta\x12\x13\n\x02id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"\x9b\x01\n\x18\x42\x65ginTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12+\n\x07tx_meta\x18\x03 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"O\n\x18\x43ommitTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"o\n\x19\x43ommitTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"Q\n\x1aRollbackTransactionRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x16\n\x05tx_id\x18\x02 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"q\n\x1bRollbackTransactionResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\"?\n\x0cQueryContent\x12!\n\x06syntax\x18\x01 \x01(\x0e\x32\x11.Ydb.Query.Syntax\x12\x0c\n\x04text\x18\x02 \x01(\t\"\xb6\x05\n\x13\x45xecuteQueryRequest\x12\x1b\n\nsession_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12\x31\n\ntx_control\x18\x03 \x01(\x0b\x32\x1d.Ydb.Query.TransactionControl\x12\x30\n\rquery_content\x18\x04 \x01(\x0b\x32\x17.Ydb.Query.QueryContentH\x00\x12\x42\n\nparameters\x18\x06 \x03(\x0b\x32..Ydb.Query.ExecuteQueryRequest.ParametersEntry\x12(\n\nstats_mode\x18\x07 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12\x1e\n\x16\x63oncurrent_result_sets\x18\x08 \x01(\x08\x12\x34\n\x19response_part_limit_bytes\x18\t \x01(\x03\x42\x11\xb2\xe6*\r[0; 33554432]\x12\x0f\n\x07pool_id\x18\n \x01(\t\x12!\n\x0fstats_period_ms\x18\x0b \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12=\n\x15schema_inclusion_mode\x18\x0c \x01(\x0e\x32\x1e.Ydb.Query.SchemaInclusionMode\x12\x30\n\x11result_set_format\x18\r \x01(\x0e\x32\x15.Ydb.ResultSet.Format\x12?\n\x15\x61rrow_format_settings\x18\x0e \x01(\x0b\x32 .Ydb.Formats.ArrowFormatSettings\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\x42\x07\n\x05query\"-\n\rResultSetMeta\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\"\x93\x02\n\x18\x45xecuteQueryResponsePart\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12.\n\nexec_stats\x18\x05 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\x12+\n\x07tx_meta\x18\x06 \x01(\x0b\x32\x1a.Ydb.Query.TransactionMeta\"\x9e\x03\n\x14\x45xecuteScriptRequest\x12\x39\n\x10operation_params\x18\x01 \x01(\x0b\x32\x1f.Ydb.Operations.OperationParams\x12&\n\texec_mode\x18\x02 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x43\n\nparameters\x18\x04 \x03(\x0b\x32/.Ydb.Query.ExecuteScriptRequest.ParametersEntry\x12(\n\nstats_mode\x18\x05 \x01(\x0e\x32\x14.Ydb.Query.StatsMode\x12.\n\x0bresults_ttl\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07pool_id\x18\x07 \x01(\t\x1a\x42\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.Ydb.TypedValue:\x02\x38\x01\"\x9f\x02\n\x15\x45xecuteScriptMetadata\x12\x1d\n\x0c\x65xecution_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12*\n\x0b\x65xec_status\x18\x02 \x01(\x0e\x32\x15.Ydb.Query.ExecStatus\x12/\n\x0escript_content\x18\x03 \x01(\x0b\x32\x17.Ydb.Query.QueryContent\x12\x32\n\x10result_sets_meta\x18\x04 \x03(\x0b\x32\x18.Ydb.Query.ResultSetMeta\x12&\n\texec_mode\x18\x05 \x01(\x0e\x32\x13.Ydb.Query.ExecMode\x12.\n\nexec_stats\x18\x06 \x01(\x0b\x32\x1a.Ydb.TableStats.QueryStats\"\x90\x01\n\x19\x46\x65tchScriptResultsRequest\x12\x1d\n\x0coperation_id\x18\x01 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x18\n\x10result_set_index\x18\x02 \x01(\x03\x12\x1c\n\x0b\x66\x65tch_token\x18\x03 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\x12\x1c\n\nrows_limit\x18\x04 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\"\xdb\x01\n\x1a\x46\x65tchScriptResultsResponse\x12)\n\x06status\x18\x01 \x01(\x0e\x32\x19.Ydb.StatusIds.StatusCode\x12\'\n\x06issues\x18\x02 \x03(\x0b\x32\x17.Ydb.Issue.IssueMessage\x12\"\n\x10result_set_index\x18\x03 \x01(\x03\x42\x08\xb2\xe6*\x04>= 0\x12\"\n\nresult_set\x18\x04 \x01(\x0b\x32\x0e.Ydb.ResultSet\x12!\n\x10next_fetch_token\x18\x05 \x01(\tB\x07\xa2\xe6*\x03\x18\x80\x08\"9\n\x06Script\x12/\n\x0escript_content\x18\x01 \x01(\x0b\x32\x17.Ydb.Query.QueryContent*B\n\x06Syntax\x12\x16\n\x12SYNTAX_UNSPECIFIED\x10\x00\x12\x11\n\rSYNTAX_YQL_V1\x10\x01\x12\r\n\tSYNTAX_PG\x10\x02*\x86\x01\n\x08\x45xecMode\x12\x19\n\x15\x45XEC_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45XEC_MODE_PARSE\x10\n\x12\x16\n\x12\x45XEC_MODE_VALIDATE\x10\x14\x12\x15\n\x11\x45XEC_MODE_EXPLAIN\x10\x1e\x12\x15\n\x11\x45XEC_MODE_EXECUTE\x10\x32\"\x04\x08(\x10(*\x7f\n\tStatsMode\x12\x1a\n\x16STATS_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATS_MODE_NONE\x10\n\x12\x14\n\x10STATS_MODE_BASIC\x10\x14\x12\x13\n\x0fSTATS_MODE_FULL\x10\x1e\x12\x16\n\x12STATS_MODE_PROFILE\x10(*\x84\x01\n\x13SchemaInclusionMode\x12%\n!SCHEMA_INCLUSION_MODE_UNSPECIFIED\x10\x00\x12 \n\x1cSCHEMA_INCLUSION_MODE_ALWAYS\x10\x01\x12$\n SCHEMA_INCLUSION_MODE_FIRST_ONLY\x10\x02*\xaa\x01\n\nExecStatus\x12\x1b\n\x17\x45XEC_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45XEC_STATUS_STARTING\x10\n\x12\x17\n\x13\x45XEC_STATUS_ABORTED\x10\x14\x12\x19\n\x15\x45XEC_STATUS_CANCELLED\x10\x1e\x12\x19\n\x15\x45XEC_STATUS_COMPLETED\x10(\x12\x16\n\x12\x45XEC_STATUS_FAILED\x10\x32\x42S\n\x14tech.ydb.proto.queryZ8github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Query\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_query_pb2', globals()) @@ -57,6 +58,8 @@ _EXECUTEQUERYREQUEST.fields_by_name['session_id']._serialized_options = b'\242\346*\003\030\200\010' _EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._options = None _EXECUTEQUERYREQUEST.fields_by_name['response_part_limit_bytes']._serialized_options = b'\262\346*\r[0; 33554432]' + _EXECUTEQUERYREQUEST.fields_by_name['stats_period_ms']._options = None + _EXECUTEQUERYREQUEST.fields_by_name['stats_period_ms']._serialized_options = b'\262\346*\004>= 0' _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._options = None _EXECUTEQUERYRESPONSEPART.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._options = None @@ -73,72 +76,74 @@ _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['result_set_index']._serialized_options = b'\262\346*\004>= 0' _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._options = None _FETCHSCRIPTRESULTSRESPONSE.fields_by_name['next_fetch_token']._serialized_options = b'\242\346*\003\030\200\010' - _SYNTAX._serialized_start=4014 - _SYNTAX._serialized_end=4080 - _EXECMODE._serialized_start=4083 - _EXECMODE._serialized_end=4217 - _STATSMODE._serialized_start=4219 - _STATSMODE._serialized_end=4346 - _EXECSTATUS._serialized_start=4349 - _EXECSTATUS._serialized_end=4519 - _CREATESESSIONREQUEST._serialized_start=251 - _CREATESESSIONREQUEST._serialized_end=273 - _CREATESESSIONRESPONSE._serialized_start=276 - _CREATESESSIONRESPONSE._serialized_end=439 - _DELETESESSIONREQUEST._serialized_start=441 - _DELETESESSIONREQUEST._serialized_end=492 - _DELETESESSIONRESPONSE._serialized_start=494 - _DELETESESSIONRESPONSE._serialized_end=601 - _ATTACHSESSIONREQUEST._serialized_start=603 - _ATTACHSESSIONREQUEST._serialized_end=654 - _SESSIONSTATE._serialized_start=656 - _SESSIONSTATE._serialized_end=754 - _SERIALIZABLEMODESETTINGS._serialized_start=756 - _SERIALIZABLEMODESETTINGS._serialized_end=782 - _ONLINEMODESETTINGS._serialized_start=784 - _ONLINEMODESETTINGS._serialized_end=838 - _STALEMODESETTINGS._serialized_start=840 - _STALEMODESETTINGS._serialized_end=859 - _SNAPSHOTMODESETTINGS._serialized_start=861 - _SNAPSHOTMODESETTINGS._serialized_end=883 - _TRANSACTIONSETTINGS._serialized_start=886 - _TRANSACTIONSETTINGS._serialized_end=1169 - _TRANSACTIONCONTROL._serialized_start=1172 - _TRANSACTIONCONTROL._serialized_end=1304 - _BEGINTRANSACTIONREQUEST._serialized_start=1306 - _BEGINTRANSACTIONREQUEST._serialized_end=1413 - _TRANSACTIONMETA._serialized_start=1415 - _TRANSACTIONMETA._serialized_end=1453 - _BEGINTRANSACTIONRESPONSE._serialized_start=1456 - _BEGINTRANSACTIONRESPONSE._serialized_end=1611 - _COMMITTRANSACTIONREQUEST._serialized_start=1613 - _COMMITTRANSACTIONREQUEST._serialized_end=1692 - _COMMITTRANSACTIONRESPONSE._serialized_start=1694 - _COMMITTRANSACTIONRESPONSE._serialized_end=1805 - _ROLLBACKTRANSACTIONREQUEST._serialized_start=1807 - _ROLLBACKTRANSACTIONREQUEST._serialized_end=1888 - _ROLLBACKTRANSACTIONRESPONSE._serialized_start=1890 - _ROLLBACKTRANSACTIONRESPONSE._serialized_end=2003 - _QUERYCONTENT._serialized_start=2005 - _QUERYCONTENT._serialized_end=2068 - _EXECUTEQUERYREQUEST._serialized_start=2071 - _EXECUTEQUERYREQUEST._serialized_end=2552 - _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_start=2477 - _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_end=2543 - _RESULTSETMETA._serialized_start=2554 - _RESULTSETMETA._serialized_end=2599 - _EXECUTEQUERYRESPONSEPART._serialized_start=2602 - _EXECUTEQUERYRESPONSEPART._serialized_end=2877 - _EXECUTESCRIPTREQUEST._serialized_start=2880 - _EXECUTESCRIPTREQUEST._serialized_end=3294 - _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_start=2477 - _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_end=2543 - _EXECUTESCRIPTMETADATA._serialized_start=3297 - _EXECUTESCRIPTMETADATA._serialized_end=3584 - _FETCHSCRIPTRESULTSREQUEST._serialized_start=3587 - _FETCHSCRIPTRESULTSREQUEST._serialized_end=3731 - _FETCHSCRIPTRESULTSRESPONSE._serialized_start=3734 - _FETCHSCRIPTRESULTSRESPONSE._serialized_end=3953 - _SCRIPT._serialized_start=3955 - _SCRIPT._serialized_end=4012 + _SYNTAX._serialized_start=4253 + _SYNTAX._serialized_end=4319 + _EXECMODE._serialized_start=4322 + _EXECMODE._serialized_end=4456 + _STATSMODE._serialized_start=4458 + _STATSMODE._serialized_end=4585 + _SCHEMAINCLUSIONMODE._serialized_start=4588 + _SCHEMAINCLUSIONMODE._serialized_end=4720 + _EXECSTATUS._serialized_start=4723 + _EXECSTATUS._serialized_end=4893 + _CREATESESSIONREQUEST._serialized_start=277 + _CREATESESSIONREQUEST._serialized_end=299 + _CREATESESSIONRESPONSE._serialized_start=302 + _CREATESESSIONRESPONSE._serialized_end=465 + _DELETESESSIONREQUEST._serialized_start=467 + _DELETESESSIONREQUEST._serialized_end=518 + _DELETESESSIONRESPONSE._serialized_start=520 + _DELETESESSIONRESPONSE._serialized_end=627 + _ATTACHSESSIONREQUEST._serialized_start=629 + _ATTACHSESSIONREQUEST._serialized_end=680 + _SESSIONSTATE._serialized_start=682 + _SESSIONSTATE._serialized_end=780 + _SERIALIZABLEMODESETTINGS._serialized_start=782 + _SERIALIZABLEMODESETTINGS._serialized_end=808 + _ONLINEMODESETTINGS._serialized_start=810 + _ONLINEMODESETTINGS._serialized_end=864 + _STALEMODESETTINGS._serialized_start=866 + _STALEMODESETTINGS._serialized_end=885 + _SNAPSHOTMODESETTINGS._serialized_start=887 + _SNAPSHOTMODESETTINGS._serialized_end=909 + _TRANSACTIONSETTINGS._serialized_start=912 + _TRANSACTIONSETTINGS._serialized_end=1195 + _TRANSACTIONCONTROL._serialized_start=1198 + _TRANSACTIONCONTROL._serialized_end=1330 + _BEGINTRANSACTIONREQUEST._serialized_start=1332 + _BEGINTRANSACTIONREQUEST._serialized_end=1439 + _TRANSACTIONMETA._serialized_start=1441 + _TRANSACTIONMETA._serialized_end=1479 + _BEGINTRANSACTIONRESPONSE._serialized_start=1482 + _BEGINTRANSACTIONRESPONSE._serialized_end=1637 + _COMMITTRANSACTIONREQUEST._serialized_start=1639 + _COMMITTRANSACTIONREQUEST._serialized_end=1718 + _COMMITTRANSACTIONRESPONSE._serialized_start=1720 + _COMMITTRANSACTIONRESPONSE._serialized_end=1831 + _ROLLBACKTRANSACTIONREQUEST._serialized_start=1833 + _ROLLBACKTRANSACTIONREQUEST._serialized_end=1914 + _ROLLBACKTRANSACTIONRESPONSE._serialized_start=1916 + _ROLLBACKTRANSACTIONRESPONSE._serialized_end=2029 + _QUERYCONTENT._serialized_start=2031 + _QUERYCONTENT._serialized_end=2094 + _EXECUTEQUERYREQUEST._serialized_start=2097 + _EXECUTEQUERYREQUEST._serialized_end=2791 + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_start=2716 + _EXECUTEQUERYREQUEST_PARAMETERSENTRY._serialized_end=2782 + _RESULTSETMETA._serialized_start=2793 + _RESULTSETMETA._serialized_end=2838 + _EXECUTEQUERYRESPONSEPART._serialized_start=2841 + _EXECUTEQUERYRESPONSEPART._serialized_end=3116 + _EXECUTESCRIPTREQUEST._serialized_start=3119 + _EXECUTESCRIPTREQUEST._serialized_end=3533 + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_start=2716 + _EXECUTESCRIPTREQUEST_PARAMETERSENTRY._serialized_end=2782 + _EXECUTESCRIPTMETADATA._serialized_start=3536 + _EXECUTESCRIPTMETADATA._serialized_end=3823 + _FETCHSCRIPTRESULTSREQUEST._serialized_start=3826 + _FETCHSCRIPTRESULTSREQUEST._serialized_end=3970 + _FETCHSCRIPTRESULTSRESPONSE._serialized_start=3973 + _FETCHSCRIPTRESULTSRESPONSE._serialized_end=4192 + _SCRIPT._serialized_start=4194 + _SCRIPT._serialized_end=4251 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_query_pb2.pyi b/ydb/_grpc/v5/protos/ydb_query_pb2.pyi index 621827b2..f9aac068 100644 --- a/ydb/_grpc/v5/protos/ydb_query_pb2.pyi +++ b/ydb/_grpc/v5/protos/ydb_query_pb2.pyi @@ -4,6 +4,7 @@ from protos import ydb_issue_message_pb2 as _ydb_issue_message_pb2 from protos import ydb_operation_pb2 as _ydb_operation_pb2 from protos import ydb_query_stats_pb2 as _ydb_query_stats_pb2 from protos import ydb_status_codes_pb2 as _ydb_status_codes_pb2 +from protos import ydb_formats_pb2 as _ydb_formats_pb2 from protos import ydb_value_pb2 as _ydb_value_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper @@ -23,6 +24,9 @@ EXEC_STATUS_COMPLETED: ExecStatus EXEC_STATUS_FAILED: ExecStatus EXEC_STATUS_STARTING: ExecStatus EXEC_STATUS_UNSPECIFIED: ExecStatus +SCHEMA_INCLUSION_MODE_ALWAYS: SchemaInclusionMode +SCHEMA_INCLUSION_MODE_FIRST_ONLY: SchemaInclusionMode +SCHEMA_INCLUSION_MODE_UNSPECIFIED: SchemaInclusionMode STATS_MODE_BASIC: StatsMode STATS_MODE_FULL: StatsMode STATS_MODE_NONE: StatsMode @@ -103,7 +107,7 @@ class DeleteSessionResponse(_message.Message): def __init__(self, status: _Optional[_Union[_ydb_status_codes_pb2.StatusIds.StatusCode, str]] = ..., issues: _Optional[_Iterable[_Union[_ydb_issue_message_pb2.IssueMessage, _Mapping]]] = ...) -> None: ... class ExecuteQueryRequest(_message.Message): - __slots__ = ["concurrent_result_sets", "exec_mode", "parameters", "pool_id", "query_content", "response_part_limit_bytes", "session_id", "stats_mode", "tx_control"] + __slots__ = ["arrow_format_settings", "concurrent_result_sets", "exec_mode", "parameters", "pool_id", "query_content", "response_part_limit_bytes", "result_set_format", "schema_inclusion_mode", "session_id", "stats_mode", "stats_period_ms", "tx_control"] class ParametersEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -111,25 +115,33 @@ class ExecuteQueryRequest(_message.Message): key: str value: _ydb_value_pb2.TypedValue def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_ydb_value_pb2.TypedValue, _Mapping]] = ...) -> None: ... + ARROW_FORMAT_SETTINGS_FIELD_NUMBER: _ClassVar[int] CONCURRENT_RESULT_SETS_FIELD_NUMBER: _ClassVar[int] EXEC_MODE_FIELD_NUMBER: _ClassVar[int] PARAMETERS_FIELD_NUMBER: _ClassVar[int] POOL_ID_FIELD_NUMBER: _ClassVar[int] QUERY_CONTENT_FIELD_NUMBER: _ClassVar[int] RESPONSE_PART_LIMIT_BYTES_FIELD_NUMBER: _ClassVar[int] + RESULT_SET_FORMAT_FIELD_NUMBER: _ClassVar[int] + SCHEMA_INCLUSION_MODE_FIELD_NUMBER: _ClassVar[int] SESSION_ID_FIELD_NUMBER: _ClassVar[int] STATS_MODE_FIELD_NUMBER: _ClassVar[int] + STATS_PERIOD_MS_FIELD_NUMBER: _ClassVar[int] TX_CONTROL_FIELD_NUMBER: _ClassVar[int] + arrow_format_settings: _ydb_formats_pb2.ArrowFormatSettings concurrent_result_sets: bool exec_mode: ExecMode parameters: _containers.MessageMap[str, _ydb_value_pb2.TypedValue] pool_id: str query_content: QueryContent response_part_limit_bytes: int + result_set_format: _ydb_value_pb2.ResultSet.Format + schema_inclusion_mode: SchemaInclusionMode session_id: str stats_mode: StatsMode + stats_period_ms: int tx_control: TransactionControl - def __init__(self, session_id: _Optional[str] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., tx_control: _Optional[_Union[TransactionControl, _Mapping]] = ..., query_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., concurrent_result_sets: bool = ..., response_part_limit_bytes: _Optional[int] = ..., pool_id: _Optional[str] = ...) -> None: ... + def __init__(self, session_id: _Optional[str] = ..., exec_mode: _Optional[_Union[ExecMode, str]] = ..., tx_control: _Optional[_Union[TransactionControl, _Mapping]] = ..., query_content: _Optional[_Union[QueryContent, _Mapping]] = ..., parameters: _Optional[_Mapping[str, _ydb_value_pb2.TypedValue]] = ..., stats_mode: _Optional[_Union[StatsMode, str]] = ..., concurrent_result_sets: bool = ..., response_part_limit_bytes: _Optional[int] = ..., pool_id: _Optional[str] = ..., stats_period_ms: _Optional[int] = ..., schema_inclusion_mode: _Optional[_Union[SchemaInclusionMode, str]] = ..., result_set_format: _Optional[_Union[_ydb_value_pb2.ResultSet.Format, str]] = ..., arrow_format_settings: _Optional[_Union[_ydb_formats_pb2.ArrowFormatSettings, _Mapping]] = ...) -> None: ... class ExecuteQueryResponsePart(_message.Message): __slots__ = ["exec_stats", "issues", "result_set", "result_set_index", "status", "tx_meta"] @@ -313,5 +325,8 @@ class ExecMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): class StatsMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] +class SchemaInclusionMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + class ExecStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] diff --git a/ydb/_grpc/v5/protos/ydb_value_pb2.py b/ydb/_grpc/v5/protos/ydb_value_pb2.py index e12a525c..fb46f3f2 100644 --- a/ydb/_grpc/v5/protos/ydb_value_pb2.py +++ b/ydb/_grpc/v5/protos/ydb_value_pb2.py @@ -13,9 +13,10 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from ydb._grpc.v5.protos import ydb_formats_pb2 as protos_dot_ydb__formats__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"_\n\x06PgType\x12\x11\n\ttype_name\x18\n \x01(\t\x12\x15\n\rtype_modifier\x18\x0b \x01(\t\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\x9f\x08\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xad\x03\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\n\n\x06\x44\x41TE32\x10@\x12\x0e\n\nDATETIME64\x10\x41\x12\x0f\n\x0bTIMESTAMP64\x10\x42\x12\x0e\n\nINTERVAL64\x10\x43\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"V\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16protos/ydb_value.proto\x12\x03Ydb\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18protos/ydb_formats.proto\"/\n\x0b\x44\x65\x63imalType\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\'\n\x0cOptionalType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"#\n\x08ListType\x12\x17\n\x04item\x18\x01 \x01(\x0b\x32\t.Ydb.Type\"e\n\x0bVariantType\x12%\n\x0btuple_items\x18\x01 \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12\'\n\x0cstruct_items\x18\x02 \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x42\x06\n\x04type\"(\n\tTupleType\x12\x1b\n\x08\x65lements\x18\x01 \x03(\x0b\x32\t.Ydb.Type\"5\n\x0cStructMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"0\n\nStructType\x12\"\n\x07members\x18\x01 \x03(\x0b\x32\x11.Ydb.StructMember\">\n\x08\x44ictType\x12\x16\n\x03key\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x1a\n\x07payload\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"2\n\nTaggedType\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"_\n\x06PgType\x12\x11\n\ttype_name\x18\n \x01(\t\x12\x15\n\rtype_modifier\x18\x0b \x01(\t\x12\x0b\n\x03oid\x18\x01 \x01(\r\x12\x0e\n\x06typlen\x18\x02 \x01(\x05\x12\x0e\n\x06typmod\x18\x03 \x01(\x05\"\x9f\x08\n\x04Type\x12,\n\x07type_id\x18\x01 \x01(\x0e\x32\x19.Ydb.Type.PrimitiveTypeIdH\x00\x12(\n\x0c\x64\x65\x63imal_type\x18\x02 \x01(\x0b\x32\x10.Ydb.DecimalTypeH\x00\x12*\n\roptional_type\x18\x65 \x01(\x0b\x32\x11.Ydb.OptionalTypeH\x00\x12\"\n\tlist_type\x18\x66 \x01(\x0b\x32\r.Ydb.ListTypeH\x00\x12$\n\ntuple_type\x18g \x01(\x0b\x32\x0e.Ydb.TupleTypeH\x00\x12&\n\x0bstruct_type\x18h \x01(\x0b\x32\x0f.Ydb.StructTypeH\x00\x12\"\n\tdict_type\x18i \x01(\x0b\x32\r.Ydb.DictTypeH\x00\x12(\n\x0cvariant_type\x18j \x01(\x0b\x32\x10.Ydb.VariantTypeH\x00\x12&\n\x0btagged_type\x18k \x01(\x0b\x32\x0f.Ydb.TaggedTypeH\x00\x12\x30\n\tvoid_type\x18\xc9\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x30\n\tnull_type\x18\xca\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_list_type\x18\xcb\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x36\n\x0f\x65mpty_dict_type\x18\xcc\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x1f\n\x07pg_type\x18\xcd\x01 \x01(\x0b\x32\x0b.Ydb.PgTypeH\x00\"\xad\x03\n\x0fPrimitiveTypeId\x12!\n\x1dPRIMITIVE_TYPE_ID_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x06\x12\x08\n\x04INT8\x10\x07\x12\t\n\x05UINT8\x10\x05\x12\t\n\x05INT16\x10\x08\x12\n\n\x06UINT16\x10\t\x12\t\n\x05INT32\x10\x01\x12\n\n\x06UINT32\x10\x02\x12\t\n\x05INT64\x10\x03\x12\n\n\x06UINT64\x10\x04\x12\t\n\x05\x46LOAT\x10!\x12\n\n\x06\x44OUBLE\x10 \x12\x08\n\x04\x44\x41TE\x10\x30\x12\x0c\n\x08\x44\x41TETIME\x10\x31\x12\r\n\tTIMESTAMP\x10\x32\x12\x0c\n\x08INTERVAL\x10\x33\x12\x0b\n\x07TZ_DATE\x10\x34\x12\x0f\n\x0bTZ_DATETIME\x10\x35\x12\x10\n\x0cTZ_TIMESTAMP\x10\x36\x12\n\n\x06\x44\x41TE32\x10@\x12\x0e\n\nDATETIME64\x10\x41\x12\x0f\n\x0bTIMESTAMP64\x10\x42\x12\x0e\n\nINTERVAL64\x10\x43\x12\x0b\n\x06STRING\x10\x81 \x12\t\n\x04UTF8\x10\x80$\x12\t\n\x04YSON\x10\x81$\x12\t\n\x04JSON\x10\x82$\x12\t\n\x04UUID\x10\x83$\x12\x12\n\rJSON_DOCUMENT\x10\x84$\x12\r\n\x08\x44YNUMBER\x10\x82&B\x06\n\x04type\"A\n\tValuePair\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.Ydb.Value\x12\x1b\n\x07payload\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"\xb1\x03\n\x05Value\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint32_value\x18\x02 \x01(\x0fH\x00\x12\x16\n\x0cuint32_value\x18\x03 \x01(\x07H\x00\x12\x15\n\x0bint64_value\x18\x04 \x01(\x10H\x00\x12\x16\n\x0cuint64_value\x18\x05 \x01(\x06H\x00\x12\x15\n\x0b\x66loat_value\x18\x06 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x07 \x01(\x01H\x00\x12\x15\n\x0b\x62ytes_value\x18\x08 \x01(\x0cH\x00\x12\x14\n\ntext_value\x18\t \x01(\tH\x00\x12\x35\n\x0fnull_flag_value\x18\n \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\"\n\x0cnested_value\x18\x0b \x01(\x0b\x32\n.Ydb.ValueH\x00\x12\x11\n\x07low_128\x18\x0f \x01(\x06H\x00\x12\x19\n\x05items\x18\x0c \x03(\x0b\x32\n.Ydb.Value\x12\x1d\n\x05pairs\x18\r \x03(\x0b\x32\x0e.Ydb.ValuePair\x12\x15\n\rvariant_index\x18\x0e \x01(\r\x12\x10\n\x08high_128\x18\x10 \x01(\x06\x42\x07\n\x05value\"@\n\nTypedValue\x12\x17\n\x04type\x18\x01 \x01(\x0b\x32\t.Ydb.Type\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Ydb.Value\"/\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x04type\x18\x02 \x01(\x0b\x32\t.Ydb.Type\"\x8a\x02\n\tResultSet\x12\x1c\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x0b.Ydb.Column\x12\x18\n\x04rows\x18\x02 \x03(\x0b\x32\n.Ydb.Value\x12\x11\n\ttruncated\x18\x03 \x01(\x08\x12%\n\x06\x66ormat\x18\x04 \x01(\x0e\x32\x15.Ydb.ResultSet.Format\x12\x37\n\x11\x61rrow_format_meta\x18\x05 \x01(\x0b\x32\x1c.Ydb.Formats.ArrowFormatMeta\x12\x0c\n\x04\x64\x61ta\x18\x0f \x01(\x0c\"D\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46ORMAT_VALUE\x10\x01\x12\x10\n\x0c\x46ORMAT_ARROW\x10\x02\x42T\n\x0etech.ydb.protoB\x0bValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\xf8\x01\x01\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protos.ydb_value_pb2', globals()) @@ -23,38 +24,40 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\016tech.ydb.protoB\013ValueProtosZ2github.com/ydb-platform/ydb-go-genproto/protos/Ydb\370\001\001' - _DECIMALTYPE._serialized_start=61 - _DECIMALTYPE._serialized_end=108 - _OPTIONALTYPE._serialized_start=110 - _OPTIONALTYPE._serialized_end=149 - _LISTTYPE._serialized_start=151 - _LISTTYPE._serialized_end=186 - _VARIANTTYPE._serialized_start=188 - _VARIANTTYPE._serialized_end=289 - _TUPLETYPE._serialized_start=291 - _TUPLETYPE._serialized_end=331 - _STRUCTMEMBER._serialized_start=333 - _STRUCTMEMBER._serialized_end=386 - _STRUCTTYPE._serialized_start=388 - _STRUCTTYPE._serialized_end=436 - _DICTTYPE._serialized_start=438 - _DICTTYPE._serialized_end=500 - _TAGGEDTYPE._serialized_start=502 - _TAGGEDTYPE._serialized_end=552 - _PGTYPE._serialized_start=554 - _PGTYPE._serialized_end=649 - _TYPE._serialized_start=652 - _TYPE._serialized_end=1707 - _TYPE_PRIMITIVETYPEID._serialized_start=1270 - _TYPE_PRIMITIVETYPEID._serialized_end=1699 - _VALUEPAIR._serialized_start=1709 - _VALUEPAIR._serialized_end=1774 - _VALUE._serialized_start=1777 - _VALUE._serialized_end=2210 - _TYPEDVALUE._serialized_start=2212 - _TYPEDVALUE._serialized_end=2276 - _COLUMN._serialized_start=2278 - _COLUMN._serialized_end=2325 - _RESULTSET._serialized_start=2327 - _RESULTSET._serialized_end=2413 + _DECIMALTYPE._serialized_start=87 + _DECIMALTYPE._serialized_end=134 + _OPTIONALTYPE._serialized_start=136 + _OPTIONALTYPE._serialized_end=175 + _LISTTYPE._serialized_start=177 + _LISTTYPE._serialized_end=212 + _VARIANTTYPE._serialized_start=214 + _VARIANTTYPE._serialized_end=315 + _TUPLETYPE._serialized_start=317 + _TUPLETYPE._serialized_end=357 + _STRUCTMEMBER._serialized_start=359 + _STRUCTMEMBER._serialized_end=412 + _STRUCTTYPE._serialized_start=414 + _STRUCTTYPE._serialized_end=462 + _DICTTYPE._serialized_start=464 + _DICTTYPE._serialized_end=526 + _TAGGEDTYPE._serialized_start=528 + _TAGGEDTYPE._serialized_end=578 + _PGTYPE._serialized_start=580 + _PGTYPE._serialized_end=675 + _TYPE._serialized_start=678 + _TYPE._serialized_end=1733 + _TYPE_PRIMITIVETYPEID._serialized_start=1296 + _TYPE_PRIMITIVETYPEID._serialized_end=1725 + _VALUEPAIR._serialized_start=1735 + _VALUEPAIR._serialized_end=1800 + _VALUE._serialized_start=1803 + _VALUE._serialized_end=2236 + _TYPEDVALUE._serialized_start=2238 + _TYPEDVALUE._serialized_end=2302 + _COLUMN._serialized_start=2304 + _COLUMN._serialized_end=2351 + _RESULTSET._serialized_start=2354 + _RESULTSET._serialized_end=2620 + _RESULTSET_FORMAT._serialized_start=2552 + _RESULTSET_FORMAT._serialized_end=2620 # @@protoc_insertion_point(module_scope) diff --git a/ydb/_grpc/v5/protos/ydb_value_pb2.pyi b/ydb/_grpc/v5/protos/ydb_value_pb2.pyi index 8382a771..a00c2638 100644 --- a/ydb/_grpc/v5/protos/ydb_value_pb2.pyi +++ b/ydb/_grpc/v5/protos/ydb_value_pb2.pyi @@ -1,4 +1,5 @@ from google.protobuf import struct_pb2 as _struct_pb2 +from protos import ydb_formats_pb2 as _ydb_formats_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -58,14 +59,25 @@ class PgType(_message.Message): def __init__(self, type_name: _Optional[str] = ..., type_modifier: _Optional[str] = ..., oid: _Optional[int] = ..., typlen: _Optional[int] = ..., typmod: _Optional[int] = ...) -> None: ... class ResultSet(_message.Message): - __slots__ = ["columns", "rows", "truncated"] + __slots__ = ["arrow_format_meta", "columns", "data", "format", "rows", "truncated"] + class Format(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ARROW_FORMAT_META_FIELD_NUMBER: _ClassVar[int] COLUMNS_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + FORMAT_ARROW: ResultSet.Format + FORMAT_FIELD_NUMBER: _ClassVar[int] + FORMAT_UNSPECIFIED: ResultSet.Format + FORMAT_VALUE: ResultSet.Format ROWS_FIELD_NUMBER: _ClassVar[int] TRUNCATED_FIELD_NUMBER: _ClassVar[int] + arrow_format_meta: _ydb_formats_pb2.ArrowFormatMeta columns: _containers.RepeatedCompositeFieldContainer[Column] + data: bytes + format: ResultSet.Format rows: _containers.RepeatedCompositeFieldContainer[Value] truncated: bool - def __init__(self, columns: _Optional[_Iterable[_Union[Column, _Mapping]]] = ..., rows: _Optional[_Iterable[_Union[Value, _Mapping]]] = ..., truncated: bool = ...) -> None: ... + def __init__(self, columns: _Optional[_Iterable[_Union[Column, _Mapping]]] = ..., rows: _Optional[_Iterable[_Union[Value, _Mapping]]] = ..., truncated: bool = ..., format: _Optional[_Union[ResultSet.Format, str]] = ..., arrow_format_meta: _Optional[_Union[_ydb_formats_pb2.ArrowFormatMeta, _Mapping]] = ..., data: _Optional[bytes] = ...) -> None: ... class StructMember(_message.Message): __slots__ = ["name", "type"] diff --git a/ydb/aio/query/session.py b/ydb/aio/query/session.py index 98ea1849..01e6bb27 100644 --- a/ydb/aio/query/session.py +++ b/ydb/aio/query/session.py @@ -124,6 +124,9 @@ async def execute( settings: Optional[BaseRequestSettings] = None, *, stats_mode: Optional[base.QueryStatsMode] = None, + schema_inclusion_mode: Optional[base.QuerySchemaInclusionMode] = None, + result_set_format: Optional[base.QueryResultSetFormat] = None, + arrow_format_settings: Optional[base.ArrowFormatSettings] = None, ) -> AsyncResponseContextIterator: """Sends a query to Query Service @@ -138,6 +141,13 @@ async def execute( 2) QueryStatsMode.BASIC; 3) QueryStatsMode.FULL; 4) QueryStatsMode.PROFILE; + :param schema_inclusion_mode: Schema inclusion mode for result sets: + 1) QuerySchemaInclusionMode.ALWAYS, which is default; + 2) QuerySchemaInclusionMode.FIRST_ONLY. + :param result_set_format: Format of the result sets: + 1) QueryResultSetFormat.VALUE, which is default; + 2) QueryResultSetFormat.ARROW. + :param arrow_format_settings: Settings for Arrow format when result_set_format is ARROW. :return: Iterator with result sets """ @@ -150,6 +160,9 @@ async def execute( syntax=syntax, exec_mode=exec_mode, stats_mode=stats_mode, + schema_inclusion_mode=schema_inclusion_mode, + result_set_format=result_set_format, + arrow_format_settings=arrow_format_settings, concurrent_result_sets=concurrent_result_sets, settings=settings, ) diff --git a/ydb/aio/query/transaction.py b/ydb/aio/query/transaction.py index 9b2db2ef..d8e99ef3 100644 --- a/ydb/aio/query/transaction.py +++ b/ydb/aio/query/transaction.py @@ -144,6 +144,9 @@ async def execute( settings: Optional[BaseRequestSettings] = None, *, stats_mode: Optional[base.QueryStatsMode] = None, + schema_inclusion_mode: Optional[base.QuerySchemaInclusionMode] = None, + result_set_format: Optional[base.QueryResultSetFormat] = None, + arrow_format_settings: Optional[base.ArrowFormatSettings] = None, ) -> AsyncResponseContextIterator: """Sends a query to Query Service @@ -164,6 +167,13 @@ async def execute( 2) QueryStatsMode.BASIC; 3) QueryStatsMode.FULL; 4) QueryStatsMode.PROFILE; + :param schema_inclusion_mode: Schema inclusion mode for result sets: + 1) QuerySchemaInclusionMode.ALWAYS, which is default; + 2) QuerySchemaInclusionMode.FIRST_ONLY. + :param result_set_format: Format of the result sets: + 1) QueryResultSetFormat.VALUE, which is default; + 2) QueryResultSetFormat.ARROW. + :param arrow_format_settings: Settings for Arrow format when result_set_format is ARROW. :return: Iterator with result sets """ @@ -176,6 +186,9 @@ async def execute( syntax=syntax, exec_mode=exec_mode, stats_mode=stats_mode, + schema_inclusion_mode=schema_inclusion_mode, + result_set_format=result_set_format, + arrow_format_settings=arrow_format_settings, concurrent_result_sets=concurrent_result_sets, settings=settings, ) diff --git a/ydb/convert.py b/ydb/convert.py index 485b5897..7bfac9e6 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -2,6 +2,8 @@ import decimal from google.protobuf import struct_pb2 +from ydb.query import QueryResultSetFormat, ArrowFormatMeta + from . import issues, types, _apis @@ -352,14 +354,19 @@ def _unwrap_optionality(column): class _ResultSet(object): - __slots__ = ("columns", "rows", "truncated", "snapshot", "index") + __slots__ = ("columns", "rows", "truncated", "snapshot", "index", "format", "arrow_format_meta", "data") - def __init__(self, columns, rows, truncated, snapshot=None, index=None): + def __init__( + self, columns, rows, truncated, snapshot=None, index=None, format=None, arrow_format_meta=None, data=None + ): self.columns = columns self.rows = rows self.truncated = truncated self.snapshot = snapshot self.index = index + self.format = format + self.arrow_format_meta = arrow_format_meta + self.data = data @classmethod def from_message(cls, message, table_client_settings=None, snapshot=None, index=None): @@ -385,12 +392,28 @@ def from_message(cls, message, table_client_settings=None, snapshot=None, index= column_parser, unwrapped_type = column_info row[column.name] = column_parser(unwrapped_type, value, table_client_settings) rows.append(row) - return cls(message.columns, rows, message.truncated, snapshot, index) + + result_format = message.format if message.format else QueryResultSetFormat.VALUE + + arrow_meta = None + if message.HasField("arrow_format_meta"): + arrow_meta = ArrowFormatMeta.from_proto(message.arrow_format_meta) + + data = message.data if message.data else None + + return cls(message.columns, rows, message.truncated, snapshot, index, result_format, arrow_meta, data) @classmethod def lazy_from_message(cls, message, table_client_settings=None, snapshot=None): rows = _LazyRows(message.rows, table_client_settings, message.columns) - return cls(message.columns, rows, message.truncated, snapshot) + result_format = message.format if message.format else QueryResultSetFormat.VALUE + + arrow_meta = None + if message.HasField("arrow_format_meta"): + arrow_meta = ArrowFormatMeta.from_proto(message.arrow_format_meta) + + data = message.data if message.data else None + return cls(message.columns, rows, message.truncated, snapshot, None, result_format, arrow_meta, data) ResultSet = _ResultSet diff --git a/ydb/query/__init__.py b/ydb/query/__init__.py index 56e87524..2814e504 100644 --- a/ydb/query/__init__.py +++ b/ydb/query/__init__.py @@ -10,6 +10,12 @@ "QuerySession", "QueryStatsMode", "QueryTxContext", + "QuerySchemaInclusionMode", + "QueryResultSetFormat", + "ArrowCompressionCodecType", + "ArrowCompressionCodec", + "ArrowFormatSettings", + "ArrowFormatMeta", ] import logging @@ -18,6 +24,8 @@ QueryClientSettings, QueryExplainResultFormat, QueryStatsMode, + QuerySchemaInclusionMode, + QueryResultSetFormat, ) from .session import QuerySession @@ -30,6 +38,10 @@ QuerySerializableReadWrite, QuerySnapshotReadOnly, QueryStaleReadOnly, + ArrowCompressionCodecType, + ArrowCompressionCodec, + ArrowFormatSettings, + ArrowFormatMeta, ) from .pool import QuerySessionPool diff --git a/ydb/query/base.py b/ydb/query/base.py index d69aa81d..524db6e4 100644 --- a/ydb/query/base.py +++ b/ydb/query/base.py @@ -12,6 +12,7 @@ from .._grpc.grpcwrapper import ydb_query from .._grpc.grpcwrapper.ydb_query_public_types import ( BaseQueryTxMode, + ArrowFormatSettings, ) from ..connection import _RpcState as RpcState from .. import convert @@ -55,6 +56,18 @@ class QueryStatsMode(enum.IntEnum): PROFILE = 40 +class QuerySchemaInclusionMode(enum.IntEnum): + UNSPECIFIED = 0 + ALWAYS = 1 + FIRST_ONLY = 2 + + +class QueryResultSetFormat(enum.IntEnum): + UNSPECIFIED = 0 + VALUE = 1 + ARROW = 2 + + class SyncResponseContextIterator(_utilities.SyncResponseIterator): def __enter__(self) -> "SyncResponseContextIterator": return self @@ -139,6 +152,9 @@ def create_execute_query_request( syntax: Optional[QuerySyntax], exec_mode: Optional[QueryExecMode], stats_mode: Optional[QueryStatsMode], + schema_inclusion_mode: Optional[QuerySchemaInclusionMode], + result_set_format: Optional[QueryResultSetFormat], + arrow_format_settings: Optional[ArrowFormatSettings], parameters: Optional[dict], concurrent_result_sets: Optional[bool], ) -> ydb_query.ExecuteQueryRequest: @@ -146,6 +162,10 @@ def create_execute_query_request( syntax = QuerySyntax.YQL_V1 if not syntax else syntax exec_mode = QueryExecMode.EXECUTE if not exec_mode else exec_mode stats_mode = QueryStatsMode.NONE if stats_mode is None else stats_mode + schema_inclusion_mode = ( + QuerySchemaInclusionMode.ALWAYS if schema_inclusion_mode is None else schema_inclusion_mode + ) + result_set_format = QueryResultSetFormat.VALUE if result_set_format is None else result_set_format tx_control = None if not tx_id and not tx_mode: @@ -176,6 +196,9 @@ def create_execute_query_request( parameters=parameters, concurrent_result_sets=concurrent_result_sets, stats_mode=stats_mode, + schema_inclusion_mode=schema_inclusion_mode, + result_set_format=result_set_format, + arrow_format_settings=arrow_format_settings, ) except BaseException as e: raise issues.ClientInternalError("Unable to prepare execute request") from e diff --git a/ydb/query/session.py b/ydb/query/session.py index 48fa6463..3c0f7bc3 100644 --- a/ydb/query/session.py +++ b/ydb/query/session.py @@ -203,6 +203,9 @@ def _execute_call( syntax: base.QuerySyntax = None, exec_mode: base.QueryExecMode = None, stats_mode: Optional[base.QueryStatsMode] = None, + schema_inclusion_mode: Optional[base.QuerySchemaInclusionMode] = None, + result_set_format: Optional[base.QueryResultSetFormat] = None, + arrow_format_settings: Optional[base.ArrowFormatSettings] = None, concurrent_result_sets: bool = False, settings: Optional[BaseRequestSettings] = None, ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: @@ -218,6 +221,9 @@ def _execute_call( syntax=syntax, exec_mode=exec_mode, stats_mode=stats_mode, + schema_inclusion_mode=schema_inclusion_mode, + result_set_format=result_set_format, + arrow_format_settings=arrow_format_settings, concurrent_result_sets=concurrent_result_sets, ) @@ -336,6 +342,9 @@ def execute( settings: Optional[BaseRequestSettings] = None, *, stats_mode: Optional[base.QueryStatsMode] = None, + schema_inclusion_mode: Optional[base.QuerySchemaInclusionMode] = None, + result_set_format: Optional[base.QueryResultSetFormat] = None, + arrow_format_settings: Optional[base.ArrowFormatSettings] = None, ) -> base.SyncResponseContextIterator: """Sends a query to Query Service @@ -350,6 +359,13 @@ def execute( 2) QueryStatsMode.BASIC; 3) QueryStatsMode.FULL; 4) QueryStatsMode.PROFILE; + :param schema_inclusion_mode: Schema inclusion mode for result sets: + 1) QuerySchemaInclusionMode.ALWAYS, which is default; + 2) QuerySchemaInclusionMode.FIRST_ONLY. + :param result_set_format: Format of the result sets: + 1) QueryResultSetFormat.VALUE, which is default; + 2) QueryResultSetFormat.ARROW. + :param arrow_format_settings: Settings for Arrow format when result_set_format is ARROW. :return: Iterator with result sets """ @@ -362,6 +378,9 @@ def execute( syntax=syntax, exec_mode=exec_mode, stats_mode=stats_mode, + schema_inclusion_mode=schema_inclusion_mode, + result_set_format=result_set_format, + arrow_format_settings=arrow_format_settings, concurrent_result_sets=concurrent_result_sets, settings=settings, ) diff --git a/ydb/query/transaction.py b/ydb/query/transaction.py index 008ac7c4..05554296 100644 --- a/ydb/query/transaction.py +++ b/ydb/query/transaction.py @@ -293,6 +293,9 @@ def _execute_call( syntax: Optional[base.QuerySyntax], exec_mode: Optional[base.QueryExecMode], stats_mode: Optional[base.QueryStatsMode], + schema_inclusion_mode: Optional[base.QuerySchemaInclusionMode], + result_set_format: Optional[base.QueryResultSetFormat], + arrow_format_settings: Optional[base.ArrowFormatSettings], concurrent_result_sets: Optional[bool], settings: Optional[BaseRequestSettings], ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: @@ -311,6 +314,9 @@ def _execute_call( syntax=syntax, exec_mode=exec_mode, stats_mode=stats_mode, + schema_inclusion_mode=schema_inclusion_mode, + result_set_format=result_set_format, + arrow_format_settings=arrow_format_settings, concurrent_result_sets=concurrent_result_sets, ) @@ -462,6 +468,9 @@ def execute( settings: Optional[BaseRequestSettings] = None, *, stats_mode: Optional[base.QueryStatsMode] = None, + schema_inclusion_mode: Optional[base.QuerySchemaInclusionMode] = None, + result_set_format: Optional[base.QueryResultSetFormat] = None, + arrow_format_settings: Optional[base.ArrowFormatSettings] = None, ) -> base.SyncResponseContextIterator: """Sends a query to Query Service @@ -483,6 +492,13 @@ def execute( 2) QueryStatsMode.BASIC; 3) QueryStatsMode.FULL; 4) QueryStatsMode.PROFILE; + :param schema_inclusion_mode: Schema inclusion mode for result sets: + 1) QuerySchemaInclusionMode.ALWAYS, which is default; + 2) QuerySchemaInclusionMode.FIRST_ONLY. + :param result_set_format: Format of the result sets: + 1) QueryResultSetFormat.VALUE, which is default; + 2) QueryResultSetFormat.ARROW. + :param arrow_format_settings: Settings for Arrow format when result_set_format is ARROW. :return: Iterator with result sets """ @@ -494,6 +510,9 @@ def execute( syntax=syntax, exec_mode=exec_mode, stats_mode=stats_mode, + schema_inclusion_mode=schema_inclusion_mode, + result_set_format=result_set_format, + arrow_format_settings=arrow_format_settings, parameters=parameters, concurrent_result_sets=concurrent_result_sets, settings=settings, From 8ec5578bd80ebf3e35a49c1f412c4dd033cb1d02 Mon Sep 17 00:00:00 2001 From: Daniil Timizhev Date: Tue, 18 Nov 2025 13:03:43 +0300 Subject: [PATCH 2/5] Remove circular imports --- ydb/convert.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ydb/convert.py b/ydb/convert.py index 7bfac9e6..cb8c3490 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -2,8 +2,6 @@ import decimal from google.protobuf import struct_pb2 -from ydb.query import QueryResultSetFormat, ArrowFormatMeta - from . import issues, types, _apis @@ -393,6 +391,7 @@ def from_message(cls, message, table_client_settings=None, snapshot=None, index= row[column.name] = column_parser(unwrapped_type, value, table_client_settings) rows.append(row) + from ydb.query import QueryResultSetFormat, ArrowFormatMeta result_format = message.format if message.format else QueryResultSetFormat.VALUE arrow_meta = None @@ -405,6 +404,8 @@ def from_message(cls, message, table_client_settings=None, snapshot=None, index= @classmethod def lazy_from_message(cls, message, table_client_settings=None, snapshot=None): + from ydb.query import QueryResultSetFormat, ArrowFormatMeta + rows = _LazyRows(message.rows, table_client_settings, message.columns) result_format = message.format if message.format else QueryResultSetFormat.VALUE From 166e3ff6932ec742f9cca0aa63f8d0a0ac37e6f9 Mon Sep 17 00:00:00 2001 From: Daniil Timizhev Date: Tue, 18 Nov 2025 13:18:03 +0300 Subject: [PATCH 3/5] format --- ydb/convert.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ydb/convert.py b/ydb/convert.py index cb8c3490..b54e8bdd 100644 --- a/ydb/convert.py +++ b/ydb/convert.py @@ -392,6 +392,7 @@ def from_message(cls, message, table_client_settings=None, snapshot=None, index= rows.append(row) from ydb.query import QueryResultSetFormat, ArrowFormatMeta + result_format = message.format if message.format else QueryResultSetFormat.VALUE arrow_meta = None From 4b3ccb6558cad7e0c50953fd8a9ad51992feaa4c Mon Sep 17 00:00:00 2001 From: Daniil Timizhev Date: Tue, 25 Nov 2025 18:24:27 +0300 Subject: [PATCH 4/5] Add arrow example --- examples/arrow/README.md | 10 ++++++++ examples/arrow/basic_example.py | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 examples/arrow/README.md create mode 100644 examples/arrow/basic_example.py diff --git a/examples/arrow/README.md b/examples/arrow/README.md new file mode 100644 index 00000000..6845e5c5 --- /dev/null +++ b/examples/arrow/README.md @@ -0,0 +1,10 @@ +# YDB Python SDK Example: arrow + +Example code demonstrating how to get query execution results in Arrow format. + +## Requirements + +- `pyarrow` version 5.0.0 or higher +- `EnableArrowResultSetFormat` feature flag enabled on the YDB server + +See the top-level [README.md](../README.md) file for instructions on running this example. diff --git a/examples/arrow/basic_example.py b/examples/arrow/basic_example.py new file mode 100644 index 00000000..38bc1911 --- /dev/null +++ b/examples/arrow/basic_example.py @@ -0,0 +1,41 @@ +import ydb +import pyarrow as pa + +def main(): + driver_config = ydb.DriverConfig( + endpoint="grpc://localhost:2136", + database="/local", + # credentials=ydb.credentials_from_env_variables(), + # root_certificates=ydb.load_ydb_root_certificate(), + ) + + try: + driver = ydb.Driver(driver_config) + driver.wait(timeout=5) + except TimeoutError: + raise RuntimeError("Connect failed to YDB") + + pool = ydb.QuerySessionPool(driver) + + query = """ + SELECT * FROM example ORDER BY key LIMIT 100; + """ + + format_settings = ydb.ArrowFormatSettings( + compression_codec=ydb.ArrowCompressionCodec(ydb.ArrowCompressionCodecType.ZSTD, 10) + ) + + result = pool.execute_with_retries( + query, + result_set_format=ydb.QueryResultSetFormat.ARROW, + arrow_format_settings=format_settings, + ) + + for result_set in result: + schema: pa.Schema = pa.ipc.read_schema(pa.py_buffer(result_set.arrow_format_meta.schema)) + batch: pa.RecordBatch = pa.ipc.read_record_batch(pa.py_buffer(result_set.data), schema) + print(f"Record batch with {batch.num_rows} rows and {batch.num_columns} columns") + + +if __name__ == "__main__": + main() From c44e753a6b3ea5f0f9e3ba6f318ced6c41e9af39 Mon Sep 17 00:00:00 2001 From: Daniil Timizhev Date: Tue, 25 Nov 2025 18:28:31 +0300 Subject: [PATCH 5/5] Format --- examples/arrow/basic_example.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/arrow/basic_example.py b/examples/arrow/basic_example.py index 38bc1911..2fe5fd07 100644 --- a/examples/arrow/basic_example.py +++ b/examples/arrow/basic_example.py @@ -1,6 +1,7 @@ import ydb import pyarrow as pa + def main(): driver_config = ydb.DriverConfig( endpoint="grpc://localhost:2136",