micromegas 0.8.0__py3-none-any.whl → 0.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
micromegas/__init__.py CHANGED
@@ -6,5 +6,4 @@ from . import flightsql
6
6
 
7
7
  def connect():
8
8
  "connect to the analytics service using default values"
9
- channel_cred = grpc.local_channel_credentials()
10
- return flightsql.client.FlightSQLClient("localhost:50051", channel_cred)
9
+ return flightsql.client.FlightSQLClient("grpc://localhost:50051")
@@ -1,10 +1,4 @@
1
1
  # protobufs
2
- from . import Flight_pb2
3
- from . import Flight_pb2_grpc
4
2
  from . import FlightSql_pb2
5
- from . import FlightSql_pb2_grpc
6
- # arrow deserialization
7
- from . import arrow_flatbuffers
8
- from . import arrow_ipc_reader
9
3
  # client API
10
4
  from . import client
@@ -1,227 +1,116 @@
1
+ import certifi
1
2
  import pyarrow
2
- import grpc
3
+ from pyarrow import flight
4
+ from typing import Any
5
+ import sys
3
6
  from google.protobuf import any_pb2
4
- from . import Flight_pb2_grpc
5
- from . import FlightSql_pb2_grpc
6
7
  from . import FlightSql_pb2
7
- from . import Flight_pb2
8
- from . import arrow_flatbuffers
9
- from . import arrow_ipc_reader
10
8
  from . import time
11
9
 
12
10
 
13
- def fb_time_unit_to_string(fb_time_unit):
14
- time_unit_enum = arrow_flatbuffers.TimeUnit
15
- if fb_time_unit == time_unit_enum.SECOND:
16
- return "s"
17
- if fb_time_unit == time_unit_enum.MILLISECOND:
18
- return "ms"
19
- if fb_time_unit == time_unit_enum.MICROSECOND:
20
- return "us"
21
- if fb_time_unit == time_unit_enum.NANOSECOND:
22
- return "ns"
23
- raise RuntimeError("unsupported time unit {}".format(fb_time_unit))
24
-
25
-
26
- def fb_field_type_to_arrow(fb_field):
27
- fb_type = fb_field.TypeType()
28
- fb_type_enum = arrow_flatbuffers.Type
29
- assert fb_type != fb_type_enum.NONE
30
- if fb_type == fb_type_enum.Null:
31
- return pyarrow.null()
32
- elif fb_type == fb_type_enum.Int:
33
- type_int = arrow_flatbuffers.Int()
34
- field_type_table = fb_field.Type()
35
- type_int.Init(field_type_table.Bytes, field_type_table.Pos)
36
- if type_int.IsSigned():
37
- if type_int.BitWidth() == 8:
38
- return pyarrow.int8()
39
- elif type_int.BitWidth() == 16:
40
- return pyarrow.int16()
41
- elif type_int.BitWidth() == 32:
42
- return pyarrow.int32()
43
- elif type_int.BitWidth() == 64:
44
- return pyarrow.int64()
45
- else:
46
- raise RuntimeError(
47
- "unsupported int size {}".format(type_int.BitWidth())
48
- )
49
- else:
50
- if type_int.BitWidth() == 8:
51
- return pyarrow.uint8()
52
- elif type_int.BitWidth() == 16:
53
- return pyarrow.uint16()
54
- elif type_int.BitWidth() == 32:
55
- return pyarrow.uint32()
56
- elif type_int.BitWidth() == 64:
57
- return pyarrow.uint64()
58
- else:
59
- raise RuntimeError(
60
- "unsupported uint size {}".format(type_int.BitWidth())
61
- )
62
- elif fb_type == fb_type_enum.FloatingPoint:
63
- return pyarrow.float64()
64
- elif fb_type == fb_type_enum.Binary:
65
- return pyarrow.binary()
66
- elif fb_type == fb_type_enum.Utf8:
67
- return pyarrow.utf8()
68
- elif fb_type == fb_type_enum.Bool:
69
- return pyarrow.bool()
70
- elif fb_type == fb_type_enum.Timestamp:
71
- ts_type = arrow_flatbuffers.Timestamp()
72
- field_type_table = fb_field.Type()
73
- ts_type.Init(field_type_table.Bytes, field_type_table.Pos)
74
- return pyarrow.timestamp(
75
- fb_time_unit_to_string(ts_type.Unit()), ts_type.Timezone()
76
- )
77
- elif fb_type == fb_type_enum.List:
78
- assert 1 == fb_field.ChildrenLength()
79
- child_field = fb_field_to_arrow(fb_field.Children(0))
80
- return pyarrow.list_(child_field)
81
- elif fb_type == fb_type_enum.Struct_:
82
- struct_fields = []
83
- for child_index in range(fb_field.ChildrenLength()):
84
- child = fb_field_to_arrow(fb_field.Children(child_index))
85
- struct_fields.append(child)
86
- return pyarrow.struct(struct_fields)
87
- raise RuntimeError("unknown flatbuffer type {}".format(fb_type))
88
-
89
-
90
- def fb_field_to_arrow(fb_field):
91
- arrow_type = fb_field_type_to_arrow(fb_field)
92
- return pyarrow.field(fb_field.Name(), arrow_type)
93
-
94
-
95
- def make_query_flight_descriptor(sql):
96
- command_query = FlightSql_pb2.CommandStatementQuery(query=sql)
97
- any_cmd = any_pb2.Any()
98
- any_cmd.Pack(command_query)
99
- desc = Flight_pb2.FlightDescriptor()
100
- desc.type = Flight_pb2.FlightDescriptor.DescriptorType.CMD
101
- desc.cmd = any_cmd.SerializeToString()
102
- return desc
103
-
104
-
105
- def read_schema_from_flight_data(flight_data):
106
- msg = arrow_flatbuffers.Message.GetRootAs(flight_data.data_header, 0)
107
- assert msg.Version() == arrow_flatbuffers.MetadataVersion.V5
108
- header = msg.Header()
109
- assert msg.HeaderType() == arrow_flatbuffers.MessageHeader.Schema
110
-
111
- schema = arrow_flatbuffers.Schema()
112
- schema.Init(header.Bytes, header.Pos)
113
- nb_fields = schema.FieldsLength()
114
- arrow_fields = []
115
- for x in range(nb_fields):
116
- field = schema.Fields(x)
117
- arrow_f = fb_field_to_arrow(field)
118
- arrow_fields.append(arrow_f)
119
- arrow_schema = pyarrow.schema(arrow_fields)
120
- return arrow_schema
121
-
122
-
123
- def read_record_batch_from_flight_data(arrow_schema, flight_data):
124
- msg = arrow_flatbuffers.Message.GetRootAs(flight_data.data_header, 0)
125
- assert msg.HeaderType() == arrow_flatbuffers.MessageHeader.RecordBatch
126
- header = msg.Header()
127
- fb_record_batch = arrow_flatbuffers.RecordBatch()
128
- fb_record_batch.Init(header.Bytes, header.Pos)
129
- nodes = []
130
- for node_index in range(fb_record_batch.NodesLength()):
131
- node = fb_record_batch.Nodes(node_index)
132
- nodes.append(node)
133
-
134
- buffers = []
135
- for buffer_index in range(fb_record_batch.BuffersLength()):
136
- buffer = fb_record_batch.Buffers(buffer_index)
137
- buffers.append(buffer)
11
+ class MicromegasMiddleware(flight.ClientMiddleware):
12
+ def __init__(self, headers):
13
+ self.headers = headers
138
14
 
139
- body = pyarrow.py_buffer(flight_data.data_body)
140
- arrow_buffers = []
141
- for b in buffers:
142
- s = body.slice(b.Offset(), b.Length())
143
- arrow_buffers.append(s)
144
- rb = arrow_ipc_reader.read_record_batch(arrow_schema, nodes, arrow_buffers)
145
- return rb
15
+ def call_completed(self, exception):
16
+ if exception is not None:
17
+ print(exception, file=sys.stderr)
146
18
 
19
+ def received_headers(self, headers):
20
+ pass
147
21
 
148
- def channel_creds_from_token(token):
149
- call_credentials = grpc.access_token_call_credentials(token)
150
- channel_cred = grpc.composite_channel_credentials(
151
- grpc.ssl_channel_credentials(), call_credentials
152
- )
153
- return channel_cred
22
+ def sending_headers(self):
23
+ return self.headers
154
24
 
155
25
 
156
- class FlightSQLAuthMetadataPlugin(grpc.AuthMetadataPlugin):
26
+ class MicromegasMiddlewareFactory(flight.ClientMiddlewareFactory):
157
27
  def __init__(self, headers):
158
- # we transform the keys into lowercase to avoid illegal grpc metadata (like 'Authorization', for example)
159
- self.__headers = [(k.lower(), v) for (k, v) in headers.items()]
160
-
161
- def __call__(self, context, callback):
162
- callback(self.__headers, None)
163
-
28
+ self.headers = headers
29
+
30
+ def start_call(self, info):
31
+ return MicromegasMiddleware(self.headers)
32
+
33
+ def make_call_headers( begin, end ):
34
+ call_headers = []
35
+ if begin is not None:
36
+ call_headers.append(
37
+ (
38
+ "query_range_begin".encode("utf8"),
39
+ time.format_datetime(begin).encode("utf8"),
40
+ )
41
+ )
42
+ if end is not None:
43
+ call_headers.append(
44
+ (
45
+ "query_range_end".encode("utf8"),
46
+ time.format_datetime(end).encode("utf8"),
47
+ )
48
+ )
49
+ return call_headers
164
50
 
165
- def channel_creds_from_headers(headers):
166
- auth_plugin = FlightSQLAuthMetadataPlugin(headers)
167
- call_credentials = grpc.metadata_call_credentials(auth_plugin)
168
- channel_cred = grpc.composite_channel_credentials(
169
- grpc.ssl_channel_credentials(), call_credentials
51
+ def make_query_ticket(sql):
52
+ ticket_statement_query = FlightSql_pb2.TicketStatementQuery(
53
+ statement_handle=sql.encode("utf8")
170
54
  )
171
- return channel_cred
172
-
55
+ any = any_pb2.Any()
56
+ any.Pack(ticket_statement_query)
57
+ ticket = flight.Ticket(any.SerializeToString())
58
+ return ticket
59
+
60
+ def make_arrow_flight_descriptor(command: Any) -> flight.FlightDescriptor:
61
+ any = any_pb2.Any()
62
+ any.Pack(command)
63
+ return flight.FlightDescriptor.for_command(any.SerializeToString())
64
+
65
+ def make_ingest_flight_desc(table_name):
66
+ ingest_statement = FlightSql_pb2.CommandStatementIngest(table=table_name, temporary=False)
67
+ desc = make_arrow_flight_descriptor(ingest_statement)
68
+ return desc
173
69
 
174
70
  class FlightSQLClient:
175
- def __init__(self, host_port, channel_creds):
176
- self.__host_port = host_port
177
- self.__channel_creds = channel_creds
178
-
179
- def make_channel(self):
180
- if self.__channel_creds is None:
181
- return grpc.insecure_channel(self.__host_port)
182
- else:
183
- return grpc.secure_channel(self.__host_port, self.__channel_creds)
71
+ def __init__(self, uri, headers=None):
72
+ fh = open(certifi.where(), "r")
73
+ cert = fh.read()
74
+ fh.close()
75
+ factory = MicromegasMiddlewareFactory(headers)
76
+ self.__flight_client = flight.connect(
77
+ location=uri, tls_root_certs=cert, middleware=[factory]
78
+ )
184
79
 
185
80
  def query(self, sql, begin=None, end=None):
186
- metadata = []
187
- if begin is not None:
188
- metadata.append(("query_range_begin", time.format_datetime(begin)))
189
- if end is not None:
190
- metadata.append(("query_range_end", time.format_datetime(end)))
191
-
192
- channel = self.make_channel()
193
- stub = Flight_pb2_grpc.FlightServiceStub(channel)
194
- desc = make_query_flight_descriptor(sql)
195
- info = stub.GetFlightInfo(desc)
196
- grpc_rdv = stub.DoGet(info.endpoint[0].ticket, metadata=metadata)
197
- flight_data_list = list(grpc_rdv)
198
- if len(flight_data_list) < 1:
199
- raise RuntimeError("too few flightdata messages {}", len(flight_data_list))
200
- schema_message = flight_data_list[0]
201
- data_messages = flight_data_list[1:]
202
- schema = read_schema_from_flight_data(schema_message)
81
+ call_headers = make_call_headers(begin, end)
82
+ options = flight.FlightCallOptions(headers=call_headers)
83
+ ticket = make_query_ticket(sql)
84
+ reader = self.__flight_client.do_get(ticket, options=options)
203
85
  record_batches = []
204
- for msg in data_messages:
205
- record_batches.append(read_record_batch_from_flight_data(schema, msg))
206
- table = pyarrow.Table.from_batches(record_batches, schema)
86
+ for chunk in reader:
87
+ record_batches.append(chunk.data)
88
+ table = pyarrow.Table.from_batches(record_batches, reader.schema)
207
89
  return table.to_pandas()
208
90
 
209
91
  def query_stream(self, sql, begin=None, end=None):
210
- metadata = []
211
- if begin is not None:
212
- metadata.append(("query_range_begin", time.format_datetime(begin)))
213
- if end is not None:
214
- metadata.append(("query_range_end", time.format_datetime(end)))
215
-
216
- channel = self.make_channel()
217
- stub = Flight_pb2_grpc.FlightServiceStub(channel)
218
- desc = make_query_flight_descriptor(sql)
219
- info = stub.GetFlightInfo(desc)
220
- grpc_rdv = stub.DoGet(info.endpoint[0].ticket, metadata=metadata)
221
- schema_message = grpc_rdv.next()
222
- schema = read_schema_from_flight_data(schema_message)
223
- for msg in grpc_rdv:
224
- yield read_record_batch_from_flight_data(schema, msg)
92
+ ticket = make_query_ticket(sql)
93
+ call_headers = make_call_headers(begin, end)
94
+ options = flight.FlightCallOptions(headers=call_headers)
95
+ reader = self.__flight_client.do_get(ticket, options=options)
96
+ record_batches = []
97
+ for chunk in reader:
98
+ yield chunk.data
99
+
100
+ def bulk_ingest(self, table_name, df):
101
+ desc = make_ingest_flight_desc(table_name)
102
+ table = pyarrow.Table.from_pandas(df)
103
+ writer, reader = self.__flight_client.do_put(desc, table.schema)
104
+ for rb in table.to_batches():
105
+ writer.write(rb)
106
+ writer.done_writing()
107
+ result = reader.read()
108
+ if result is not None:
109
+ update_result = FlightSql_pb2.DoPutUpdateResult()
110
+ update_result.ParseFromString(result.to_pybytes())
111
+ return update_result
112
+ else:
113
+ return None
225
114
 
226
115
  def retire_partitions(self, view_set_name, view_instance_id, begin, end):
227
116
  sql = """
@@ -291,7 +180,7 @@ class FlightSQLClient:
291
180
  WHERE stream_id='{stream_id}'
292
181
  LIMIT {limit};
293
182
  """.format(
294
- limit=limit,stream_id=stream_id
183
+ limit=limit, stream_id=stream_id
295
184
  )
296
185
  return self.query(sql, begin, end)
297
186
 
@@ -301,7 +190,6 @@ class FlightSQLClient:
301
190
  FROM view_instance('thread_spans', '{stream_id}')
302
191
  LIMIT {limit};
303
192
  """.format(
304
- limit=limit,stream_id=stream_id
193
+ limit=limit, stream_id=stream_id
305
194
  )
306
195
  return self.query(sql, begin, end)
307
-
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: micromegas
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: Python analytics client for https://github.com/madesroches/micromegas/
5
5
  Author: Marc-Antoine Desroches
6
6
  Author-email: madesroches@gmail.com
@@ -9,14 +9,14 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.10
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
- Requires-Dist: cbor2 (>=5.6.3,<6.0.0)
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Requires-Dist: certifi (>=2025.4.26,<2026.0.0)
13
14
  Requires-Dist: crc (>=7.0.0,<8.0.0)
14
- Requires-Dist: flatbuffers (>=24.12.23,<25.0.0)
15
15
  Requires-Dist: grpcio (>=1.69.0,<2.0.0)
16
+ Requires-Dist: numpy (>=2.2.6,<3.0.0)
16
17
  Requires-Dist: pandas (>=2.2.2,<3.0.0)
17
18
  Requires-Dist: protobuf (>=5.29.1,<6.0.0)
18
19
  Requires-Dist: pyarrow (>=18.1.0,<19.0.0)
19
- Requires-Dist: requests (>=2.31.0,<3.0.0)
20
20
  Requires-Dist: tabulate (>=0.9.0,<0.10.0)
21
21
  Requires-Dist: tqdm (>=4.66.5,<5.0.0)
22
22
  Description-Content-Type: text/markdown
@@ -1,12 +1,7 @@
1
- micromegas/__init__.py,sha256=TYFODSzzeVqdR3E1T3kTy73sOAYiQ9uh4rk8yMJ0hyM,284
1
+ micromegas/__init__.py,sha256=oh0BAfNUVpHtFgufYWxvPwRfnqBTXY_nTPrNW1cwn-s,225
2
2
  micromegas/flightsql/FlightSql_pb2.py,sha256=s3CVAQ4W77ALQ9QYFlPZnPqVsRHTD5Ma0fzabQv_8Mc,28207
3
- micromegas/flightsql/FlightSql_pb2_grpc.py,sha256=dCQT-tKxsz3dQgD4Cr0-8F4H0zCwNkXLHzlrbWfMiBA,890
4
- micromegas/flightsql/Flight_pb2.py,sha256=nPe1utv8n59IdNsiv5sJYY10-K04pDVOhKDgV5t-h1A,12513
5
- micromegas/flightsql/Flight_pb2_grpc.py,sha256=mj9Nlla3wpf5xFAGhMZpLDX8vLBClWfZ4w03AbBvrgs,23483
6
- micromegas/flightsql/__init__.py,sha256=SRq2X59uKG-iuwFnSyT7wVfiTMSSryAAEWnQVjGWOM8,249
7
- micromegas/flightsql/arrow_flatbuffers.py,sha256=egpmS59sNFwWmtG2wMeE92MMIyGyZbsm9o24mUnY1MQ,100142
8
- micromegas/flightsql/arrow_ipc_reader.py,sha256=3rxyEgqo5100e0TT9ZKZxNe7lX6Lk0mS6yRoiIJtH6Q,3163
9
- micromegas/flightsql/client.py,sha256=v4igU4nHZdaqBAw5qDtDNl6UBYiLvVnCJk1qDeO8LjE,11241
3
+ micromegas/flightsql/__init__.py,sha256=VWuldsAd-N7tjSdaN_bSKefFJB26zrJzO4aKtO6y60g,74
4
+ micromegas/flightsql/client.py,sha256=2-twcMglhxDjVN2dJVdpkMH8can1y3eOweLDcXUZXug,6425
10
5
  micromegas/flightsql/time.py,sha256=EH3SUEpFvY0lNMj9mOcvfUJuSgrQ3YX4aJnwteK2qhk,582
11
6
  micromegas/perfetto.py,sha256=mXtkQMZ5y9LhyanKWjf3BwehEW_vVR_MtTPrUgsehZ4,7449
12
7
  micromegas/thirdparty/perfetto/protos/perfetto/common/android_energy_consumer_descriptor_pb2.py,sha256=l8QNXqnB-mJIkuFr2s1YoLQXHm3G-ZcOGp_OW_hQ0TE,1887
@@ -215,6 +210,6 @@ micromegas/thirdparty/perfetto/protos/perfetto/trace/translation/translation_tab
215
210
  micromegas/thirdparty/perfetto/protos/perfetto/trace/trigger_pb2.py,sha256=We7Yi8o3cEcrSNxY1zLUUO6tEWnD36C2f3O_s8_qv0I,1435
216
211
  micromegas/thirdparty/perfetto/protos/perfetto/trace/ui_state_pb2.py,sha256=Af-SXwhroNhRXMrtw6e2eU1liCImMRxSdmkt_AuSHf8,1752
217
212
  micromegas/time.py,sha256=eD9fWF2UHxaf-92yd1X2SEgUcpKypqPsvjBosLdpnQA,1026
218
- micromegas-0.8.0.dist-info/METADATA,sha256=-bk5CjnKpubnWStHQoCqbG4Wqda20sM1okTHWs1EIlw,30640
219
- micromegas-0.8.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
220
- micromegas-0.8.0.dist-info/RECORD,,
213
+ micromegas-0.9.0.dist-info/METADATA,sha256=IQWE9hnWk6UZYUc4Qmx92-pH1RVmVnSCZbL1CxTZVZ4,30648
214
+ micromegas-0.9.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
215
+ micromegas-0.9.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,24 +0,0 @@
1
- # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
- """Client and server classes corresponding to protobuf-defined services."""
3
- import grpc
4
- import warnings
5
-
6
-
7
- GRPC_GENERATED_VERSION = '1.68.1'
8
- GRPC_VERSION = grpc.__version__
9
- _version_not_supported = False
10
-
11
- try:
12
- from grpc._utilities import first_version_is_lower
13
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
- except ImportError:
15
- _version_not_supported = True
16
-
17
- if _version_not_supported:
18
- raise RuntimeError(
19
- f'The grpc package installed is at version {GRPC_VERSION},'
20
- + f' but the generated code in FlightSql_pb2_grpc.py depends on'
21
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
- )
@@ -1,116 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: Flight.proto
5
- # Protobuf Python Version: 5.29.1
6
- """Generated protocol buffer code."""
7
- from google.protobuf import descriptor as _descriptor
8
- from google.protobuf import descriptor_pool as _descriptor_pool
9
- from google.protobuf import runtime_version as _runtime_version
10
- from google.protobuf import symbol_database as _symbol_database
11
- from google.protobuf.internal import builder as _builder
12
- _runtime_version.ValidateProtobufRuntimeVersion(
13
- _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 1,
17
- '',
18
- 'Flight.proto'
19
- )
20
- # @@protoc_insertion_point(imports)
21
-
22
- _sym_db = _symbol_database.Default()
23
-
24
-
25
- from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
26
-
27
-
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x46light.proto\x12\x15\x61rrow.flight.protocol\x1a\x1fgoogle/protobuf/timestamp.proto\"=\n\x10HandshakeRequest\x12\x18\n\x10protocol_version\x18\x01 \x01(\x04\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\">\n\x11HandshakeResponse\x12\x18\n\x10protocol_version\x18\x01 \x01(\x04\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"/\n\tBasicAuth\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x10\n\x08password\x18\x03 \x01(\t\"\x07\n\x05\x45mpty\"/\n\nActionType\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"\x1e\n\x08\x43riteria\x12\x12\n\nexpression\x18\x01 \x01(\x0c\"$\n\x06\x41\x63tion\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04\x62ody\x18\x02 \x01(\x0c\"\x16\n\x06Result\x12\x0c\n\x04\x62ody\x18\x01 \x01(\x0c\"\x1e\n\x0cSchemaResult\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\"\xa5\x01\n\x10\x46lightDescriptor\x12\x44\n\x04type\x18\x01 \x01(\x0e\x32\x36.arrow.flight.protocol.FlightDescriptor.DescriptorType\x12\x0b\n\x03\x63md\x18\x02 \x01(\x0c\x12\x0c\n\x04path\x18\x03 \x03(\t\"0\n\x0e\x44\x65scriptorType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04PATH\x10\x01\x12\x07\n\x03\x43MD\x10\x02\"\xec\x01\n\nFlightInfo\x12\x0e\n\x06schema\x18\x01 \x01(\x0c\x12\x42\n\x11\x66light_descriptor\x18\x02 \x01(\x0b\x32\'.arrow.flight.protocol.FlightDescriptor\x12\x37\n\x08\x65ndpoint\x18\x03 \x03(\x0b\x32%.arrow.flight.protocol.FlightEndpoint\x12\x15\n\rtotal_records\x18\x04 \x01(\x03\x12\x13\n\x0btotal_bytes\x18\x05 \x01(\x03\x12\x0f\n\x07ordered\x18\x06 \x01(\x08\x12\x14\n\x0c\x61pp_metadata\x18\x07 \x01(\x0c\"\xd8\x01\n\x08PollInfo\x12/\n\x04info\x18\x01 \x01(\x0b\x32!.arrow.flight.protocol.FlightInfo\x12\x42\n\x11\x66light_descriptor\x18\x02 \x01(\x0b\x32\'.arrow.flight.protocol.FlightDescriptor\x12\x15\n\x08progress\x18\x03 \x01(\x01H\x00\x88\x01\x01\x12\x33\n\x0f\x65xpiration_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\n\t_progress\"J\n\x17\x43\x61ncelFlightInfoRequest\x12/\n\x04info\x18\x01 \x01(\x0b\x32!.arrow.flight.protocol.FlightInfo\"M\n\x16\x43\x61ncelFlightInfoResult\x12\x33\n\x06status\x18\x01 \x01(\x0e\x32#.arrow.flight.protocol.CancelStatus\"\x18\n\x06Ticket\x12\x0e\n\x06ticket\x18\x01 \x01(\x0c\"\x17\n\x08Location\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\xbd\x01\n\x0e\x46lightEndpoint\x12-\n\x06ticket\x18\x01 \x01(\x0b\x32\x1d.arrow.flight.protocol.Ticket\x12\x31\n\x08location\x18\x02 \x03(\x0b\x32\x1f.arrow.flight.protocol.Location\x12\x33\n\x0f\x65xpiration_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0c\x61pp_metadata\x18\x04 \x01(\x0c\"U\n\x1aRenewFlightEndpointRequest\x12\x37\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32%.arrow.flight.protocol.FlightEndpoint\"\x8f\x01\n\nFlightData\x12\x42\n\x11\x66light_descriptor\x18\x01 \x01(\x0b\x32\'.arrow.flight.protocol.FlightDescriptor\x12\x13\n\x0b\x64\x61ta_header\x18\x02 \x01(\x0c\x12\x14\n\x0c\x61pp_metadata\x18\x03 \x01(\x0c\x12\x12\n\tdata_body\x18\xe8\x07 \x01(\x0c\"!\n\tPutResult\x12\x14\n\x0c\x61pp_metadata\x18\x01 \x01(\x0c\"\xfc\x01\n\x12SessionOptionValue\x12\x16\n\x0cstring_value\x18\x01 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x02 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x03 \x01(\x10H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x12V\n\x11string_list_value\x18\x05 \x01(\x0b\x32\x39.arrow.flight.protocol.SessionOptionValue.StringListValueH\x00\x1a!\n\x0fStringListValue\x12\x0e\n\x06values\x18\x01 \x03(\tB\x0e\n\x0coption_value\"\xda\x01\n\x18SetSessionOptionsRequest\x12\\\n\x0fsession_options\x18\x01 \x03(\x0b\x32\x43.arrow.flight.protocol.SetSessionOptionsRequest.SessionOptionsEntry\x1a`\n\x13SessionOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).arrow.flight.protocol.SessionOptionValue:\x02\x38\x01\"\xec\x02\n\x17SetSessionOptionsResult\x12J\n\x06\x65rrors\x18\x01 \x03(\x0b\x32:.arrow.flight.protocol.SetSessionOptionsResult.ErrorsEntry\x1aQ\n\x05\x45rror\x12H\n\x05value\x18\x01 \x01(\x0e\x32\x39.arrow.flight.protocol.SetSessionOptionsResult.ErrorValue\x1a\x63\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.arrow.flight.protocol.SetSessionOptionsResult.Error:\x02\x38\x01\"M\n\nErrorValue\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x10\n\x0cINVALID_NAME\x10\x01\x12\x11\n\rINVALID_VALUE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"\x1a\n\x18GetSessionOptionsRequest\"\xd8\x01\n\x17GetSessionOptionsResult\x12[\n\x0fsession_options\x18\x01 \x03(\x0b\x32\x42.arrow.flight.protocol.GetSessionOptionsResult.SessionOptionsEntry\x1a`\n\x13SessionOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).arrow.flight.protocol.SessionOptionValue:\x02\x38\x01\"\x15\n\x13\x43loseSessionRequest\"\x9d\x01\n\x12\x43loseSessionResult\x12@\n\x06status\x18\x01 \x01(\x0e\x32\x30.arrow.flight.protocol.CloseSessionResult.Status\"E\n\x06Status\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x12\x0b\n\x07\x43LOSING\x10\x02\x12\x11\n\rNOT_CLOSEABLE\x10\x03*\x8b\x01\n\x0c\x43\x61ncelStatus\x12\x1d\n\x19\x43\x41NCEL_STATUS_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x43\x41NCEL_STATUS_CANCELLED\x10\x01\x12\x1c\n\x18\x43\x41NCEL_STATUS_CANCELLING\x10\x02\x12!\n\x1d\x43\x41NCEL_STATUS_NOT_CANCELLABLE\x10\x03\x32\x85\x07\n\rFlightService\x12\x64\n\tHandshake\x12\'.arrow.flight.protocol.HandshakeRequest\x1a(.arrow.flight.protocol.HandshakeResponse\"\x00(\x01\x30\x01\x12U\n\x0bListFlights\x12\x1f.arrow.flight.protocol.Criteria\x1a!.arrow.flight.protocol.FlightInfo\"\x00\x30\x01\x12]\n\rGetFlightInfo\x12\'.arrow.flight.protocol.FlightDescriptor\x1a!.arrow.flight.protocol.FlightInfo\"\x00\x12\\\n\x0ePollFlightInfo\x12\'.arrow.flight.protocol.FlightDescriptor\x1a\x1f.arrow.flight.protocol.PollInfo\"\x00\x12[\n\tGetSchema\x12\'.arrow.flight.protocol.FlightDescriptor\x1a#.arrow.flight.protocol.SchemaResult\"\x00\x12M\n\x05\x44oGet\x12\x1d.arrow.flight.protocol.Ticket\x1a!.arrow.flight.protocol.FlightData\"\x00\x30\x01\x12R\n\x05\x44oPut\x12!.arrow.flight.protocol.FlightData\x1a .arrow.flight.protocol.PutResult\"\x00(\x01\x30\x01\x12X\n\nDoExchange\x12!.arrow.flight.protocol.FlightData\x1a!.arrow.flight.protocol.FlightData\"\x00(\x01\x30\x01\x12L\n\x08\x44oAction\x12\x1d.arrow.flight.protocol.Action\x1a\x1d.arrow.flight.protocol.Result\"\x00\x30\x01\x12R\n\x0bListActions\x12\x1c.arrow.flight.protocol.Empty\x1a!.arrow.flight.protocol.ActionType\"\x00\x30\x01\x42q\n\x1corg.apache.arrow.flight.implZ2github.com/apache/arrow-go/arrow/flight/gen/flight\xaa\x02\x1c\x41pache.Arrow.Flight.Protocolb\x06proto3')
29
-
30
- _globals = globals()
31
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'Flight_pb2', _globals)
33
- if not _descriptor._USE_C_DESCRIPTORS:
34
- _globals['DESCRIPTOR']._loaded_options = None
35
- _globals['DESCRIPTOR']._serialized_options = b'\n\034org.apache.arrow.flight.implZ2github.com/apache/arrow-go/arrow/flight/gen/flight\252\002\034Apache.Arrow.Flight.Protocol'
36
- _globals['_SETSESSIONOPTIONSREQUEST_SESSIONOPTIONSENTRY']._loaded_options = None
37
- _globals['_SETSESSIONOPTIONSREQUEST_SESSIONOPTIONSENTRY']._serialized_options = b'8\001'
38
- _globals['_SETSESSIONOPTIONSRESULT_ERRORSENTRY']._loaded_options = None
39
- _globals['_SETSESSIONOPTIONSRESULT_ERRORSENTRY']._serialized_options = b'8\001'
40
- _globals['_GETSESSIONOPTIONSRESULT_SESSIONOPTIONSENTRY']._loaded_options = None
41
- _globals['_GETSESSIONOPTIONSRESULT_SESSIONOPTIONSENTRY']._serialized_options = b'8\001'
42
- _globals['_CANCELSTATUS']._serialized_start=2998
43
- _globals['_CANCELSTATUS']._serialized_end=3137
44
- _globals['_HANDSHAKEREQUEST']._serialized_start=72
45
- _globals['_HANDSHAKEREQUEST']._serialized_end=133
46
- _globals['_HANDSHAKERESPONSE']._serialized_start=135
47
- _globals['_HANDSHAKERESPONSE']._serialized_end=197
48
- _globals['_BASICAUTH']._serialized_start=199
49
- _globals['_BASICAUTH']._serialized_end=246
50
- _globals['_EMPTY']._serialized_start=248
51
- _globals['_EMPTY']._serialized_end=255
52
- _globals['_ACTIONTYPE']._serialized_start=257
53
- _globals['_ACTIONTYPE']._serialized_end=304
54
- _globals['_CRITERIA']._serialized_start=306
55
- _globals['_CRITERIA']._serialized_end=336
56
- _globals['_ACTION']._serialized_start=338
57
- _globals['_ACTION']._serialized_end=374
58
- _globals['_RESULT']._serialized_start=376
59
- _globals['_RESULT']._serialized_end=398
60
- _globals['_SCHEMARESULT']._serialized_start=400
61
- _globals['_SCHEMARESULT']._serialized_end=430
62
- _globals['_FLIGHTDESCRIPTOR']._serialized_start=433
63
- _globals['_FLIGHTDESCRIPTOR']._serialized_end=598
64
- _globals['_FLIGHTDESCRIPTOR_DESCRIPTORTYPE']._serialized_start=550
65
- _globals['_FLIGHTDESCRIPTOR_DESCRIPTORTYPE']._serialized_end=598
66
- _globals['_FLIGHTINFO']._serialized_start=601
67
- _globals['_FLIGHTINFO']._serialized_end=837
68
- _globals['_POLLINFO']._serialized_start=840
69
- _globals['_POLLINFO']._serialized_end=1056
70
- _globals['_CANCELFLIGHTINFOREQUEST']._serialized_start=1058
71
- _globals['_CANCELFLIGHTINFOREQUEST']._serialized_end=1132
72
- _globals['_CANCELFLIGHTINFORESULT']._serialized_start=1134
73
- _globals['_CANCELFLIGHTINFORESULT']._serialized_end=1211
74
- _globals['_TICKET']._serialized_start=1213
75
- _globals['_TICKET']._serialized_end=1237
76
- _globals['_LOCATION']._serialized_start=1239
77
- _globals['_LOCATION']._serialized_end=1262
78
- _globals['_FLIGHTENDPOINT']._serialized_start=1265
79
- _globals['_FLIGHTENDPOINT']._serialized_end=1454
80
- _globals['_RENEWFLIGHTENDPOINTREQUEST']._serialized_start=1456
81
- _globals['_RENEWFLIGHTENDPOINTREQUEST']._serialized_end=1541
82
- _globals['_FLIGHTDATA']._serialized_start=1544
83
- _globals['_FLIGHTDATA']._serialized_end=1687
84
- _globals['_PUTRESULT']._serialized_start=1689
85
- _globals['_PUTRESULT']._serialized_end=1722
86
- _globals['_SESSIONOPTIONVALUE']._serialized_start=1725
87
- _globals['_SESSIONOPTIONVALUE']._serialized_end=1977
88
- _globals['_SESSIONOPTIONVALUE_STRINGLISTVALUE']._serialized_start=1928
89
- _globals['_SESSIONOPTIONVALUE_STRINGLISTVALUE']._serialized_end=1961
90
- _globals['_SETSESSIONOPTIONSREQUEST']._serialized_start=1980
91
- _globals['_SETSESSIONOPTIONSREQUEST']._serialized_end=2198
92
- _globals['_SETSESSIONOPTIONSREQUEST_SESSIONOPTIONSENTRY']._serialized_start=2102
93
- _globals['_SETSESSIONOPTIONSREQUEST_SESSIONOPTIONSENTRY']._serialized_end=2198
94
- _globals['_SETSESSIONOPTIONSRESULT']._serialized_start=2201
95
- _globals['_SETSESSIONOPTIONSRESULT']._serialized_end=2565
96
- _globals['_SETSESSIONOPTIONSRESULT_ERROR']._serialized_start=2304
97
- _globals['_SETSESSIONOPTIONSRESULT_ERROR']._serialized_end=2385
98
- _globals['_SETSESSIONOPTIONSRESULT_ERRORSENTRY']._serialized_start=2387
99
- _globals['_SETSESSIONOPTIONSRESULT_ERRORSENTRY']._serialized_end=2486
100
- _globals['_SETSESSIONOPTIONSRESULT_ERRORVALUE']._serialized_start=2488
101
- _globals['_SETSESSIONOPTIONSRESULT_ERRORVALUE']._serialized_end=2565
102
- _globals['_GETSESSIONOPTIONSREQUEST']._serialized_start=2567
103
- _globals['_GETSESSIONOPTIONSREQUEST']._serialized_end=2593
104
- _globals['_GETSESSIONOPTIONSRESULT']._serialized_start=2596
105
- _globals['_GETSESSIONOPTIONSRESULT']._serialized_end=2812
106
- _globals['_GETSESSIONOPTIONSRESULT_SESSIONOPTIONSENTRY']._serialized_start=2102
107
- _globals['_GETSESSIONOPTIONSRESULT_SESSIONOPTIONSENTRY']._serialized_end=2198
108
- _globals['_CLOSESESSIONREQUEST']._serialized_start=2814
109
- _globals['_CLOSESESSIONREQUEST']._serialized_end=2835
110
- _globals['_CLOSESESSIONRESULT']._serialized_start=2838
111
- _globals['_CLOSESESSIONRESULT']._serialized_end=2995
112
- _globals['_CLOSESESSIONRESULT_STATUS']._serialized_start=2926
113
- _globals['_CLOSESESSIONRESULT_STATUS']._serialized_end=2995
114
- _globals['_FLIGHTSERVICE']._serialized_start=3140
115
- _globals['_FLIGHTSERVICE']._serialized_end=4041
116
- # @@protoc_insertion_point(module_scope)