pyspiral 0.1.0__cp310-abi3-macosx_11_0_arm64.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.
- pyspiral-0.1.0.dist-info/METADATA +48 -0
- pyspiral-0.1.0.dist-info/RECORD +81 -0
- pyspiral-0.1.0.dist-info/WHEEL +4 -0
- pyspiral-0.1.0.dist-info/entry_points.txt +2 -0
- spiral/__init__.py +11 -0
- spiral/_lib.abi3.so +0 -0
- spiral/adbc.py +386 -0
- spiral/api/__init__.py +221 -0
- spiral/api/admin.py +29 -0
- spiral/api/filesystems.py +125 -0
- spiral/api/organizations.py +90 -0
- spiral/api/projects.py +160 -0
- spiral/api/tables.py +94 -0
- spiral/api/tokens.py +56 -0
- spiral/api/workloads.py +45 -0
- spiral/arrow.py +209 -0
- spiral/authn/__init__.py +0 -0
- spiral/authn/authn.py +89 -0
- spiral/authn/device.py +206 -0
- spiral/authn/github_.py +33 -0
- spiral/authn/modal_.py +18 -0
- spiral/catalog.py +78 -0
- spiral/cli/__init__.py +82 -0
- spiral/cli/__main__.py +4 -0
- spiral/cli/admin.py +21 -0
- spiral/cli/app.py +48 -0
- spiral/cli/console.py +95 -0
- spiral/cli/fs.py +47 -0
- spiral/cli/login.py +13 -0
- spiral/cli/org.py +90 -0
- spiral/cli/printer.py +45 -0
- spiral/cli/project.py +107 -0
- spiral/cli/state.py +3 -0
- spiral/cli/table.py +20 -0
- spiral/cli/token.py +27 -0
- spiral/cli/types.py +53 -0
- spiral/cli/workload.py +59 -0
- spiral/config.py +26 -0
- spiral/core/__init__.py +0 -0
- spiral/core/core/__init__.pyi +53 -0
- spiral/core/manifests/__init__.pyi +53 -0
- spiral/core/metastore/__init__.pyi +91 -0
- spiral/core/spec/__init__.pyi +257 -0
- spiral/dataset.py +239 -0
- spiral/debug.py +251 -0
- spiral/expressions/__init__.py +222 -0
- spiral/expressions/base.py +149 -0
- spiral/expressions/http.py +86 -0
- spiral/expressions/io.py +100 -0
- spiral/expressions/list_.py +68 -0
- spiral/expressions/refs.py +44 -0
- spiral/expressions/str_.py +39 -0
- spiral/expressions/struct.py +57 -0
- spiral/expressions/tiff.py +223 -0
- spiral/expressions/udf.py +46 -0
- spiral/grpc_.py +32 -0
- spiral/project.py +137 -0
- spiral/proto/_/__init__.py +0 -0
- spiral/proto/_/arrow/__init__.py +0 -0
- spiral/proto/_/arrow/flight/__init__.py +0 -0
- spiral/proto/_/arrow/flight/protocol/__init__.py +0 -0
- spiral/proto/_/arrow/flight/protocol/sql/__init__.py +1990 -0
- spiral/proto/_/scandal/__init__.py +223 -0
- spiral/proto/_/spfs/__init__.py +36 -0
- spiral/proto/_/spiral/__init__.py +0 -0
- spiral/proto/_/spiral/table/__init__.py +225 -0
- spiral/proto/_/spiraldb/__init__.py +0 -0
- spiral/proto/_/spiraldb/metastore/__init__.py +499 -0
- spiral/proto/__init__.py +0 -0
- spiral/proto/scandal/__init__.py +45 -0
- spiral/proto/spiral/__init__.py +0 -0
- spiral/proto/spiral/table/__init__.py +96 -0
- spiral/proto/substrait/__init__.py +3399 -0
- spiral/proto/substrait/extensions/__init__.py +115 -0
- spiral/proto/util.py +41 -0
- spiral/py.typed +0 -0
- spiral/scan_.py +168 -0
- spiral/settings.py +157 -0
- spiral/substrait_.py +275 -0
- spiral/table.py +157 -0
- spiral/types_.py +6 -0
@@ -0,0 +1,3399 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# sources: substrait/algebra.proto, substrait/capabilities.proto, substrait/extended_expression.proto, substrait/function.proto, substrait/parameterized_types.proto, substrait/plan.proto, substrait/type.proto, substrait/type_expressions.proto
|
3
|
+
# plugin: python-betterproto
|
4
|
+
# This file has been @generated
|
5
|
+
import warnings
|
6
|
+
from dataclasses import dataclass
|
7
|
+
from typing import (
|
8
|
+
List,
|
9
|
+
Optional,
|
10
|
+
)
|
11
|
+
|
12
|
+
import betterproto
|
13
|
+
import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf
|
14
|
+
|
15
|
+
from . import extensions
|
16
|
+
|
17
|
+
|
18
|
+
class TypeNullability(betterproto.Enum):
|
19
|
+
NULLABILITY_UNSPECIFIED = 0
|
20
|
+
NULLABILITY_NULLABLE = 1
|
21
|
+
NULLABILITY_REQUIRED = 2
|
22
|
+
|
23
|
+
|
24
|
+
class AggregationPhase(betterproto.Enum):
|
25
|
+
"""
|
26
|
+
Describes which part of an aggregation or window function to perform within
|
27
|
+
the context of distributed algorithms.
|
28
|
+
"""
|
29
|
+
|
30
|
+
UNSPECIFIED = 0
|
31
|
+
"""Implies `INTERMEDIATE_TO_RESULT`."""
|
32
|
+
|
33
|
+
INITIAL_TO_INTERMEDIATE = 1
|
34
|
+
"""
|
35
|
+
Specifies that the function should be run only up to the point of
|
36
|
+
generating an intermediate value, to be further aggregated later using
|
37
|
+
INTERMEDIATE_TO_INTERMEDIATE or INTERMEDIATE_TO_RESULT.
|
38
|
+
"""
|
39
|
+
|
40
|
+
INTERMEDIATE_TO_INTERMEDIATE = 2
|
41
|
+
"""
|
42
|
+
Specifies that the inputs of the aggregate or window function are the
|
43
|
+
intermediate values of the function, and that the output should also be
|
44
|
+
an intermediate value, to be further aggregated later using
|
45
|
+
INTERMEDIATE_TO_INTERMEDIATE or INTERMEDIATE_TO_RESULT.
|
46
|
+
"""
|
47
|
+
|
48
|
+
INITIAL_TO_RESULT = 3
|
49
|
+
"""
|
50
|
+
A complete invocation: the function should aggregate the given set of
|
51
|
+
inputs to yield a single return value. This style must be used for
|
52
|
+
aggregate or window functions that are not decomposable.
|
53
|
+
"""
|
54
|
+
|
55
|
+
INTERMEDIATE_TO_RESULT = 4
|
56
|
+
"""
|
57
|
+
Specifies that the inputs of the aggregate or window function are the
|
58
|
+
intermediate values of the function, generated previously using
|
59
|
+
INITIAL_TO_INTERMEDIATE and possibly INTERMEDIATE_TO_INTERMEDIATE calls.
|
60
|
+
This call should combine the intermediate values to yield the final
|
61
|
+
return value.
|
62
|
+
"""
|
63
|
+
|
64
|
+
|
65
|
+
class RelCommonHintComputationType(betterproto.Enum):
|
66
|
+
COMPUTATION_TYPE_UNSPECIFIED = 0
|
67
|
+
COMPUTATION_TYPE_HASHTABLE = 1
|
68
|
+
COMPUTATION_TYPE_BLOOM_FILTER = 2
|
69
|
+
COMPUTATION_TYPE_UNKNOWN = 9999
|
70
|
+
|
71
|
+
|
72
|
+
class JoinRelJoinType(betterproto.Enum):
|
73
|
+
JOIN_TYPE_UNSPECIFIED = 0
|
74
|
+
JOIN_TYPE_INNER = 1
|
75
|
+
JOIN_TYPE_OUTER = 2
|
76
|
+
JOIN_TYPE_LEFT = 3
|
77
|
+
JOIN_TYPE_RIGHT = 4
|
78
|
+
JOIN_TYPE_LEFT_SEMI = 5
|
79
|
+
JOIN_TYPE_LEFT_ANTI = 6
|
80
|
+
JOIN_TYPE_LEFT_SINGLE = 7
|
81
|
+
JOIN_TYPE_RIGHT_SEMI = 8
|
82
|
+
JOIN_TYPE_RIGHT_ANTI = 9
|
83
|
+
JOIN_TYPE_RIGHT_SINGLE = 10
|
84
|
+
JOIN_TYPE_LEFT_MARK = 11
|
85
|
+
JOIN_TYPE_RIGHT_MARK = 12
|
86
|
+
|
87
|
+
|
88
|
+
class SetRelSetOp(betterproto.Enum):
|
89
|
+
SET_OP_UNSPECIFIED = 0
|
90
|
+
SET_OP_MINUS_PRIMARY = 1
|
91
|
+
SET_OP_MINUS_PRIMARY_ALL = 7
|
92
|
+
SET_OP_MINUS_MULTISET = 2
|
93
|
+
SET_OP_INTERSECTION_PRIMARY = 3
|
94
|
+
SET_OP_INTERSECTION_MULTISET = 4
|
95
|
+
SET_OP_INTERSECTION_MULTISET_ALL = 8
|
96
|
+
SET_OP_UNION_DISTINCT = 5
|
97
|
+
SET_OP_UNION_ALL = 6
|
98
|
+
|
99
|
+
|
100
|
+
class DdlRelDdlObject(betterproto.Enum):
|
101
|
+
DDL_OBJECT_UNSPECIFIED = 0
|
102
|
+
DDL_OBJECT_TABLE = 1
|
103
|
+
"""A Table object in the system"""
|
104
|
+
|
105
|
+
DDL_OBJECT_VIEW = 2
|
106
|
+
"""A View object in the system"""
|
107
|
+
|
108
|
+
|
109
|
+
class DdlRelDdlOp(betterproto.Enum):
|
110
|
+
DDL_OP_UNSPECIFIED = 0
|
111
|
+
DDL_OP_CREATE = 1
|
112
|
+
"""A create operation (for any object)"""
|
113
|
+
|
114
|
+
DDL_OP_CREATE_OR_REPLACE = 2
|
115
|
+
"""
|
116
|
+
A create operation if the object does not exist, or replaces it (equivalent to a DROP + CREATE) if the object already exists
|
117
|
+
"""
|
118
|
+
|
119
|
+
DDL_OP_ALTER = 3
|
120
|
+
"""
|
121
|
+
An operation that modifies the schema (e.g., column names, types, default values) for the target object
|
122
|
+
"""
|
123
|
+
|
124
|
+
DDL_OP_DROP = 4
|
125
|
+
"""An operation that removes an object from the system"""
|
126
|
+
|
127
|
+
DDL_OP_DROP_IF_EXIST = 5
|
128
|
+
"""
|
129
|
+
An operation that removes an object from the system (without throwing an exception if the object did not exist)
|
130
|
+
"""
|
131
|
+
|
132
|
+
|
133
|
+
class WriteRelWriteOp(betterproto.Enum):
|
134
|
+
WRITE_OP_UNSPECIFIED = 0
|
135
|
+
WRITE_OP_INSERT = 1
|
136
|
+
"""The insert of new records in a table"""
|
137
|
+
|
138
|
+
WRITE_OP_DELETE = 2
|
139
|
+
"""The removal of records from a table"""
|
140
|
+
|
141
|
+
WRITE_OP_UPDATE = 3
|
142
|
+
"""The modification of existing records within a table"""
|
143
|
+
|
144
|
+
WRITE_OP_CTAS = 4
|
145
|
+
"""
|
146
|
+
The Creation of a new table, and the insert of new records in the table
|
147
|
+
"""
|
148
|
+
|
149
|
+
|
150
|
+
class WriteRelOutputMode(betterproto.Enum):
|
151
|
+
OUTPUT_MODE_UNSPECIFIED = 0
|
152
|
+
OUTPUT_MODE_NO_OUTPUT = 1
|
153
|
+
"""return no records at all"""
|
154
|
+
|
155
|
+
OUTPUT_MODE_MODIFIED_RECORDS = 2
|
156
|
+
"""
|
157
|
+
this mode makes the operator return all the record INSERTED/DELETED/UPDATED by the operator.
|
158
|
+
The operator returns the AFTER-image of any change. This can be further manipulated by operators upstreams
|
159
|
+
(e.g., retunring the typical "count of modified records").
|
160
|
+
For scenarios in which the BEFORE image is required, the user must implement a spool (via references to
|
161
|
+
subplans in the body of the Rel input) and return those with anounter PlanRel.relations.
|
162
|
+
"""
|
163
|
+
|
164
|
+
|
165
|
+
class ComparisonJoinKeySimpleComparisonType(betterproto.Enum):
|
166
|
+
"""
|
167
|
+
Most joins will use one of the following behaviors. To avoid the complexity
|
168
|
+
of a function lookup we define the common behaviors here
|
169
|
+
"""
|
170
|
+
|
171
|
+
SIMPLE_COMPARISON_TYPE_UNSPECIFIED = 0
|
172
|
+
SIMPLE_COMPARISON_TYPE_EQ = 1
|
173
|
+
"""Returns true only if both values are equal and not null"""
|
174
|
+
|
175
|
+
SIMPLE_COMPARISON_TYPE_IS_NOT_DISTINCT_FROM = 2
|
176
|
+
"""
|
177
|
+
Returns true if both values are equal and not null
|
178
|
+
Returns true if both values are null
|
179
|
+
Returns false if one value is null and the other value is not null
|
180
|
+
|
181
|
+
This can be expressed as a = b OR (isnull(a) AND isnull(b))
|
182
|
+
"""
|
183
|
+
|
184
|
+
SIMPLE_COMPARISON_TYPE_MIGHT_EQUAL = 3
|
185
|
+
"""
|
186
|
+
Returns true if both values are equal and not null
|
187
|
+
Returns true if either value is null
|
188
|
+
|
189
|
+
This can be expressed as a = b OR isnull(a = b)
|
190
|
+
"""
|
191
|
+
|
192
|
+
|
193
|
+
class HashJoinRelJoinType(betterproto.Enum):
|
194
|
+
JOIN_TYPE_UNSPECIFIED = 0
|
195
|
+
JOIN_TYPE_INNER = 1
|
196
|
+
JOIN_TYPE_OUTER = 2
|
197
|
+
JOIN_TYPE_LEFT = 3
|
198
|
+
JOIN_TYPE_RIGHT = 4
|
199
|
+
JOIN_TYPE_LEFT_SEMI = 5
|
200
|
+
JOIN_TYPE_RIGHT_SEMI = 6
|
201
|
+
JOIN_TYPE_LEFT_ANTI = 7
|
202
|
+
JOIN_TYPE_RIGHT_ANTI = 8
|
203
|
+
JOIN_TYPE_LEFT_SINGLE = 9
|
204
|
+
JOIN_TYPE_RIGHT_SINGLE = 10
|
205
|
+
JOIN_TYPE_LEFT_MARK = 11
|
206
|
+
JOIN_TYPE_RIGHT_MARK = 12
|
207
|
+
|
208
|
+
|
209
|
+
class MergeJoinRelJoinType(betterproto.Enum):
|
210
|
+
JOIN_TYPE_UNSPECIFIED = 0
|
211
|
+
JOIN_TYPE_INNER = 1
|
212
|
+
JOIN_TYPE_OUTER = 2
|
213
|
+
JOIN_TYPE_LEFT = 3
|
214
|
+
JOIN_TYPE_RIGHT = 4
|
215
|
+
JOIN_TYPE_LEFT_SEMI = 5
|
216
|
+
JOIN_TYPE_RIGHT_SEMI = 6
|
217
|
+
JOIN_TYPE_LEFT_ANTI = 7
|
218
|
+
JOIN_TYPE_RIGHT_ANTI = 8
|
219
|
+
JOIN_TYPE_LEFT_SINGLE = 9
|
220
|
+
JOIN_TYPE_RIGHT_SINGLE = 10
|
221
|
+
JOIN_TYPE_LEFT_MARK = 11
|
222
|
+
JOIN_TYPE_RIGHT_MARK = 12
|
223
|
+
|
224
|
+
|
225
|
+
class NestedLoopJoinRelJoinType(betterproto.Enum):
|
226
|
+
JOIN_TYPE_UNSPECIFIED = 0
|
227
|
+
JOIN_TYPE_INNER = 1
|
228
|
+
JOIN_TYPE_OUTER = 2
|
229
|
+
JOIN_TYPE_LEFT = 3
|
230
|
+
JOIN_TYPE_RIGHT = 4
|
231
|
+
JOIN_TYPE_LEFT_SEMI = 5
|
232
|
+
JOIN_TYPE_RIGHT_SEMI = 6
|
233
|
+
JOIN_TYPE_LEFT_ANTI = 7
|
234
|
+
JOIN_TYPE_RIGHT_ANTI = 8
|
235
|
+
JOIN_TYPE_LEFT_SINGLE = 9
|
236
|
+
JOIN_TYPE_RIGHT_SINGLE = 10
|
237
|
+
JOIN_TYPE_LEFT_MARK = 11
|
238
|
+
JOIN_TYPE_RIGHT_MARK = 12
|
239
|
+
|
240
|
+
|
241
|
+
class ExpressionWindowFunctionBoundsType(betterproto.Enum):
|
242
|
+
BOUNDS_TYPE_UNSPECIFIED = 0
|
243
|
+
BOUNDS_TYPE_ROWS = 1
|
244
|
+
"""
|
245
|
+
The lower and upper bound specify how many rows before and after the current row
|
246
|
+
the window should extend.
|
247
|
+
"""
|
248
|
+
|
249
|
+
BOUNDS_TYPE_RANGE = 2
|
250
|
+
"""
|
251
|
+
The lower and upper bound describe a range of values. The window should include all rows
|
252
|
+
where the value of the ordering column is greater than or equal to (current_value - lower bound)
|
253
|
+
and less than or equal to (current_value + upper bound). This bounds type is only valid if there
|
254
|
+
is a single ordering column.
|
255
|
+
"""
|
256
|
+
|
257
|
+
|
258
|
+
class ExpressionCastFailureBehavior(betterproto.Enum):
|
259
|
+
FAILURE_BEHAVIOR_UNSPECIFIED = 0
|
260
|
+
FAILURE_BEHAVIOR_RETURN_NULL = 1
|
261
|
+
FAILURE_BEHAVIOR_THROW_EXCEPTION = 2
|
262
|
+
|
263
|
+
|
264
|
+
class ExpressionSubquerySetPredicatePredicateOp(betterproto.Enum):
|
265
|
+
PREDICATE_OP_UNSPECIFIED = 0
|
266
|
+
PREDICATE_OP_EXISTS = 1
|
267
|
+
PREDICATE_OP_UNIQUE = 2
|
268
|
+
|
269
|
+
|
270
|
+
class ExpressionSubquerySetComparisonComparisonOp(betterproto.Enum):
|
271
|
+
COMPARISON_OP_UNSPECIFIED = 0
|
272
|
+
COMPARISON_OP_EQ = 1
|
273
|
+
COMPARISON_OP_NE = 2
|
274
|
+
COMPARISON_OP_LT = 3
|
275
|
+
COMPARISON_OP_GT = 4
|
276
|
+
COMPARISON_OP_LE = 5
|
277
|
+
COMPARISON_OP_GE = 6
|
278
|
+
|
279
|
+
|
280
|
+
class ExpressionSubquerySetComparisonReductionOp(betterproto.Enum):
|
281
|
+
REDUCTION_OP_UNSPECIFIED = 0
|
282
|
+
REDUCTION_OP_ANY = 1
|
283
|
+
REDUCTION_OP_ALL = 2
|
284
|
+
|
285
|
+
|
286
|
+
class SortFieldSortDirection(betterproto.Enum):
|
287
|
+
SORT_DIRECTION_UNSPECIFIED = 0
|
288
|
+
SORT_DIRECTION_ASC_NULLS_FIRST = 1
|
289
|
+
SORT_DIRECTION_ASC_NULLS_LAST = 2
|
290
|
+
SORT_DIRECTION_DESC_NULLS_FIRST = 3
|
291
|
+
SORT_DIRECTION_DESC_NULLS_LAST = 4
|
292
|
+
SORT_DIRECTION_CLUSTERED = 5
|
293
|
+
|
294
|
+
|
295
|
+
class AggregateFunctionAggregationInvocation(betterproto.Enum):
|
296
|
+
"""
|
297
|
+
Method in which equivalent records are merged before being aggregated.
|
298
|
+
"""
|
299
|
+
|
300
|
+
AGGREGATION_INVOCATION_UNSPECIFIED = 0
|
301
|
+
"""This default value implies AGGREGATION_INVOCATION_ALL."""
|
302
|
+
|
303
|
+
AGGREGATION_INVOCATION_ALL = 1
|
304
|
+
"""Use all values in the aggregation calculation."""
|
305
|
+
|
306
|
+
AGGREGATION_INVOCATION_DISTINCT = 2
|
307
|
+
"""Use only distinct values in the aggregation calculation."""
|
308
|
+
|
309
|
+
|
310
|
+
class DerivationExpressionUnaryOpUnaryOpType(betterproto.Enum):
|
311
|
+
UNARY_OP_TYPE_UNSPECIFIED = 0
|
312
|
+
UNARY_OP_TYPE_BOOLEAN_NOT = 1
|
313
|
+
|
314
|
+
|
315
|
+
class DerivationExpressionBinaryOpBinaryOpType(betterproto.Enum):
|
316
|
+
BINARY_OP_TYPE_UNSPECIFIED = 0
|
317
|
+
BINARY_OP_TYPE_PLUS = 1
|
318
|
+
BINARY_OP_TYPE_MINUS = 2
|
319
|
+
BINARY_OP_TYPE_MULTIPLY = 3
|
320
|
+
BINARY_OP_TYPE_DIVIDE = 4
|
321
|
+
BINARY_OP_TYPE_MIN = 5
|
322
|
+
BINARY_OP_TYPE_MAX = 6
|
323
|
+
BINARY_OP_TYPE_GREATER_THAN = 7
|
324
|
+
BINARY_OP_TYPE_LESS_THAN = 8
|
325
|
+
BINARY_OP_TYPE_AND = 9
|
326
|
+
BINARY_OP_TYPE_OR = 10
|
327
|
+
BINARY_OP_TYPE_EQUALS = 11
|
328
|
+
BINARY_OP_TYPE_COVERS = 12
|
329
|
+
|
330
|
+
|
331
|
+
class FunctionSignatureFinalArgVariadicParameterConsistency(betterproto.Enum):
|
332
|
+
PARAMETER_CONSISTENCY_UNSPECIFIED = 0
|
333
|
+
PARAMETER_CONSISTENCY_CONSISTENT = 1
|
334
|
+
"""All argument must be the same concrete type."""
|
335
|
+
|
336
|
+
PARAMETER_CONSISTENCY_INCONSISTENT = 2
|
337
|
+
"""
|
338
|
+
Each argument can be any possible concrete type afforded by the bounds
|
339
|
+
of any parameter defined in the arguments specification.
|
340
|
+
"""
|
341
|
+
|
342
|
+
|
343
|
+
class FunctionSignatureWindowWindowType(betterproto.Enum):
|
344
|
+
WINDOW_TYPE_UNSPECIFIED = 0
|
345
|
+
WINDOW_TYPE_STREAMING = 1
|
346
|
+
WINDOW_TYPE_PARTITION = 2
|
347
|
+
|
348
|
+
|
349
|
+
class FunctionSignatureImplementationType(betterproto.Enum):
|
350
|
+
TYPE_UNSPECIFIED = 0
|
351
|
+
TYPE_WEB_ASSEMBLY = 1
|
352
|
+
TYPE_TRINO_JAR = 2
|
353
|
+
|
354
|
+
|
355
|
+
@dataclass(eq=False, repr=False)
|
356
|
+
class Capabilities(betterproto.Message):
|
357
|
+
"""
|
358
|
+
Defines a set of Capabilities that a system (producer or consumer) supports.
|
359
|
+
"""
|
360
|
+
|
361
|
+
substrait_versions: List[str] = betterproto.string_field(1)
|
362
|
+
"""List of Substrait versions this system supports"""
|
363
|
+
|
364
|
+
advanced_extension_type_urls: List[str] = betterproto.string_field(2)
|
365
|
+
"""
|
366
|
+
list of com.google.Any message types this system supports for advanced
|
367
|
+
extensions.
|
368
|
+
"""
|
369
|
+
|
370
|
+
simple_extensions: List["CapabilitiesSimpleExtension"] = betterproto.message_field(
|
371
|
+
3
|
372
|
+
)
|
373
|
+
"""list of simple extensions this system supports."""
|
374
|
+
|
375
|
+
|
376
|
+
@dataclass(eq=False, repr=False)
|
377
|
+
class CapabilitiesSimpleExtension(betterproto.Message):
|
378
|
+
uri: str = betterproto.string_field(1)
|
379
|
+
function_keys: List[str] = betterproto.string_field(2)
|
380
|
+
type_keys: List[str] = betterproto.string_field(3)
|
381
|
+
type_variation_keys: List[str] = betterproto.string_field(4)
|
382
|
+
|
383
|
+
|
384
|
+
@dataclass(eq=False, repr=False)
|
385
|
+
class Type(betterproto.Message):
|
386
|
+
bool: "TypeBoolean" = betterproto.message_field(1, group="kind")
|
387
|
+
i8: "TypeI8" = betterproto.message_field(2, group="kind")
|
388
|
+
i16: "TypeI16" = betterproto.message_field(3, group="kind")
|
389
|
+
i32: "TypeI32" = betterproto.message_field(5, group="kind")
|
390
|
+
i64: "TypeI64" = betterproto.message_field(7, group="kind")
|
391
|
+
fp32: "TypeFp32" = betterproto.message_field(10, group="kind")
|
392
|
+
fp64: "TypeFp64" = betterproto.message_field(11, group="kind")
|
393
|
+
string: "TypeString" = betterproto.message_field(12, group="kind")
|
394
|
+
binary: "TypeBinary" = betterproto.message_field(13, group="kind")
|
395
|
+
timestamp: "TypeTimestamp" = betterproto.message_field(14, group="kind")
|
396
|
+
"""Deprecated in favor of `PrecisionTimestamp precision_timestamp`"""
|
397
|
+
|
398
|
+
date: "TypeDate" = betterproto.message_field(16, group="kind")
|
399
|
+
time: "TypeTime" = betterproto.message_field(17, group="kind")
|
400
|
+
interval_year: "TypeIntervalYear" = betterproto.message_field(19, group="kind")
|
401
|
+
interval_day: "TypeIntervalDay" = betterproto.message_field(20, group="kind")
|
402
|
+
interval_compound: "TypeIntervalCompound" = betterproto.message_field(
|
403
|
+
35, group="kind"
|
404
|
+
)
|
405
|
+
timestamp_tz: "TypeTimestampTz" = betterproto.message_field(29, group="kind")
|
406
|
+
"""Deprecated in favor of `PrecisionTimestampTZ precision_timestamp_tz`"""
|
407
|
+
|
408
|
+
uuid: "TypeUuid" = betterproto.message_field(32, group="kind")
|
409
|
+
fixed_char: "TypeFixedChar" = betterproto.message_field(21, group="kind")
|
410
|
+
varchar: "TypeVarChar" = betterproto.message_field(22, group="kind")
|
411
|
+
fixed_binary: "TypeFixedBinary" = betterproto.message_field(23, group="kind")
|
412
|
+
decimal: "TypeDecimal" = betterproto.message_field(24, group="kind")
|
413
|
+
precision_timestamp: "TypePrecisionTimestamp" = betterproto.message_field(
|
414
|
+
33, group="kind"
|
415
|
+
)
|
416
|
+
precision_timestamp_tz: "TypePrecisionTimestampTz" = betterproto.message_field(
|
417
|
+
34, group="kind"
|
418
|
+
)
|
419
|
+
struct: "TypeStruct" = betterproto.message_field(25, group="kind")
|
420
|
+
list: "TypeList" = betterproto.message_field(27, group="kind")
|
421
|
+
map: "TypeMap" = betterproto.message_field(28, group="kind")
|
422
|
+
user_defined: "TypeUserDefined" = betterproto.message_field(30, group="kind")
|
423
|
+
user_defined_type_reference: int = betterproto.uint32_field(31, group="kind")
|
424
|
+
"""
|
425
|
+
Deprecated in favor of user_defined, which allows nullability and
|
426
|
+
variations to be specified. If user_defined_type_reference is
|
427
|
+
encountered, treat it as being non-nullable and having the default
|
428
|
+
variation.
|
429
|
+
"""
|
430
|
+
|
431
|
+
def __post_init__(self) -> None:
|
432
|
+
super().__post_init__()
|
433
|
+
if self.is_set("timestamp"):
|
434
|
+
warnings.warn("Type.timestamp is deprecated", DeprecationWarning)
|
435
|
+
if self.is_set("timestamp_tz"):
|
436
|
+
warnings.warn("Type.timestamp_tz is deprecated", DeprecationWarning)
|
437
|
+
if self.is_set("user_defined_type_reference"):
|
438
|
+
warnings.warn(
|
439
|
+
"Type.user_defined_type_reference is deprecated", DeprecationWarning
|
440
|
+
)
|
441
|
+
|
442
|
+
|
443
|
+
@dataclass(eq=False, repr=False)
|
444
|
+
class TypeBoolean(betterproto.Message):
|
445
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
446
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
447
|
+
|
448
|
+
|
449
|
+
@dataclass(eq=False, repr=False)
|
450
|
+
class TypeI8(betterproto.Message):
|
451
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
452
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
453
|
+
|
454
|
+
|
455
|
+
@dataclass(eq=False, repr=False)
|
456
|
+
class TypeI16(betterproto.Message):
|
457
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
458
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
459
|
+
|
460
|
+
|
461
|
+
@dataclass(eq=False, repr=False)
|
462
|
+
class TypeI32(betterproto.Message):
|
463
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
464
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
465
|
+
|
466
|
+
|
467
|
+
@dataclass(eq=False, repr=False)
|
468
|
+
class TypeI64(betterproto.Message):
|
469
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
470
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
471
|
+
|
472
|
+
|
473
|
+
@dataclass(eq=False, repr=False)
|
474
|
+
class TypeFp32(betterproto.Message):
|
475
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
476
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
477
|
+
|
478
|
+
|
479
|
+
@dataclass(eq=False, repr=False)
|
480
|
+
class TypeFp64(betterproto.Message):
|
481
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
482
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
483
|
+
|
484
|
+
|
485
|
+
@dataclass(eq=False, repr=False)
|
486
|
+
class TypeString(betterproto.Message):
|
487
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
488
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
489
|
+
|
490
|
+
|
491
|
+
@dataclass(eq=False, repr=False)
|
492
|
+
class TypeBinary(betterproto.Message):
|
493
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
494
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
495
|
+
|
496
|
+
|
497
|
+
@dataclass(eq=False, repr=False)
|
498
|
+
class TypeTimestamp(betterproto.Message):
|
499
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
500
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
501
|
+
|
502
|
+
|
503
|
+
@dataclass(eq=False, repr=False)
|
504
|
+
class TypeDate(betterproto.Message):
|
505
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
506
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
507
|
+
|
508
|
+
|
509
|
+
@dataclass(eq=False, repr=False)
|
510
|
+
class TypeTime(betterproto.Message):
|
511
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
512
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
513
|
+
|
514
|
+
|
515
|
+
@dataclass(eq=False, repr=False)
|
516
|
+
class TypeTimestampTz(betterproto.Message):
|
517
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
518
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
519
|
+
|
520
|
+
|
521
|
+
@dataclass(eq=False, repr=False)
|
522
|
+
class TypeIntervalYear(betterproto.Message):
|
523
|
+
"""An interval consisting of years and months"""
|
524
|
+
|
525
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
526
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
527
|
+
|
528
|
+
|
529
|
+
@dataclass(eq=False, repr=False)
|
530
|
+
class TypeIntervalDay(betterproto.Message):
|
531
|
+
"""An interval consisting of days, seconds, and microseconds"""
|
532
|
+
|
533
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
534
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
535
|
+
precision: Optional[int] = betterproto.int32_field(3, optional=True)
|
536
|
+
"""
|
537
|
+
Sub-second precision, 0 means the value given is in seconds, 3 is milliseconds, 6 microseconds, 9 is nanoseconds, etc.
|
538
|
+
if unset, treat as 6.
|
539
|
+
"""
|
540
|
+
|
541
|
+
|
542
|
+
@dataclass(eq=False, repr=False)
|
543
|
+
class TypeIntervalCompound(betterproto.Message):
|
544
|
+
"""
|
545
|
+
An interval consisting of the components of both IntervalMonth and IntervalDay
|
546
|
+
"""
|
547
|
+
|
548
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
549
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
550
|
+
precision: int = betterproto.int32_field(3)
|
551
|
+
"""
|
552
|
+
Sub-second precision, 0 means the value given is in seconds, 3 is milliseconds, 6 microseconds, 9 is nanoseconds, etc.
|
553
|
+
"""
|
554
|
+
|
555
|
+
|
556
|
+
@dataclass(eq=False, repr=False)
|
557
|
+
class TypeUuid(betterproto.Message):
|
558
|
+
type_variation_reference: int = betterproto.uint32_field(1)
|
559
|
+
nullability: "TypeNullability" = betterproto.enum_field(2)
|
560
|
+
|
561
|
+
|
562
|
+
@dataclass(eq=False, repr=False)
|
563
|
+
class TypeFixedChar(betterproto.Message):
|
564
|
+
"""Start compound types."""
|
565
|
+
|
566
|
+
length: int = betterproto.int32_field(1)
|
567
|
+
type_variation_reference: int = betterproto.uint32_field(2)
|
568
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
569
|
+
|
570
|
+
|
571
|
+
@dataclass(eq=False, repr=False)
|
572
|
+
class TypeVarChar(betterproto.Message):
|
573
|
+
length: int = betterproto.int32_field(1)
|
574
|
+
type_variation_reference: int = betterproto.uint32_field(2)
|
575
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
576
|
+
|
577
|
+
|
578
|
+
@dataclass(eq=False, repr=False)
|
579
|
+
class TypeFixedBinary(betterproto.Message):
|
580
|
+
length: int = betterproto.int32_field(1)
|
581
|
+
type_variation_reference: int = betterproto.uint32_field(2)
|
582
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
583
|
+
|
584
|
+
|
585
|
+
@dataclass(eq=False, repr=False)
|
586
|
+
class TypeDecimal(betterproto.Message):
|
587
|
+
scale: int = betterproto.int32_field(1)
|
588
|
+
precision: int = betterproto.int32_field(2)
|
589
|
+
type_variation_reference: int = betterproto.uint32_field(3)
|
590
|
+
nullability: "TypeNullability" = betterproto.enum_field(4)
|
591
|
+
|
592
|
+
|
593
|
+
@dataclass(eq=False, repr=False)
|
594
|
+
class TypePrecisionTimestamp(betterproto.Message):
|
595
|
+
precision: int = betterproto.int32_field(1)
|
596
|
+
"""
|
597
|
+
Sub-second precision, 0 means the value given is in seconds, 3 is milliseconds, 6 microseconds, 9 is nanoseconds
|
598
|
+
"""
|
599
|
+
|
600
|
+
type_variation_reference: int = betterproto.uint32_field(2)
|
601
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
602
|
+
|
603
|
+
|
604
|
+
@dataclass(eq=False, repr=False)
|
605
|
+
class TypePrecisionTimestampTz(betterproto.Message):
|
606
|
+
precision: int = betterproto.int32_field(1)
|
607
|
+
"""
|
608
|
+
Sub-second precision, 0 means the value given is in seconds, 3 is milliseconds, 6 microseconds, 9 is nanoseconds
|
609
|
+
"""
|
610
|
+
|
611
|
+
type_variation_reference: int = betterproto.uint32_field(2)
|
612
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
613
|
+
|
614
|
+
|
615
|
+
@dataclass(eq=False, repr=False)
|
616
|
+
class TypeStruct(betterproto.Message):
|
617
|
+
types: List["Type"] = betterproto.message_field(1)
|
618
|
+
type_variation_reference: int = betterproto.uint32_field(2)
|
619
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
620
|
+
|
621
|
+
|
622
|
+
@dataclass(eq=False, repr=False)
|
623
|
+
class TypeList(betterproto.Message):
|
624
|
+
type: "Type" = betterproto.message_field(1)
|
625
|
+
type_variation_reference: int = betterproto.uint32_field(2)
|
626
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
627
|
+
|
628
|
+
|
629
|
+
@dataclass(eq=False, repr=False)
|
630
|
+
class TypeMap(betterproto.Message):
|
631
|
+
key: "Type" = betterproto.message_field(1)
|
632
|
+
value: "Type" = betterproto.message_field(2)
|
633
|
+
type_variation_reference: int = betterproto.uint32_field(3)
|
634
|
+
nullability: "TypeNullability" = betterproto.enum_field(4)
|
635
|
+
|
636
|
+
|
637
|
+
@dataclass(eq=False, repr=False)
|
638
|
+
class TypeUserDefined(betterproto.Message):
|
639
|
+
type_reference: int = betterproto.uint32_field(1)
|
640
|
+
type_variation_reference: int = betterproto.uint32_field(2)
|
641
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
642
|
+
type_parameters: List["TypeParameter"] = betterproto.message_field(4)
|
643
|
+
|
644
|
+
|
645
|
+
@dataclass(eq=False, repr=False)
|
646
|
+
class TypeParameter(betterproto.Message):
|
647
|
+
null: "betterproto_lib_google_protobuf.Empty" = betterproto.message_field(
|
648
|
+
1, group="parameter"
|
649
|
+
)
|
650
|
+
"""
|
651
|
+
Explicitly null/unspecified parameter, to select the default value (if
|
652
|
+
any).
|
653
|
+
"""
|
654
|
+
|
655
|
+
data_type: "Type" = betterproto.message_field(2, group="parameter")
|
656
|
+
"""Data type parameters, like the i32 in LIST<i32>."""
|
657
|
+
|
658
|
+
boolean: bool = betterproto.bool_field(3, group="parameter")
|
659
|
+
"""Value parameters, like the 10 in VARCHAR<10>."""
|
660
|
+
|
661
|
+
integer: int = betterproto.int64_field(4, group="parameter")
|
662
|
+
enum: str = betterproto.string_field(5, group="parameter")
|
663
|
+
string: str = betterproto.string_field(6, group="parameter")
|
664
|
+
|
665
|
+
|
666
|
+
@dataclass(eq=False, repr=False)
|
667
|
+
class NamedStruct(betterproto.Message):
|
668
|
+
"""
|
669
|
+
A message for modeling name/type pairs.
|
670
|
+
|
671
|
+
Useful for representing relation schemas.
|
672
|
+
|
673
|
+
Notes:
|
674
|
+
|
675
|
+
* The names field is in depth-first order.
|
676
|
+
|
677
|
+
For example a schema such as:
|
678
|
+
|
679
|
+
a: int64
|
680
|
+
b: struct<c: float32, d: string>
|
681
|
+
|
682
|
+
would have a `names` field that looks like:
|
683
|
+
|
684
|
+
["a", "b", "c", "d"]
|
685
|
+
|
686
|
+
* Only struct fields are contained in this field's elements,
|
687
|
+
* Map keys should be traversed first, then values when producing/consuming
|
688
|
+
"""
|
689
|
+
|
690
|
+
names: List[str] = betterproto.string_field(1)
|
691
|
+
"""list of names in dfs order"""
|
692
|
+
|
693
|
+
struct: "TypeStruct" = betterproto.message_field(2)
|
694
|
+
|
695
|
+
|
696
|
+
@dataclass(eq=False, repr=False)
|
697
|
+
class RelCommon(betterproto.Message):
|
698
|
+
"""Common fields for all relational operators"""
|
699
|
+
|
700
|
+
direct: "RelCommonDirect" = betterproto.message_field(1, group="emit_kind")
|
701
|
+
"""
|
702
|
+
The underlying relation is output as is (no reordering or projection of columns)
|
703
|
+
"""
|
704
|
+
|
705
|
+
emit: "RelCommonEmit" = betterproto.message_field(2, group="emit_kind")
|
706
|
+
"""Allows to control for order and inclusion of fields"""
|
707
|
+
|
708
|
+
hint: "RelCommonHint" = betterproto.message_field(3)
|
709
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(4)
|
710
|
+
|
711
|
+
|
712
|
+
@dataclass(eq=False, repr=False)
|
713
|
+
class RelCommonDirect(betterproto.Message):
|
714
|
+
"""
|
715
|
+
Direct indicates no change on presence and ordering of fields in the output
|
716
|
+
"""
|
717
|
+
|
718
|
+
pass
|
719
|
+
|
720
|
+
|
721
|
+
@dataclass(eq=False, repr=False)
|
722
|
+
class RelCommonEmit(betterproto.Message):
|
723
|
+
"""Remap which fields are output and in which order"""
|
724
|
+
|
725
|
+
output_mapping: List[int] = betterproto.int32_field(1)
|
726
|
+
|
727
|
+
|
728
|
+
@dataclass(eq=False, repr=False)
|
729
|
+
class RelCommonHint(betterproto.Message):
|
730
|
+
"""
|
731
|
+
Changes to the operation that can influence efficiency/performance but
|
732
|
+
should not impact correctness.
|
733
|
+
"""
|
734
|
+
|
735
|
+
stats: "RelCommonHintStats" = betterproto.message_field(1)
|
736
|
+
constraint: "RelCommonHintRuntimeConstraint" = betterproto.message_field(2)
|
737
|
+
alias: str = betterproto.string_field(3)
|
738
|
+
"""
|
739
|
+
Name (alias) for this relation. Can be used for e.g. qualifying the relation (see e.g.
|
740
|
+
Spark's SubqueryAlias), or debugging.
|
741
|
+
"""
|
742
|
+
|
743
|
+
output_names: List[str] = betterproto.string_field(4)
|
744
|
+
"""
|
745
|
+
Assigns alternative output field names for any relation. Equivalent to the names field
|
746
|
+
in RelRoot but applies to the output of the relation this RelCommon is attached to.
|
747
|
+
"""
|
748
|
+
|
749
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
750
|
+
saved_computations: List[
|
751
|
+
"RelCommonHintSavedComputation"
|
752
|
+
] = betterproto.message_field(11)
|
753
|
+
"""
|
754
|
+
Save or load a system-specific computation for use in optimizing a remote operation.
|
755
|
+
The anchor refers to the source/destination of the computation. The computation type
|
756
|
+
and number refer to the current relation.
|
757
|
+
"""
|
758
|
+
|
759
|
+
loaded_computations: List[
|
760
|
+
"RelCommonHintLoadedComputation"
|
761
|
+
] = betterproto.message_field(12)
|
762
|
+
|
763
|
+
|
764
|
+
@dataclass(eq=False, repr=False)
|
765
|
+
class RelCommonHintStats(betterproto.Message):
|
766
|
+
"""The statistics related to a hint (physical properties of records)"""
|
767
|
+
|
768
|
+
row_count: float = betterproto.double_field(1)
|
769
|
+
record_size: float = betterproto.double_field(2)
|
770
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
771
|
+
|
772
|
+
|
773
|
+
@dataclass(eq=False, repr=False)
|
774
|
+
class RelCommonHintRuntimeConstraint(betterproto.Message):
|
775
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
776
|
+
|
777
|
+
|
778
|
+
@dataclass(eq=False, repr=False)
|
779
|
+
class RelCommonHintSavedComputation(betterproto.Message):
|
780
|
+
computation_id: int = betterproto.int32_field(1)
|
781
|
+
"""
|
782
|
+
The value corresponds to a plan unique number for that datastructure. Any particular
|
783
|
+
computation may be saved only once but it may be loaded multiple times.
|
784
|
+
"""
|
785
|
+
|
786
|
+
type: "RelCommonHintComputationType" = betterproto.enum_field(2)
|
787
|
+
"""
|
788
|
+
The type of this computation. While a plan may use COMPUTATION_TYPE_UNKNOWN for all
|
789
|
+
of its types it is recommended to use a more specific type so that the optimization
|
790
|
+
is more portable. The consumer should be able to decide if an unknown type here
|
791
|
+
matches the same unknown type at a different plan and ignore the optimization if they
|
792
|
+
are mismatched.
|
793
|
+
"""
|
794
|
+
|
795
|
+
|
796
|
+
@dataclass(eq=False, repr=False)
|
797
|
+
class RelCommonHintLoadedComputation(betterproto.Message):
|
798
|
+
computation_id_reference: int = betterproto.int32_field(1)
|
799
|
+
"""
|
800
|
+
The value corresponds to a plan unique number for that datastructure. Any particular
|
801
|
+
computation may be saved only once but it may be loaded multiple times.
|
802
|
+
"""
|
803
|
+
|
804
|
+
type: "RelCommonHintComputationType" = betterproto.enum_field(2)
|
805
|
+
"""
|
806
|
+
The type of this computation. While a plan may use COMPUTATION_TYPE_UNKNOWN for all
|
807
|
+
of its types it is recommended to use a more specific type so that the optimization
|
808
|
+
is more portable. The consumer should be able to decide if an unknown type here
|
809
|
+
matches the same unknown type at a different plan and ignore the optimization if they
|
810
|
+
are mismatched.
|
811
|
+
"""
|
812
|
+
|
813
|
+
|
814
|
+
@dataclass(eq=False, repr=False)
|
815
|
+
class ReadRel(betterproto.Message):
|
816
|
+
"""
|
817
|
+
The scan operator of base data (physical or virtual), including filtering and projection.
|
818
|
+
"""
|
819
|
+
|
820
|
+
common: "RelCommon" = betterproto.message_field(1)
|
821
|
+
base_schema: "NamedStruct" = betterproto.message_field(2)
|
822
|
+
filter: "Expression" = betterproto.message_field(3)
|
823
|
+
best_effort_filter: "Expression" = betterproto.message_field(11)
|
824
|
+
projection: "ExpressionMaskExpression" = betterproto.message_field(4)
|
825
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
826
|
+
virtual_table: "ReadRelVirtualTable" = betterproto.message_field(
|
827
|
+
5, group="read_type"
|
828
|
+
)
|
829
|
+
local_files: "ReadRelLocalFiles" = betterproto.message_field(6, group="read_type")
|
830
|
+
named_table: "ReadRelNamedTable" = betterproto.message_field(7, group="read_type")
|
831
|
+
extension_table: "ReadRelExtensionTable" = betterproto.message_field(
|
832
|
+
8, group="read_type"
|
833
|
+
)
|
834
|
+
|
835
|
+
|
836
|
+
@dataclass(eq=False, repr=False)
|
837
|
+
class ReadRelNamedTable(betterproto.Message):
|
838
|
+
"""
|
839
|
+
A base table. The list of string is used to represent namespacing (e.g., mydb.mytable).
|
840
|
+
This assumes shared catalog between systems exchanging a message.
|
841
|
+
"""
|
842
|
+
|
843
|
+
names: List[str] = betterproto.string_field(1)
|
844
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
845
|
+
|
846
|
+
|
847
|
+
@dataclass(eq=False, repr=False)
|
848
|
+
class ReadRelVirtualTable(betterproto.Message):
|
849
|
+
"""A table composed of expressions."""
|
850
|
+
|
851
|
+
values: List["ExpressionLiteralStruct"] = betterproto.message_field(1)
|
852
|
+
expressions: List["Expression"] = betterproto.message_field(2)
|
853
|
+
|
854
|
+
def __post_init__(self) -> None:
|
855
|
+
super().__post_init__()
|
856
|
+
if self.is_set("values"):
|
857
|
+
warnings.warn(
|
858
|
+
"ReadRelVirtualTable.values is deprecated", DeprecationWarning
|
859
|
+
)
|
860
|
+
|
861
|
+
|
862
|
+
@dataclass(eq=False, repr=False)
|
863
|
+
class ReadRelExtensionTable(betterproto.Message):
|
864
|
+
"""
|
865
|
+
A stub type that can be used to extend/introduce new table types outside
|
866
|
+
the specification.
|
867
|
+
"""
|
868
|
+
|
869
|
+
detail: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(1)
|
870
|
+
|
871
|
+
|
872
|
+
@dataclass(eq=False, repr=False)
|
873
|
+
class ReadRelLocalFiles(betterproto.Message):
|
874
|
+
"""Represents a list of files in input of a scan operation"""
|
875
|
+
|
876
|
+
items: List["ReadRelLocalFilesFileOrFiles"] = betterproto.message_field(1)
|
877
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
878
|
+
|
879
|
+
|
880
|
+
@dataclass(eq=False, repr=False)
|
881
|
+
class ReadRelLocalFilesFileOrFiles(betterproto.Message):
|
882
|
+
"""
|
883
|
+
Many files consist of indivisible chunks (e.g. parquet row groups
|
884
|
+
or CSV rows). If a slice partially selects an indivisible chunk
|
885
|
+
then the consumer should employ some rule to decide which slice to
|
886
|
+
include the chunk in (e.g. include it in the slice that contains
|
887
|
+
the midpoint of the chunk)
|
888
|
+
"""
|
889
|
+
|
890
|
+
uri_path: str = betterproto.string_field(1, group="path_type")
|
891
|
+
"""A URI that can refer to either a single folder or a single file"""
|
892
|
+
|
893
|
+
uri_path_glob: str = betterproto.string_field(2, group="path_type")
|
894
|
+
"""
|
895
|
+
A URI where the path portion is a glob expression that can
|
896
|
+
identify zero or more paths.
|
897
|
+
Consumers should support the POSIX syntax. The recursive
|
898
|
+
globstar (**) may not be supported.
|
899
|
+
"""
|
900
|
+
|
901
|
+
uri_file: str = betterproto.string_field(3, group="path_type")
|
902
|
+
"""A URI that refers to a single file"""
|
903
|
+
|
904
|
+
uri_folder: str = betterproto.string_field(4, group="path_type")
|
905
|
+
"""A URI that refers to a single folder"""
|
906
|
+
|
907
|
+
partition_index: int = betterproto.uint64_field(6)
|
908
|
+
"""The index of the partition this item belongs to"""
|
909
|
+
|
910
|
+
start: int = betterproto.uint64_field(7)
|
911
|
+
"""The start position in byte to read from this item"""
|
912
|
+
|
913
|
+
length: int = betterproto.uint64_field(8)
|
914
|
+
"""The length in byte to read from this item"""
|
915
|
+
|
916
|
+
parquet: "ReadRelLocalFilesFileOrFilesParquetReadOptions" = (
|
917
|
+
betterproto.message_field(9, group="file_format")
|
918
|
+
)
|
919
|
+
arrow: "ReadRelLocalFilesFileOrFilesArrowReadOptions" = betterproto.message_field(
|
920
|
+
10, group="file_format"
|
921
|
+
)
|
922
|
+
orc: "ReadRelLocalFilesFileOrFilesOrcReadOptions" = betterproto.message_field(
|
923
|
+
11, group="file_format"
|
924
|
+
)
|
925
|
+
extension: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(
|
926
|
+
12, group="file_format"
|
927
|
+
)
|
928
|
+
dwrf: "ReadRelLocalFilesFileOrFilesDwrfReadOptions" = betterproto.message_field(
|
929
|
+
13, group="file_format"
|
930
|
+
)
|
931
|
+
text: "ReadRelLocalFilesFileOrFilesDelimiterSeparatedTextReadOptions" = (
|
932
|
+
betterproto.message_field(14, group="file_format")
|
933
|
+
)
|
934
|
+
|
935
|
+
|
936
|
+
@dataclass(eq=False, repr=False)
|
937
|
+
class ReadRelLocalFilesFileOrFilesParquetReadOptions(betterproto.Message):
|
938
|
+
pass
|
939
|
+
|
940
|
+
|
941
|
+
@dataclass(eq=False, repr=False)
|
942
|
+
class ReadRelLocalFilesFileOrFilesArrowReadOptions(betterproto.Message):
|
943
|
+
pass
|
944
|
+
|
945
|
+
|
946
|
+
@dataclass(eq=False, repr=False)
|
947
|
+
class ReadRelLocalFilesFileOrFilesOrcReadOptions(betterproto.Message):
|
948
|
+
pass
|
949
|
+
|
950
|
+
|
951
|
+
@dataclass(eq=False, repr=False)
|
952
|
+
class ReadRelLocalFilesFileOrFilesDwrfReadOptions(betterproto.Message):
|
953
|
+
pass
|
954
|
+
|
955
|
+
|
956
|
+
@dataclass(eq=False, repr=False)
|
957
|
+
class ReadRelLocalFilesFileOrFilesDelimiterSeparatedTextReadOptions(
|
958
|
+
betterproto.Message
|
959
|
+
):
|
960
|
+
field_delimiter: str = betterproto.string_field(1)
|
961
|
+
"""
|
962
|
+
The character(s) used to separate fields. Common values are comma,
|
963
|
+
tab, and pipe. Multiple characters are allowed.
|
964
|
+
"""
|
965
|
+
|
966
|
+
max_line_size: int = betterproto.uint64_field(2)
|
967
|
+
"""
|
968
|
+
The maximum number of bytes to read from a single line. If a line
|
969
|
+
exceeds this limit the resulting behavior is undefined.
|
970
|
+
"""
|
971
|
+
|
972
|
+
quote: str = betterproto.string_field(3)
|
973
|
+
"""
|
974
|
+
The character(s) used to quote strings. Common values are single
|
975
|
+
and double quotation marks.
|
976
|
+
"""
|
977
|
+
|
978
|
+
header_lines_to_skip: int = betterproto.uint64_field(4)
|
979
|
+
"""The number of lines to skip at the beginning of the file."""
|
980
|
+
|
981
|
+
escape: str = betterproto.string_field(5)
|
982
|
+
"""
|
983
|
+
The character used to escape characters in strings. Backslash is
|
984
|
+
a common value. Note that a double quote mark can also be used as an
|
985
|
+
escape character but the external quotes should be removed first.
|
986
|
+
"""
|
987
|
+
|
988
|
+
value_treated_as_null: Optional[str] = betterproto.string_field(6, optional=True)
|
989
|
+
"""
|
990
|
+
If this value is encountered (including empty string), the resulting
|
991
|
+
value is null instead. Leave unset to disable. If this value is
|
992
|
+
provided, the effective schema of this file is comprised entirely of
|
993
|
+
nullable strings. If not provided, the effective schema is instead
|
994
|
+
made up of non-nullable strings.
|
995
|
+
"""
|
996
|
+
|
997
|
+
|
998
|
+
@dataclass(eq=False, repr=False)
|
999
|
+
class ProjectRel(betterproto.Message):
|
1000
|
+
"""
|
1001
|
+
This operator allows to represent calculated expressions of fields (e.g., a+b). Direct/Emit are used to represent classical relational projections
|
1002
|
+
"""
|
1003
|
+
|
1004
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1005
|
+
input: "Rel" = betterproto.message_field(2)
|
1006
|
+
expressions: List["Expression"] = betterproto.message_field(3)
|
1007
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1008
|
+
|
1009
|
+
|
1010
|
+
@dataclass(eq=False, repr=False)
|
1011
|
+
class JoinRel(betterproto.Message):
|
1012
|
+
"""
|
1013
|
+
The binary JOIN relational operator left-join-right, including various join types, a join condition and post_join_filter expression
|
1014
|
+
"""
|
1015
|
+
|
1016
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1017
|
+
left: "Rel" = betterproto.message_field(2)
|
1018
|
+
right: "Rel" = betterproto.message_field(3)
|
1019
|
+
expression: "Expression" = betterproto.message_field(4)
|
1020
|
+
post_join_filter: "Expression" = betterproto.message_field(5)
|
1021
|
+
type: "JoinRelJoinType" = betterproto.enum_field(6)
|
1022
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1023
|
+
|
1024
|
+
|
1025
|
+
@dataclass(eq=False, repr=False)
|
1026
|
+
class CrossRel(betterproto.Message):
|
1027
|
+
"""Cartesian product relational operator of two tables (left and right)"""
|
1028
|
+
|
1029
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1030
|
+
left: "Rel" = betterproto.message_field(2)
|
1031
|
+
right: "Rel" = betterproto.message_field(3)
|
1032
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1033
|
+
|
1034
|
+
|
1035
|
+
@dataclass(eq=False, repr=False)
|
1036
|
+
class FetchRel(betterproto.Message):
|
1037
|
+
"""
|
1038
|
+
The relational operator representing LIMIT/OFFSET or TOP type semantics.
|
1039
|
+
"""
|
1040
|
+
|
1041
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1042
|
+
input: "Rel" = betterproto.message_field(2)
|
1043
|
+
offset: int = betterproto.int64_field(3)
|
1044
|
+
"""the offset expressed in number of records"""
|
1045
|
+
|
1046
|
+
count: int = betterproto.int64_field(4)
|
1047
|
+
"""
|
1048
|
+
the amount of records to return
|
1049
|
+
use -1 to signal that ALL records should be returned
|
1050
|
+
"""
|
1051
|
+
|
1052
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1053
|
+
|
1054
|
+
|
1055
|
+
@dataclass(eq=False, repr=False)
|
1056
|
+
class AggregateRel(betterproto.Message):
|
1057
|
+
"""The relational operator representing a GROUP BY Aggregate"""
|
1058
|
+
|
1059
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1060
|
+
input: "Rel" = betterproto.message_field(2)
|
1061
|
+
"""Input of the aggregation"""
|
1062
|
+
|
1063
|
+
groupings: List["AggregateRelGrouping"] = betterproto.message_field(3)
|
1064
|
+
"""
|
1065
|
+
A list of zero or more grouping sets that the aggregation measures should
|
1066
|
+
be calculated for. There must be at least one grouping set if there are no
|
1067
|
+
measures (but it can be the empty grouping set).
|
1068
|
+
"""
|
1069
|
+
|
1070
|
+
measures: List["AggregateRelMeasure"] = betterproto.message_field(4)
|
1071
|
+
"""
|
1072
|
+
A list of one or more aggregate expressions along with an optional filter.
|
1073
|
+
Required if there are no groupings.
|
1074
|
+
"""
|
1075
|
+
|
1076
|
+
grouping_expressions: List["Expression"] = betterproto.message_field(5)
|
1077
|
+
"""
|
1078
|
+
A list of zero or more grouping expressions that grouping sets (i.e.,
|
1079
|
+
`Grouping` messages in the `groupings` field) can reference. Each
|
1080
|
+
expression in this list must be referred to by at least one
|
1081
|
+
`Grouping.expression_references`.
|
1082
|
+
"""
|
1083
|
+
|
1084
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1085
|
+
|
1086
|
+
|
1087
|
+
@dataclass(eq=False, repr=False)
|
1088
|
+
class AggregateRelGrouping(betterproto.Message):
|
1089
|
+
grouping_expressions: List["Expression"] = betterproto.message_field(1)
|
1090
|
+
"""Deprecated in favor of `expression_references` below."""
|
1091
|
+
|
1092
|
+
expression_references: List[int] = betterproto.uint32_field(2)
|
1093
|
+
"""
|
1094
|
+
A list of zero or more references to grouping expressions, i.e., indices
|
1095
|
+
into the `grouping_expression` list.
|
1096
|
+
"""
|
1097
|
+
|
1098
|
+
def __post_init__(self) -> None:
|
1099
|
+
super().__post_init__()
|
1100
|
+
if self.is_set("grouping_expressions"):
|
1101
|
+
warnings.warn(
|
1102
|
+
"AggregateRelGrouping.grouping_expressions is deprecated",
|
1103
|
+
DeprecationWarning,
|
1104
|
+
)
|
1105
|
+
|
1106
|
+
|
1107
|
+
@dataclass(eq=False, repr=False)
|
1108
|
+
class AggregateRelMeasure(betterproto.Message):
|
1109
|
+
measure: "AggregateFunction" = betterproto.message_field(1)
|
1110
|
+
filter: "Expression" = betterproto.message_field(2)
|
1111
|
+
"""
|
1112
|
+
An optional boolean expression that acts to filter which records are
|
1113
|
+
included in the measure. True means include this record for calculation
|
1114
|
+
within the measure.
|
1115
|
+
Helps to support SUM(<c>) FILTER(WHERE...) syntax without masking opportunities for optimization
|
1116
|
+
"""
|
1117
|
+
|
1118
|
+
|
1119
|
+
@dataclass(eq=False, repr=False)
|
1120
|
+
class ConsistentPartitionWindowRel(betterproto.Message):
|
1121
|
+
"""
|
1122
|
+
ConsistentPartitionWindowRel provides the ability to perform calculations across sets of rows
|
1123
|
+
that are related to the current query row. It can be used to execute window functions where
|
1124
|
+
all the windows share the same partitioning and ordering.
|
1125
|
+
"""
|
1126
|
+
|
1127
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1128
|
+
input: "Rel" = betterproto.message_field(2)
|
1129
|
+
window_functions: List[
|
1130
|
+
"ConsistentPartitionWindowRelWindowRelFunction"
|
1131
|
+
] = betterproto.message_field(3)
|
1132
|
+
partition_expressions: List["Expression"] = betterproto.message_field(4)
|
1133
|
+
sorts: List["SortField"] = betterproto.message_field(5)
|
1134
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1135
|
+
|
1136
|
+
|
1137
|
+
@dataclass(eq=False, repr=False)
|
1138
|
+
class ConsistentPartitionWindowRelWindowRelFunction(betterproto.Message):
|
1139
|
+
"""
|
1140
|
+
This message mirrors the `WindowFunction` message but removes the fields defining the partition,
|
1141
|
+
sorts, and bounds, since those must be consistent across the various functions in this rel. Refer
|
1142
|
+
to the `WindowFunction` message for a description of these fields.
|
1143
|
+
"""
|
1144
|
+
|
1145
|
+
function_reference: int = betterproto.uint32_field(1)
|
1146
|
+
arguments: List["FunctionArgument"] = betterproto.message_field(9)
|
1147
|
+
options: List["FunctionOption"] = betterproto.message_field(11)
|
1148
|
+
output_type: "Type" = betterproto.message_field(7)
|
1149
|
+
phase: "AggregationPhase" = betterproto.enum_field(6)
|
1150
|
+
invocation: "AggregateFunctionAggregationInvocation" = betterproto.enum_field(10)
|
1151
|
+
lower_bound: "ExpressionWindowFunctionBound" = betterproto.message_field(5)
|
1152
|
+
upper_bound: "ExpressionWindowFunctionBound" = betterproto.message_field(4)
|
1153
|
+
bounds_type: "ExpressionWindowFunctionBoundsType" = betterproto.enum_field(12)
|
1154
|
+
|
1155
|
+
|
1156
|
+
@dataclass(eq=False, repr=False)
|
1157
|
+
class SortRel(betterproto.Message):
|
1158
|
+
"""
|
1159
|
+
The ORDERY BY (or sorting) relational operator. Beside describing a base relation, it includes a list of fields to sort on
|
1160
|
+
"""
|
1161
|
+
|
1162
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1163
|
+
input: "Rel" = betterproto.message_field(2)
|
1164
|
+
sorts: List["SortField"] = betterproto.message_field(3)
|
1165
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1166
|
+
|
1167
|
+
|
1168
|
+
@dataclass(eq=False, repr=False)
|
1169
|
+
class FilterRel(betterproto.Message):
|
1170
|
+
"""
|
1171
|
+
The relational operator capturing simple FILTERs (as in the WHERE clause of SQL)
|
1172
|
+
"""
|
1173
|
+
|
1174
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1175
|
+
input: "Rel" = betterproto.message_field(2)
|
1176
|
+
condition: "Expression" = betterproto.message_field(3)
|
1177
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1178
|
+
|
1179
|
+
|
1180
|
+
@dataclass(eq=False, repr=False)
|
1181
|
+
class SetRel(betterproto.Message):
|
1182
|
+
"""The relational set operators (intersection/union/etc..)"""
|
1183
|
+
|
1184
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1185
|
+
inputs: List["Rel"] = betterproto.message_field(2)
|
1186
|
+
"""
|
1187
|
+
The first input is the primary input, the remaining are secondary
|
1188
|
+
inputs. There must be at least two inputs.
|
1189
|
+
"""
|
1190
|
+
|
1191
|
+
op: "SetRelSetOp" = betterproto.enum_field(3)
|
1192
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1193
|
+
|
1194
|
+
|
1195
|
+
@dataclass(eq=False, repr=False)
|
1196
|
+
class ExtensionSingleRel(betterproto.Message):
|
1197
|
+
"""Stub to support extension with a single input"""
|
1198
|
+
|
1199
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1200
|
+
input: "Rel" = betterproto.message_field(2)
|
1201
|
+
detail: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(3)
|
1202
|
+
|
1203
|
+
|
1204
|
+
@dataclass(eq=False, repr=False)
|
1205
|
+
class ExtensionLeafRel(betterproto.Message):
|
1206
|
+
"""Stub to support extension with a zero inputs"""
|
1207
|
+
|
1208
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1209
|
+
detail: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(2)
|
1210
|
+
|
1211
|
+
|
1212
|
+
@dataclass(eq=False, repr=False)
|
1213
|
+
class ExtensionMultiRel(betterproto.Message):
|
1214
|
+
"""Stub to support extension with multiple inputs"""
|
1215
|
+
|
1216
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1217
|
+
inputs: List["Rel"] = betterproto.message_field(2)
|
1218
|
+
detail: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(3)
|
1219
|
+
|
1220
|
+
|
1221
|
+
@dataclass(eq=False, repr=False)
|
1222
|
+
class ExchangeRel(betterproto.Message):
|
1223
|
+
"""A redistribution operation"""
|
1224
|
+
|
1225
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1226
|
+
input: "Rel" = betterproto.message_field(2)
|
1227
|
+
partition_count: int = betterproto.int32_field(3)
|
1228
|
+
targets: List["ExchangeRelExchangeTarget"] = betterproto.message_field(4)
|
1229
|
+
scatter_by_fields: "ExchangeRelScatterFields" = betterproto.message_field(
|
1230
|
+
5, group="exchange_kind"
|
1231
|
+
)
|
1232
|
+
single_target: "ExchangeRelSingleBucketExpression" = betterproto.message_field(
|
1233
|
+
6, group="exchange_kind"
|
1234
|
+
)
|
1235
|
+
multi_target: "ExchangeRelMultiBucketExpression" = betterproto.message_field(
|
1236
|
+
7, group="exchange_kind"
|
1237
|
+
)
|
1238
|
+
round_robin: "ExchangeRelRoundRobin" = betterproto.message_field(
|
1239
|
+
8, group="exchange_kind"
|
1240
|
+
)
|
1241
|
+
broadcast: "ExchangeRelBroadcast" = betterproto.message_field(
|
1242
|
+
9, group="exchange_kind"
|
1243
|
+
)
|
1244
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1245
|
+
|
1246
|
+
|
1247
|
+
@dataclass(eq=False, repr=False)
|
1248
|
+
class ExchangeRelScatterFields(betterproto.Message):
|
1249
|
+
fields: List["ExpressionFieldReference"] = betterproto.message_field(1)
|
1250
|
+
|
1251
|
+
|
1252
|
+
@dataclass(eq=False, repr=False)
|
1253
|
+
class ExchangeRelSingleBucketExpression(betterproto.Message):
|
1254
|
+
"""Returns a single bucket number per record."""
|
1255
|
+
|
1256
|
+
expression: "Expression" = betterproto.message_field(1)
|
1257
|
+
|
1258
|
+
|
1259
|
+
@dataclass(eq=False, repr=False)
|
1260
|
+
class ExchangeRelMultiBucketExpression(betterproto.Message):
|
1261
|
+
"""Returns zero or more bucket numbers per record"""
|
1262
|
+
|
1263
|
+
expression: "Expression" = betterproto.message_field(1)
|
1264
|
+
constrained_to_count: bool = betterproto.bool_field(2)
|
1265
|
+
|
1266
|
+
|
1267
|
+
@dataclass(eq=False, repr=False)
|
1268
|
+
class ExchangeRelBroadcast(betterproto.Message):
|
1269
|
+
"""Send all data to every target."""
|
1270
|
+
|
1271
|
+
pass
|
1272
|
+
|
1273
|
+
|
1274
|
+
@dataclass(eq=False, repr=False)
|
1275
|
+
class ExchangeRelRoundRobin(betterproto.Message):
|
1276
|
+
"""Route approximately"""
|
1277
|
+
|
1278
|
+
exact: bool = betterproto.bool_field(1)
|
1279
|
+
"""
|
1280
|
+
whether the round robin behavior is required to exact (per record) or
|
1281
|
+
approximate. Defaults to approximate.
|
1282
|
+
"""
|
1283
|
+
|
1284
|
+
|
1285
|
+
@dataclass(eq=False, repr=False)
|
1286
|
+
class ExchangeRelExchangeTarget(betterproto.Message):
|
1287
|
+
"""The message to describe partition targets of an exchange"""
|
1288
|
+
|
1289
|
+
partition_id: List[int] = betterproto.int32_field(1)
|
1290
|
+
"""
|
1291
|
+
Describes the partition id(s) to send. If this is empty, all data is sent
|
1292
|
+
to this target.
|
1293
|
+
"""
|
1294
|
+
|
1295
|
+
uri: str = betterproto.string_field(2, group="target_type")
|
1296
|
+
extended: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(
|
1297
|
+
3, group="target_type"
|
1298
|
+
)
|
1299
|
+
|
1300
|
+
|
1301
|
+
@dataclass(eq=False, repr=False)
|
1302
|
+
class ExpandRel(betterproto.Message):
|
1303
|
+
"""
|
1304
|
+
Duplicates records by emitting one or more rows per input row. The number of rows emitted per
|
1305
|
+
input row is the same for all input rows.
|
1306
|
+
|
1307
|
+
In addition to a field being emitted per input field an extra int64 field is emitted which
|
1308
|
+
contains a zero-indexed ordinal corresponding to the duplicate definition.
|
1309
|
+
"""
|
1310
|
+
|
1311
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1312
|
+
input: "Rel" = betterproto.message_field(2)
|
1313
|
+
fields: List["ExpandRelExpandField"] = betterproto.message_field(4)
|
1314
|
+
"""
|
1315
|
+
There should be one definition here for each input field. Any fields beyond the provided
|
1316
|
+
definitions will be emitted as is (as if a consistent_field record with an identity
|
1317
|
+
expression was provided).
|
1318
|
+
"""
|
1319
|
+
|
1320
|
+
|
1321
|
+
@dataclass(eq=False, repr=False)
|
1322
|
+
class ExpandRelExpandField(betterproto.Message):
|
1323
|
+
switching_field: "ExpandRelSwitchingField" = betterproto.message_field(
|
1324
|
+
2, group="field_type"
|
1325
|
+
)
|
1326
|
+
"""
|
1327
|
+
Field that switches output based on which duplicate is being output. Every
|
1328
|
+
switching_field should contain the same number of duplicates (so that the output rows
|
1329
|
+
are of consistent size and type). If there are not enough switching field definitions
|
1330
|
+
to match the other field definitions NULL will be returned to fill the extras.
|
1331
|
+
"""
|
1332
|
+
|
1333
|
+
consistent_field: "Expression" = betterproto.message_field(3, group="field_type")
|
1334
|
+
"""
|
1335
|
+
Field that outputs the same value no matter which duplicate is being output. Equivalent
|
1336
|
+
to a switching_field that lists the same expression multiple times.
|
1337
|
+
"""
|
1338
|
+
|
1339
|
+
|
1340
|
+
@dataclass(eq=False, repr=False)
|
1341
|
+
class ExpandRelSwitchingField(betterproto.Message):
|
1342
|
+
duplicates: List["Expression"] = betterproto.message_field(1)
|
1343
|
+
"""
|
1344
|
+
All duplicates must return the same type class but may differ in nullability. The effective
|
1345
|
+
type of the output field will be nullable if any of the duplicate expressions are nullable.
|
1346
|
+
"""
|
1347
|
+
|
1348
|
+
|
1349
|
+
@dataclass(eq=False, repr=False)
|
1350
|
+
class RelRoot(betterproto.Message):
|
1351
|
+
"""
|
1352
|
+
A relation with output field names.
|
1353
|
+
|
1354
|
+
This is for use at the root of a `Rel` tree.
|
1355
|
+
"""
|
1356
|
+
|
1357
|
+
input: "Rel" = betterproto.message_field(1)
|
1358
|
+
"""A relation"""
|
1359
|
+
|
1360
|
+
names: List[str] = betterproto.string_field(2)
|
1361
|
+
"""Field names in depth-first order"""
|
1362
|
+
|
1363
|
+
|
1364
|
+
@dataclass(eq=False, repr=False)
|
1365
|
+
class Rel(betterproto.Message):
|
1366
|
+
"""A relation (used internally in a plan)"""
|
1367
|
+
|
1368
|
+
read: "ReadRel" = betterproto.message_field(1, group="rel_type")
|
1369
|
+
filter: "FilterRel" = betterproto.message_field(2, group="rel_type")
|
1370
|
+
fetch: "FetchRel" = betterproto.message_field(3, group="rel_type")
|
1371
|
+
aggregate: "AggregateRel" = betterproto.message_field(4, group="rel_type")
|
1372
|
+
sort: "SortRel" = betterproto.message_field(5, group="rel_type")
|
1373
|
+
join: "JoinRel" = betterproto.message_field(6, group="rel_type")
|
1374
|
+
project: "ProjectRel" = betterproto.message_field(7, group="rel_type")
|
1375
|
+
set: "SetRel" = betterproto.message_field(8, group="rel_type")
|
1376
|
+
extension_single: "ExtensionSingleRel" = betterproto.message_field(
|
1377
|
+
9, group="rel_type"
|
1378
|
+
)
|
1379
|
+
extension_multi: "ExtensionMultiRel" = betterproto.message_field(
|
1380
|
+
10, group="rel_type"
|
1381
|
+
)
|
1382
|
+
extension_leaf: "ExtensionLeafRel" = betterproto.message_field(11, group="rel_type")
|
1383
|
+
cross: "CrossRel" = betterproto.message_field(12, group="rel_type")
|
1384
|
+
reference: "ReferenceRel" = betterproto.message_field(21, group="rel_type")
|
1385
|
+
write: "WriteRel" = betterproto.message_field(19, group="rel_type")
|
1386
|
+
ddl: "DdlRel" = betterproto.message_field(20, group="rel_type")
|
1387
|
+
hash_join: "HashJoinRel" = betterproto.message_field(13, group="rel_type")
|
1388
|
+
"""Physical relations"""
|
1389
|
+
|
1390
|
+
merge_join: "MergeJoinRel" = betterproto.message_field(14, group="rel_type")
|
1391
|
+
nested_loop_join: "NestedLoopJoinRel" = betterproto.message_field(
|
1392
|
+
18, group="rel_type"
|
1393
|
+
)
|
1394
|
+
window: "ConsistentPartitionWindowRel" = betterproto.message_field(
|
1395
|
+
17, group="rel_type"
|
1396
|
+
)
|
1397
|
+
exchange: "ExchangeRel" = betterproto.message_field(15, group="rel_type")
|
1398
|
+
expand: "ExpandRel" = betterproto.message_field(16, group="rel_type")
|
1399
|
+
|
1400
|
+
|
1401
|
+
@dataclass(eq=False, repr=False)
|
1402
|
+
class NamedObjectWrite(betterproto.Message):
|
1403
|
+
"""A base object for writing (e.g., a table or a view)."""
|
1404
|
+
|
1405
|
+
names: List[str] = betterproto.string_field(1)
|
1406
|
+
"""
|
1407
|
+
The list of string is used to represent namespacing (e.g., mydb.mytable).
|
1408
|
+
This assumes shared catalog between systems exchanging a message.
|
1409
|
+
"""
|
1410
|
+
|
1411
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1412
|
+
|
1413
|
+
|
1414
|
+
@dataclass(eq=False, repr=False)
|
1415
|
+
class ExtensionObject(betterproto.Message):
|
1416
|
+
"""
|
1417
|
+
A stub type that can be used to extend/introduce new table types outside
|
1418
|
+
the specification.
|
1419
|
+
"""
|
1420
|
+
|
1421
|
+
detail: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(1)
|
1422
|
+
|
1423
|
+
|
1424
|
+
@dataclass(eq=False, repr=False)
|
1425
|
+
class DdlRel(betterproto.Message):
|
1426
|
+
named_object: "NamedObjectWrite" = betterproto.message_field(1, group="write_type")
|
1427
|
+
extension_object: "ExtensionObject" = betterproto.message_field(
|
1428
|
+
2, group="write_type"
|
1429
|
+
)
|
1430
|
+
table_schema: "NamedStruct" = betterproto.message_field(3)
|
1431
|
+
"""
|
1432
|
+
The columns that will be modified (representing after-image of a schema change)
|
1433
|
+
"""
|
1434
|
+
|
1435
|
+
table_defaults: "ExpressionLiteralStruct" = betterproto.message_field(4)
|
1436
|
+
"""
|
1437
|
+
The default values for the columns (representing after-image of a schema change)
|
1438
|
+
E.g., in case of an ALTER TABLE that changes some of the column default values, we expect
|
1439
|
+
the table_defaults Struct to report a full list of default values reflecting the result of applying
|
1440
|
+
the ALTER TABLE operator successfully
|
1441
|
+
"""
|
1442
|
+
|
1443
|
+
object: "DdlRelDdlObject" = betterproto.enum_field(5)
|
1444
|
+
"""Which type of object we operate on"""
|
1445
|
+
|
1446
|
+
op: "DdlRelDdlOp" = betterproto.enum_field(6)
|
1447
|
+
"""The type of operation to perform"""
|
1448
|
+
|
1449
|
+
view_definition: "Rel" = betterproto.message_field(7)
|
1450
|
+
"""The body of the CREATE VIEW"""
|
1451
|
+
|
1452
|
+
common: "RelCommon" = betterproto.message_field(8)
|
1453
|
+
|
1454
|
+
|
1455
|
+
@dataclass(eq=False, repr=False)
|
1456
|
+
class WriteRel(betterproto.Message):
|
1457
|
+
"""
|
1458
|
+
The operator that modifies the content of a database (operates on 1 table at a time, but record-selection/source can be
|
1459
|
+
based on joining of multiple tables).
|
1460
|
+
"""
|
1461
|
+
|
1462
|
+
named_table: "NamedObjectWrite" = betterproto.message_field(1, group="write_type")
|
1463
|
+
extension_table: "ExtensionObject" = betterproto.message_field(
|
1464
|
+
2, group="write_type"
|
1465
|
+
)
|
1466
|
+
table_schema: "NamedStruct" = betterproto.message_field(3)
|
1467
|
+
"""
|
1468
|
+
The schema of the table (must align with Rel input (e.g., number of leaf fields must match))
|
1469
|
+
"""
|
1470
|
+
|
1471
|
+
op: "WriteRelWriteOp" = betterproto.enum_field(4)
|
1472
|
+
"""The type of operation to perform"""
|
1473
|
+
|
1474
|
+
input: "Rel" = betterproto.message_field(5)
|
1475
|
+
"""
|
1476
|
+
The relation that determines the records to add/remove/modify
|
1477
|
+
the schema must match with table_schema. Default values must be explicitly stated
|
1478
|
+
in a ProjectRel at the top of the input. The match must also
|
1479
|
+
occur in case of DELETE to ensure multi-engine plans are unequivocal.
|
1480
|
+
"""
|
1481
|
+
|
1482
|
+
output: "WriteRelOutputMode" = betterproto.enum_field(6)
|
1483
|
+
"""Output mode determines what is the output of executing this rel"""
|
1484
|
+
|
1485
|
+
common: "RelCommon" = betterproto.message_field(7)
|
1486
|
+
|
1487
|
+
|
1488
|
+
@dataclass(eq=False, repr=False)
|
1489
|
+
class ComparisonJoinKey(betterproto.Message):
|
1490
|
+
"""
|
1491
|
+
Hash joins and merge joins are a specialization of the general join where the join
|
1492
|
+
expression is an series of comparisons between fields that are ANDed together. The
|
1493
|
+
behavior of this comparison is flexible
|
1494
|
+
"""
|
1495
|
+
|
1496
|
+
left: "ExpressionFieldReference" = betterproto.message_field(1)
|
1497
|
+
"""The key to compare from the left table"""
|
1498
|
+
|
1499
|
+
right: "ExpressionFieldReference" = betterproto.message_field(2)
|
1500
|
+
"""The key to compare from the right table"""
|
1501
|
+
|
1502
|
+
comparison: "ComparisonJoinKeyComparisonType" = betterproto.message_field(3)
|
1503
|
+
"""Describes how to compare the two keys"""
|
1504
|
+
|
1505
|
+
|
1506
|
+
@dataclass(eq=False, repr=False)
|
1507
|
+
class ComparisonJoinKeyComparisonType(betterproto.Message):
|
1508
|
+
"""Describes how the relation should consider if two rows are a match"""
|
1509
|
+
|
1510
|
+
simple: "ComparisonJoinKeySimpleComparisonType" = betterproto.enum_field(
|
1511
|
+
1, group="inner_type"
|
1512
|
+
)
|
1513
|
+
"""One of the simple comparison behaviors is used"""
|
1514
|
+
|
1515
|
+
custom_function_reference: int = betterproto.uint32_field(2, group="inner_type")
|
1516
|
+
"""
|
1517
|
+
A custom comparison behavior is used. This can happen, for example, when using
|
1518
|
+
collations, where we might want to do something like a case-insensitive comparison.
|
1519
|
+
|
1520
|
+
This must be a binary function with a boolean return type
|
1521
|
+
"""
|
1522
|
+
|
1523
|
+
|
1524
|
+
@dataclass(eq=False, repr=False)
|
1525
|
+
class HashJoinRel(betterproto.Message):
|
1526
|
+
"""
|
1527
|
+
The hash equijoin join operator will build a hash table out of the right input based on a set of join keys.
|
1528
|
+
It will then probe that hash table for incoming inputs, finding matches.
|
1529
|
+
|
1530
|
+
Two rows are a match if the comparison function returns true for all keys
|
1531
|
+
"""
|
1532
|
+
|
1533
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1534
|
+
left: "Rel" = betterproto.message_field(2)
|
1535
|
+
right: "Rel" = betterproto.message_field(3)
|
1536
|
+
left_keys: List["ExpressionFieldReference"] = betterproto.message_field(4)
|
1537
|
+
"""
|
1538
|
+
These fields are deprecated in favor of `keys`. If they are set then
|
1539
|
+
the two lists (left_keys and right_keys) must have the same length and
|
1540
|
+
the comparion function is considered to be SimpleEqualityType::EQ
|
1541
|
+
"""
|
1542
|
+
|
1543
|
+
right_keys: List["ExpressionFieldReference"] = betterproto.message_field(5)
|
1544
|
+
keys: List["ComparisonJoinKey"] = betterproto.message_field(8)
|
1545
|
+
"""
|
1546
|
+
One or more keys to join on. The relation is invalid if this is empty
|
1547
|
+
(unless the deprecated left_keys/right_keys fields are being used).
|
1548
|
+
|
1549
|
+
If a custom comparison function is used then it must be consistent with
|
1550
|
+
the hash function used for the keys.
|
1551
|
+
|
1552
|
+
In other words, the hash function must return the same hash code when the
|
1553
|
+
comparison returns true. For example, if the comparison function is
|
1554
|
+
"equals ignoring case" then the hash function must return the same hash
|
1555
|
+
code for strings that differ only by case. Note: the hash function is not
|
1556
|
+
specified here. It is the responsibility of the consumer to find an appropriate
|
1557
|
+
hash function for a given comparsion function or to reject the plan if it cannot
|
1558
|
+
do so.
|
1559
|
+
"""
|
1560
|
+
|
1561
|
+
post_join_filter: "Expression" = betterproto.message_field(6)
|
1562
|
+
type: "HashJoinRelJoinType" = betterproto.enum_field(7)
|
1563
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1564
|
+
|
1565
|
+
def __post_init__(self) -> None:
|
1566
|
+
super().__post_init__()
|
1567
|
+
if self.is_set("left_keys"):
|
1568
|
+
warnings.warn("HashJoinRel.left_keys is deprecated", DeprecationWarning)
|
1569
|
+
if self.is_set("right_keys"):
|
1570
|
+
warnings.warn("HashJoinRel.right_keys is deprecated", DeprecationWarning)
|
1571
|
+
|
1572
|
+
|
1573
|
+
@dataclass(eq=False, repr=False)
|
1574
|
+
class MergeJoinRel(betterproto.Message):
|
1575
|
+
"""
|
1576
|
+
The merge equijoin does a join by taking advantage of two sets that are sorted on the join keys.
|
1577
|
+
This allows the join operation to be done in a streaming fashion.
|
1578
|
+
"""
|
1579
|
+
|
1580
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1581
|
+
left: "Rel" = betterproto.message_field(2)
|
1582
|
+
right: "Rel" = betterproto.message_field(3)
|
1583
|
+
left_keys: List["ExpressionFieldReference"] = betterproto.message_field(4)
|
1584
|
+
"""
|
1585
|
+
These fields are deprecated in favor of `keys`. If they are set then
|
1586
|
+
the two lists (left_keys and right_keys) must have the same length and
|
1587
|
+
the comparion function is considered to be SimpleEqualityType::EQ
|
1588
|
+
"""
|
1589
|
+
|
1590
|
+
right_keys: List["ExpressionFieldReference"] = betterproto.message_field(5)
|
1591
|
+
keys: List["ComparisonJoinKey"] = betterproto.message_field(8)
|
1592
|
+
"""
|
1593
|
+
One or more keys to join on. The relation is invalid if this is empty
|
1594
|
+
(unless the deprecated left_keys/right_keys fields are being used).
|
1595
|
+
|
1596
|
+
If a custom comparison function is used then it must be consistent with
|
1597
|
+
the ordering of the input data. For example, if the comparison function
|
1598
|
+
is "<" then we generally expect the data to be sorted in ascending order.
|
1599
|
+
|
1600
|
+
If the comparison function is something like "less than ignoring case" then
|
1601
|
+
the data should be sorted appropriately (e.g. both "A" and "a" should come
|
1602
|
+
before "b")
|
1603
|
+
|
1604
|
+
The sort order is not specified here. It is typically the responsibility of
|
1605
|
+
the producer to ensure the plan sorts the data if needed (although the consumer
|
1606
|
+
is free to do so as well). If possible, the consumer should verify the sort
|
1607
|
+
order and reject invalid plans.
|
1608
|
+
"""
|
1609
|
+
|
1610
|
+
post_join_filter: "Expression" = betterproto.message_field(6)
|
1611
|
+
type: "MergeJoinRelJoinType" = betterproto.enum_field(7)
|
1612
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1613
|
+
|
1614
|
+
def __post_init__(self) -> None:
|
1615
|
+
super().__post_init__()
|
1616
|
+
if self.is_set("left_keys"):
|
1617
|
+
warnings.warn("MergeJoinRel.left_keys is deprecated", DeprecationWarning)
|
1618
|
+
if self.is_set("right_keys"):
|
1619
|
+
warnings.warn("MergeJoinRel.right_keys is deprecated", DeprecationWarning)
|
1620
|
+
|
1621
|
+
|
1622
|
+
@dataclass(eq=False, repr=False)
|
1623
|
+
class NestedLoopJoinRel(betterproto.Message):
|
1624
|
+
"""
|
1625
|
+
The nested loop join (NLJ) operator will hold the entire right input and iterate over it using the
|
1626
|
+
left input, evaluating the join expression on the Cartesian product of all rows.
|
1627
|
+
"""
|
1628
|
+
|
1629
|
+
common: "RelCommon" = betterproto.message_field(1)
|
1630
|
+
left: "Rel" = betterproto.message_field(2)
|
1631
|
+
right: "Rel" = betterproto.message_field(3)
|
1632
|
+
expression: "Expression" = betterproto.message_field(4)
|
1633
|
+
"""optional, defaults to true (a cartesian join)"""
|
1634
|
+
|
1635
|
+
type: "NestedLoopJoinRelJoinType" = betterproto.enum_field(5)
|
1636
|
+
advanced_extension: "extensions.AdvancedExtension" = betterproto.message_field(10)
|
1637
|
+
|
1638
|
+
|
1639
|
+
@dataclass(eq=False, repr=False)
|
1640
|
+
class FunctionArgument(betterproto.Message):
|
1641
|
+
"""The argument of a function"""
|
1642
|
+
|
1643
|
+
enum: str = betterproto.string_field(1, group="arg_type")
|
1644
|
+
type: "Type" = betterproto.message_field(2, group="arg_type")
|
1645
|
+
value: "Expression" = betterproto.message_field(3, group="arg_type")
|
1646
|
+
|
1647
|
+
|
1648
|
+
@dataclass(eq=False, repr=False)
|
1649
|
+
class FunctionOption(betterproto.Message):
|
1650
|
+
"""
|
1651
|
+
An optional function argument. Typically used for specifying behavior in
|
1652
|
+
invalid or corner cases.
|
1653
|
+
"""
|
1654
|
+
|
1655
|
+
name: str = betterproto.string_field(1)
|
1656
|
+
"""
|
1657
|
+
Name of the option to set. If the consumer does not recognize the
|
1658
|
+
option, it must reject the plan. The name is matched case-insensitively
|
1659
|
+
with option names defined for the function.
|
1660
|
+
"""
|
1661
|
+
|
1662
|
+
preference: List[str] = betterproto.string_field(2)
|
1663
|
+
"""
|
1664
|
+
List of behavior options allowed by the producer. At least one must be
|
1665
|
+
specified; to leave an option unspecified, simply don't add an entry to
|
1666
|
+
`options`. The consumer must use the first option from the list that it
|
1667
|
+
supports. If the consumer supports none of the specified options, it
|
1668
|
+
must reject the plan. The name is matched case-insensitively and must
|
1669
|
+
match one of the option values defined for the option.
|
1670
|
+
"""
|
1671
|
+
|
1672
|
+
|
1673
|
+
@dataclass(eq=False, repr=False)
|
1674
|
+
class Expression(betterproto.Message):
|
1675
|
+
literal: "ExpressionLiteral" = betterproto.message_field(1, group="rex_type")
|
1676
|
+
selection: "ExpressionFieldReference" = betterproto.message_field(
|
1677
|
+
2, group="rex_type"
|
1678
|
+
)
|
1679
|
+
scalar_function: "ExpressionScalarFunction" = betterproto.message_field(
|
1680
|
+
3, group="rex_type"
|
1681
|
+
)
|
1682
|
+
window_function: "ExpressionWindowFunction" = betterproto.message_field(
|
1683
|
+
5, group="rex_type"
|
1684
|
+
)
|
1685
|
+
if_then: "ExpressionIfThen" = betterproto.message_field(6, group="rex_type")
|
1686
|
+
switch_expression: "ExpressionSwitchExpression" = betterproto.message_field(
|
1687
|
+
7, group="rex_type"
|
1688
|
+
)
|
1689
|
+
singular_or_list: "ExpressionSingularOrList" = betterproto.message_field(
|
1690
|
+
8, group="rex_type"
|
1691
|
+
)
|
1692
|
+
multi_or_list: "ExpressionMultiOrList" = betterproto.message_field(
|
1693
|
+
9, group="rex_type"
|
1694
|
+
)
|
1695
|
+
cast: "ExpressionCast" = betterproto.message_field(11, group="rex_type")
|
1696
|
+
subquery: "ExpressionSubquery" = betterproto.message_field(12, group="rex_type")
|
1697
|
+
nested: "ExpressionNested" = betterproto.message_field(13, group="rex_type")
|
1698
|
+
enum: "ExpressionEnum" = betterproto.message_field(10, group="rex_type")
|
1699
|
+
"""
|
1700
|
+
deprecated: enum literals are only sensible in the context of
|
1701
|
+
function arguments, for which FunctionArgument should now be
|
1702
|
+
used
|
1703
|
+
"""
|
1704
|
+
|
1705
|
+
def __post_init__(self) -> None:
|
1706
|
+
super().__post_init__()
|
1707
|
+
if self.is_set("enum"):
|
1708
|
+
warnings.warn("Expression.enum is deprecated", DeprecationWarning)
|
1709
|
+
|
1710
|
+
|
1711
|
+
@dataclass(eq=False, repr=False)
|
1712
|
+
class ExpressionEnum(betterproto.Message):
|
1713
|
+
specified: str = betterproto.string_field(1, group="enum_kind")
|
1714
|
+
unspecified: "ExpressionEnumEmpty" = betterproto.message_field(2, group="enum_kind")
|
1715
|
+
|
1716
|
+
def __post_init__(self) -> None:
|
1717
|
+
warnings.warn("ExpressionEnum is deprecated", DeprecationWarning)
|
1718
|
+
super().__post_init__()
|
1719
|
+
|
1720
|
+
|
1721
|
+
@dataclass(eq=False, repr=False)
|
1722
|
+
class ExpressionEnumEmpty(betterproto.Message):
|
1723
|
+
pass
|
1724
|
+
|
1725
|
+
def __post_init__(self) -> None:
|
1726
|
+
warnings.warn("ExpressionEnumEmpty is deprecated", DeprecationWarning)
|
1727
|
+
super().__post_init__()
|
1728
|
+
|
1729
|
+
|
1730
|
+
@dataclass(eq=False, repr=False)
|
1731
|
+
class ExpressionLiteral(betterproto.Message):
|
1732
|
+
boolean: bool = betterproto.bool_field(1, group="literal_type")
|
1733
|
+
i8: int = betterproto.int32_field(2, group="literal_type")
|
1734
|
+
i16: int = betterproto.int32_field(3, group="literal_type")
|
1735
|
+
i32: int = betterproto.int32_field(5, group="literal_type")
|
1736
|
+
i64: int = betterproto.int64_field(7, group="literal_type")
|
1737
|
+
fp32: float = betterproto.float_field(10, group="literal_type")
|
1738
|
+
fp64: float = betterproto.double_field(11, group="literal_type")
|
1739
|
+
string: str = betterproto.string_field(12, group="literal_type")
|
1740
|
+
binary: bytes = betterproto.bytes_field(13, group="literal_type")
|
1741
|
+
timestamp: int = betterproto.int64_field(14, group="literal_type")
|
1742
|
+
"""
|
1743
|
+
Timestamp in units of microseconds since the UNIX epoch.
|
1744
|
+
Deprecated in favor of `precision_timestamp`
|
1745
|
+
"""
|
1746
|
+
|
1747
|
+
date: int = betterproto.int32_field(16, group="literal_type")
|
1748
|
+
"""Date in units of days since the UNIX epoch."""
|
1749
|
+
|
1750
|
+
time: int = betterproto.int64_field(17, group="literal_type")
|
1751
|
+
"""Time in units of microseconds past midnight"""
|
1752
|
+
|
1753
|
+
interval_year_to_month: "ExpressionLiteralIntervalYearToMonth" = (
|
1754
|
+
betterproto.message_field(19, group="literal_type")
|
1755
|
+
)
|
1756
|
+
interval_day_to_second: "ExpressionLiteralIntervalDayToSecond" = (
|
1757
|
+
betterproto.message_field(20, group="literal_type")
|
1758
|
+
)
|
1759
|
+
interval_compound: "ExpressionLiteralIntervalCompound" = betterproto.message_field(
|
1760
|
+
36, group="literal_type"
|
1761
|
+
)
|
1762
|
+
fixed_char: str = betterproto.string_field(21, group="literal_type")
|
1763
|
+
var_char: "ExpressionLiteralVarChar" = betterproto.message_field(
|
1764
|
+
22, group="literal_type"
|
1765
|
+
)
|
1766
|
+
fixed_binary: bytes = betterproto.bytes_field(23, group="literal_type")
|
1767
|
+
decimal: "ExpressionLiteralDecimal" = betterproto.message_field(
|
1768
|
+
24, group="literal_type"
|
1769
|
+
)
|
1770
|
+
precision_timestamp: "ExpressionLiteralPrecisionTimestamp" = (
|
1771
|
+
betterproto.message_field(34, group="literal_type")
|
1772
|
+
)
|
1773
|
+
precision_timestamp_tz: "ExpressionLiteralPrecisionTimestamp" = (
|
1774
|
+
betterproto.message_field(35, group="literal_type")
|
1775
|
+
)
|
1776
|
+
struct: "ExpressionLiteralStruct" = betterproto.message_field(
|
1777
|
+
25, group="literal_type"
|
1778
|
+
)
|
1779
|
+
map: "ExpressionLiteralMap" = betterproto.message_field(26, group="literal_type")
|
1780
|
+
timestamp_tz: int = betterproto.int64_field(27, group="literal_type")
|
1781
|
+
"""
|
1782
|
+
Timestamp in units of microseconds since the UNIX epoch.
|
1783
|
+
Deprecated in favor of `precision_timestamp_tz`
|
1784
|
+
"""
|
1785
|
+
|
1786
|
+
uuid: bytes = betterproto.bytes_field(28, group="literal_type")
|
1787
|
+
null: "Type" = betterproto.message_field(29, group="literal_type")
|
1788
|
+
list: "ExpressionLiteralList" = betterproto.message_field(30, group="literal_type")
|
1789
|
+
empty_list: "TypeList" = betterproto.message_field(31, group="literal_type")
|
1790
|
+
empty_map: "TypeMap" = betterproto.message_field(32, group="literal_type")
|
1791
|
+
user_defined: "ExpressionLiteralUserDefined" = betterproto.message_field(
|
1792
|
+
33, group="literal_type"
|
1793
|
+
)
|
1794
|
+
nullable: bool = betterproto.bool_field(50)
|
1795
|
+
"""
|
1796
|
+
Whether the literal_type above should be treated as a nullable type.
|
1797
|
+
Applies to all members of the literal_type oneof EXCEPT:
|
1798
|
+
* Type null (must be nullable by definition)
|
1799
|
+
* Type.List empty_list (use Type.List::nullability)
|
1800
|
+
* Type.Map empty_map (use Type.Map::nullability)
|
1801
|
+
"""
|
1802
|
+
|
1803
|
+
type_variation_reference: int = betterproto.uint32_field(51)
|
1804
|
+
"""
|
1805
|
+
optionally points to a type_variation_anchor defined in this plan.
|
1806
|
+
Applies to all members of union other than the Typed null (which should
|
1807
|
+
directly declare the type variation).
|
1808
|
+
"""
|
1809
|
+
|
1810
|
+
def __post_init__(self) -> None:
|
1811
|
+
super().__post_init__()
|
1812
|
+
if self.is_set("timestamp"):
|
1813
|
+
warnings.warn(
|
1814
|
+
"ExpressionLiteral.timestamp is deprecated", DeprecationWarning
|
1815
|
+
)
|
1816
|
+
if self.is_set("timestamp_tz"):
|
1817
|
+
warnings.warn(
|
1818
|
+
"ExpressionLiteral.timestamp_tz is deprecated", DeprecationWarning
|
1819
|
+
)
|
1820
|
+
|
1821
|
+
|
1822
|
+
@dataclass(eq=False, repr=False)
|
1823
|
+
class ExpressionLiteralVarChar(betterproto.Message):
|
1824
|
+
value: str = betterproto.string_field(1)
|
1825
|
+
length: int = betterproto.uint32_field(2)
|
1826
|
+
|
1827
|
+
|
1828
|
+
@dataclass(eq=False, repr=False)
|
1829
|
+
class ExpressionLiteralDecimal(betterproto.Message):
|
1830
|
+
value: bytes = betterproto.bytes_field(1)
|
1831
|
+
"""
|
1832
|
+
little-endian twos-complement integer representation of complete value
|
1833
|
+
(ignoring precision) Always 16 bytes in length
|
1834
|
+
"""
|
1835
|
+
|
1836
|
+
precision: int = betterproto.int32_field(2)
|
1837
|
+
"""
|
1838
|
+
The maximum number of digits allowed in the value.
|
1839
|
+
the maximum precision is 38.
|
1840
|
+
"""
|
1841
|
+
|
1842
|
+
scale: int = betterproto.int32_field(3)
|
1843
|
+
"""declared scale of decimal literal"""
|
1844
|
+
|
1845
|
+
|
1846
|
+
@dataclass(eq=False, repr=False)
|
1847
|
+
class ExpressionLiteralPrecisionTimestamp(betterproto.Message):
|
1848
|
+
precision: int = betterproto.int32_field(1)
|
1849
|
+
"""
|
1850
|
+
Sub-second precision, 0 means the value given is in seconds, 3 is milliseconds, 6 microseconds, 9 is nanoseconds
|
1851
|
+
"""
|
1852
|
+
|
1853
|
+
value: int = betterproto.int64_field(2)
|
1854
|
+
"""
|
1855
|
+
Time passed since 1970-01-01 00:00:00.000000 in UTC for PrecisionTimestampTZ and unspecified timezone for PrecisionTimestamp
|
1856
|
+
"""
|
1857
|
+
|
1858
|
+
|
1859
|
+
@dataclass(eq=False, repr=False)
|
1860
|
+
class ExpressionLiteralMap(betterproto.Message):
|
1861
|
+
key_values: List["ExpressionLiteralMapKeyValue"] = betterproto.message_field(1)
|
1862
|
+
|
1863
|
+
|
1864
|
+
@dataclass(eq=False, repr=False)
|
1865
|
+
class ExpressionLiteralMapKeyValue(betterproto.Message):
|
1866
|
+
key: "ExpressionLiteral" = betterproto.message_field(1)
|
1867
|
+
value: "ExpressionLiteral" = betterproto.message_field(2)
|
1868
|
+
|
1869
|
+
|
1870
|
+
@dataclass(eq=False, repr=False)
|
1871
|
+
class ExpressionLiteralIntervalYearToMonth(betterproto.Message):
|
1872
|
+
years: int = betterproto.int32_field(1)
|
1873
|
+
months: int = betterproto.int32_field(2)
|
1874
|
+
|
1875
|
+
|
1876
|
+
@dataclass(eq=False, repr=False)
|
1877
|
+
class ExpressionLiteralIntervalDayToSecond(betterproto.Message):
|
1878
|
+
days: int = betterproto.int32_field(1)
|
1879
|
+
seconds: int = betterproto.int32_field(2)
|
1880
|
+
microseconds: int = betterproto.int32_field(3, group="precision_mode")
|
1881
|
+
precision: int = betterproto.int32_field(4, group="precision_mode")
|
1882
|
+
"""
|
1883
|
+
Sub-second precision, 0 means the value given is in seconds, 3 is milliseconds, 6 microseconds, 9 is nanoseconds. Should be used with subseconds below.
|
1884
|
+
"""
|
1885
|
+
|
1886
|
+
subseconds: int = betterproto.int64_field(5)
|
1887
|
+
"""
|
1888
|
+
the number of fractional seconds using 1e(-precision) units. Should only be used with precision field, not microseconds.
|
1889
|
+
"""
|
1890
|
+
|
1891
|
+
def __post_init__(self) -> None:
|
1892
|
+
super().__post_init__()
|
1893
|
+
if self.is_set("microseconds"):
|
1894
|
+
warnings.warn(
|
1895
|
+
"ExpressionLiteralIntervalDayToSecond.microseconds is deprecated",
|
1896
|
+
DeprecationWarning,
|
1897
|
+
)
|
1898
|
+
|
1899
|
+
|
1900
|
+
@dataclass(eq=False, repr=False)
|
1901
|
+
class ExpressionLiteralIntervalCompound(betterproto.Message):
|
1902
|
+
interval_year_to_month: "ExpressionLiteralIntervalYearToMonth" = (
|
1903
|
+
betterproto.message_field(1)
|
1904
|
+
)
|
1905
|
+
interval_day_to_second: "ExpressionLiteralIntervalDayToSecond" = (
|
1906
|
+
betterproto.message_field(2)
|
1907
|
+
)
|
1908
|
+
|
1909
|
+
|
1910
|
+
@dataclass(eq=False, repr=False)
|
1911
|
+
class ExpressionLiteralStruct(betterproto.Message):
|
1912
|
+
fields: List["ExpressionLiteral"] = betterproto.message_field(1)
|
1913
|
+
"""A possibly heterogeneously typed list of literals"""
|
1914
|
+
|
1915
|
+
|
1916
|
+
@dataclass(eq=False, repr=False)
|
1917
|
+
class ExpressionLiteralList(betterproto.Message):
|
1918
|
+
values: List["ExpressionLiteral"] = betterproto.message_field(1)
|
1919
|
+
"""A homogeneously typed list of literals"""
|
1920
|
+
|
1921
|
+
|
1922
|
+
@dataclass(eq=False, repr=False)
|
1923
|
+
class ExpressionLiteralUserDefined(betterproto.Message):
|
1924
|
+
type_reference: int = betterproto.uint32_field(1)
|
1925
|
+
"""points to a type_anchor defined in this plan"""
|
1926
|
+
|
1927
|
+
type_parameters: List["TypeParameter"] = betterproto.message_field(3)
|
1928
|
+
"""
|
1929
|
+
The parameters to be bound to the type class, if the type class is
|
1930
|
+
parameterizable.
|
1931
|
+
"""
|
1932
|
+
|
1933
|
+
value: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(
|
1934
|
+
2, group="val"
|
1935
|
+
)
|
1936
|
+
"""
|
1937
|
+
the value of the literal, serialized using some type-specific protobuf message
|
1938
|
+
"""
|
1939
|
+
|
1940
|
+
struct: "ExpressionLiteralStruct" = betterproto.message_field(4, group="val")
|
1941
|
+
"""
|
1942
|
+
the value of the literal, serialized using the structure definition in its declaration
|
1943
|
+
"""
|
1944
|
+
|
1945
|
+
|
1946
|
+
@dataclass(eq=False, repr=False)
|
1947
|
+
class ExpressionNested(betterproto.Message):
|
1948
|
+
"""Expression to dynamically construct nested types."""
|
1949
|
+
|
1950
|
+
nullable: bool = betterproto.bool_field(1)
|
1951
|
+
"""Whether the returned nested type is nullable."""
|
1952
|
+
|
1953
|
+
type_variation_reference: int = betterproto.uint32_field(2)
|
1954
|
+
"""
|
1955
|
+
Optionally points to a type_variation_anchor defined in this plan for
|
1956
|
+
the returned nested type.
|
1957
|
+
"""
|
1958
|
+
|
1959
|
+
struct: "ExpressionNestedStruct" = betterproto.message_field(3, group="nested_type")
|
1960
|
+
list: "ExpressionNestedList" = betterproto.message_field(4, group="nested_type")
|
1961
|
+
map: "ExpressionNestedMap" = betterproto.message_field(5, group="nested_type")
|
1962
|
+
|
1963
|
+
|
1964
|
+
@dataclass(eq=False, repr=False)
|
1965
|
+
class ExpressionNestedMap(betterproto.Message):
|
1966
|
+
key_values: List["ExpressionNestedMapKeyValue"] = betterproto.message_field(1)
|
1967
|
+
"""
|
1968
|
+
One or more key-value pairs. To specify an empty map, use
|
1969
|
+
Literal.empty_map (otherwise type information would be missing).
|
1970
|
+
"""
|
1971
|
+
|
1972
|
+
|
1973
|
+
@dataclass(eq=False, repr=False)
|
1974
|
+
class ExpressionNestedMapKeyValue(betterproto.Message):
|
1975
|
+
key: "Expression" = betterproto.message_field(1)
|
1976
|
+
"""Mandatory key/value expressions."""
|
1977
|
+
|
1978
|
+
value: "Expression" = betterproto.message_field(2)
|
1979
|
+
|
1980
|
+
|
1981
|
+
@dataclass(eq=False, repr=False)
|
1982
|
+
class ExpressionNestedStruct(betterproto.Message):
|
1983
|
+
fields: List["Expression"] = betterproto.message_field(1)
|
1984
|
+
"""
|
1985
|
+
Zero or more possibly heterogeneously-typed list of expressions that
|
1986
|
+
form the struct fields.
|
1987
|
+
"""
|
1988
|
+
|
1989
|
+
|
1990
|
+
@dataclass(eq=False, repr=False)
|
1991
|
+
class ExpressionNestedList(betterproto.Message):
|
1992
|
+
values: List["Expression"] = betterproto.message_field(1)
|
1993
|
+
"""
|
1994
|
+
A homogeneously-typed list of one or more expressions that form the
|
1995
|
+
list entries. To specify an empty list, use Literal.empty_list
|
1996
|
+
(otherwise type information would be missing).
|
1997
|
+
"""
|
1998
|
+
|
1999
|
+
|
2000
|
+
@dataclass(eq=False, repr=False)
|
2001
|
+
class ExpressionScalarFunction(betterproto.Message):
|
2002
|
+
"""A scalar function call."""
|
2003
|
+
|
2004
|
+
function_reference: int = betterproto.uint32_field(1)
|
2005
|
+
"""
|
2006
|
+
Points to a function_anchor defined in this plan, which must refer
|
2007
|
+
to a scalar function in the associated YAML file. Required; avoid
|
2008
|
+
using anchor/reference zero.
|
2009
|
+
"""
|
2010
|
+
|
2011
|
+
arguments: List["FunctionArgument"] = betterproto.message_field(4)
|
2012
|
+
"""
|
2013
|
+
The arguments to be bound to the function. This must have exactly the
|
2014
|
+
number of arguments specified in the function definition, and the
|
2015
|
+
argument types must also match exactly:
|
2016
|
+
|
2017
|
+
- Value arguments must be bound using FunctionArgument.value, and
|
2018
|
+
the expression in that must yield a value of a type that a function
|
2019
|
+
overload is defined for.
|
2020
|
+
- Type arguments must be bound using FunctionArgument.type.
|
2021
|
+
- Enum arguments must be bound using FunctionArgument.enum
|
2022
|
+
followed by Enum.specified, with a string that case-insensitively
|
2023
|
+
matches one of the allowed options.
|
2024
|
+
"""
|
2025
|
+
|
2026
|
+
options: List["FunctionOption"] = betterproto.message_field(5)
|
2027
|
+
"""
|
2028
|
+
Options to specify behavior for corner cases, or leave behavior
|
2029
|
+
unspecified if the consumer does not need specific behavior in these
|
2030
|
+
cases.
|
2031
|
+
"""
|
2032
|
+
|
2033
|
+
output_type: "Type" = betterproto.message_field(3)
|
2034
|
+
"""
|
2035
|
+
Must be set to the return type of the function, exactly as derived
|
2036
|
+
using the declaration in the extension.
|
2037
|
+
"""
|
2038
|
+
|
2039
|
+
args: List["Expression"] = betterproto.message_field(2)
|
2040
|
+
"""Deprecated; use arguments instead."""
|
2041
|
+
|
2042
|
+
def __post_init__(self) -> None:
|
2043
|
+
super().__post_init__()
|
2044
|
+
if self.is_set("args"):
|
2045
|
+
warnings.warn(
|
2046
|
+
"ExpressionScalarFunction.args is deprecated", DeprecationWarning
|
2047
|
+
)
|
2048
|
+
|
2049
|
+
|
2050
|
+
@dataclass(eq=False, repr=False)
|
2051
|
+
class ExpressionWindowFunction(betterproto.Message):
|
2052
|
+
"""A window function call."""
|
2053
|
+
|
2054
|
+
function_reference: int = betterproto.uint32_field(1)
|
2055
|
+
"""
|
2056
|
+
Points to a function_anchor defined in this plan. The function must be:
|
2057
|
+
- a window function
|
2058
|
+
- an aggregate function
|
2059
|
+
|
2060
|
+
An aggregate function referenced here should be treated as a window
|
2061
|
+
function with Window Type STREAMING
|
2062
|
+
|
2063
|
+
Required; 0 is considered to be a valid anchor/reference.
|
2064
|
+
"""
|
2065
|
+
|
2066
|
+
arguments: List["FunctionArgument"] = betterproto.message_field(9)
|
2067
|
+
"""
|
2068
|
+
The arguments to be bound to the function. This must have exactly the
|
2069
|
+
number of arguments specified in the function definition, and the
|
2070
|
+
argument types must also match exactly:
|
2071
|
+
|
2072
|
+
- Value arguments must be bound using FunctionArgument.value, and
|
2073
|
+
the expression in that must yield a value of a type that a function
|
2074
|
+
overload is defined for.
|
2075
|
+
- Type arguments must be bound using FunctionArgument.type, and a
|
2076
|
+
function overload must be defined for that type.
|
2077
|
+
- Enum arguments must be bound using FunctionArgument.enum
|
2078
|
+
followed by Enum.specified, with a string that case-insensitively
|
2079
|
+
matches one of the allowed options.
|
2080
|
+
"""
|
2081
|
+
|
2082
|
+
options: List["FunctionOption"] = betterproto.message_field(11)
|
2083
|
+
"""
|
2084
|
+
Options to specify behavior for corner cases, or leave behavior
|
2085
|
+
unspecified if the consumer does not need specific behavior in these
|
2086
|
+
cases.
|
2087
|
+
"""
|
2088
|
+
|
2089
|
+
output_type: "Type" = betterproto.message_field(7)
|
2090
|
+
"""
|
2091
|
+
Must be set to the return type of the function, exactly as derived
|
2092
|
+
using the declaration in the extension.
|
2093
|
+
"""
|
2094
|
+
|
2095
|
+
phase: "AggregationPhase" = betterproto.enum_field(6)
|
2096
|
+
"""
|
2097
|
+
Describes which part of the window function to perform within the
|
2098
|
+
context of distributed algorithms. Required. Must be set to
|
2099
|
+
INITIAL_TO_RESULT for window functions that are not decomposable.
|
2100
|
+
"""
|
2101
|
+
|
2102
|
+
sorts: List["SortField"] = betterproto.message_field(3)
|
2103
|
+
"""
|
2104
|
+
If specified, the records that are part of the window defined by
|
2105
|
+
upper_bound and lower_bound are ordered according to this list
|
2106
|
+
before they are aggregated. The first sort field has the highest
|
2107
|
+
priority; only if a sort field determines two records to be equivalent
|
2108
|
+
is the next field queried. This field is optional, and is only allowed
|
2109
|
+
if the window function is defined to support sorting.
|
2110
|
+
"""
|
2111
|
+
|
2112
|
+
invocation: "AggregateFunctionAggregationInvocation" = betterproto.enum_field(10)
|
2113
|
+
"""
|
2114
|
+
Specifies whether equivalent records are merged before being aggregated.
|
2115
|
+
Optional, defaults to AGGREGATION_INVOCATION_ALL.
|
2116
|
+
"""
|
2117
|
+
|
2118
|
+
partitions: List["Expression"] = betterproto.message_field(2)
|
2119
|
+
"""
|
2120
|
+
When one or more partition expressions are specified, two records are
|
2121
|
+
considered to be in the same partition if and only if these expressions
|
2122
|
+
yield an equal record of values for both. When computing the window
|
2123
|
+
function, only the subset of records within the bounds that are also in
|
2124
|
+
the same partition as the current record are aggregated.
|
2125
|
+
"""
|
2126
|
+
|
2127
|
+
bounds_type: "ExpressionWindowFunctionBoundsType" = betterproto.enum_field(12)
|
2128
|
+
"""Defines the bounds type: ROWS, RANGE"""
|
2129
|
+
|
2130
|
+
lower_bound: "ExpressionWindowFunctionBound" = betterproto.message_field(5)
|
2131
|
+
"""
|
2132
|
+
Defines the record relative to the current record from which the window
|
2133
|
+
extends. The bound is inclusive. If the lower bound indexes a record
|
2134
|
+
greater than the upper bound, TODO (null range/no records passed?
|
2135
|
+
wrapping around as if lower/upper were swapped? error? null?).
|
2136
|
+
Optional; defaults to the start of the partition.
|
2137
|
+
"""
|
2138
|
+
|
2139
|
+
upper_bound: "ExpressionWindowFunctionBound" = betterproto.message_field(4)
|
2140
|
+
"""
|
2141
|
+
Defines the record relative to the current record up to which the window
|
2142
|
+
extends. The bound is inclusive. If the upper bound indexes a record
|
2143
|
+
less than the lower bound, TODO (null range/no records passed?
|
2144
|
+
wrapping around as if lower/upper were swapped? error? null?).
|
2145
|
+
Optional; defaults to the end of the partition.
|
2146
|
+
"""
|
2147
|
+
|
2148
|
+
args: List["Expression"] = betterproto.message_field(8)
|
2149
|
+
"""Deprecated; use arguments instead."""
|
2150
|
+
|
2151
|
+
def __post_init__(self) -> None:
|
2152
|
+
super().__post_init__()
|
2153
|
+
if self.is_set("args"):
|
2154
|
+
warnings.warn(
|
2155
|
+
"ExpressionWindowFunction.args is deprecated", DeprecationWarning
|
2156
|
+
)
|
2157
|
+
|
2158
|
+
|
2159
|
+
@dataclass(eq=False, repr=False)
|
2160
|
+
class ExpressionWindowFunctionBound(betterproto.Message):
|
2161
|
+
"""
|
2162
|
+
Defines one of the two boundaries for the window of a window function.
|
2163
|
+
"""
|
2164
|
+
|
2165
|
+
preceding: "ExpressionWindowFunctionBoundPreceding" = betterproto.message_field(
|
2166
|
+
1, group="kind"
|
2167
|
+
)
|
2168
|
+
"""The bound extends some number of records behind the current record."""
|
2169
|
+
|
2170
|
+
following: "ExpressionWindowFunctionBoundFollowing" = betterproto.message_field(
|
2171
|
+
2, group="kind"
|
2172
|
+
)
|
2173
|
+
"""
|
2174
|
+
The bound extends some number of records ahead of the current
|
2175
|
+
record.
|
2176
|
+
"""
|
2177
|
+
|
2178
|
+
current_row: "ExpressionWindowFunctionBoundCurrentRow" = betterproto.message_field(
|
2179
|
+
3, group="kind"
|
2180
|
+
)
|
2181
|
+
"""The bound extends to the current record."""
|
2182
|
+
|
2183
|
+
unbounded: "ExpressionWindowFunctionBoundUnbounded" = betterproto.message_field(
|
2184
|
+
4, group="kind"
|
2185
|
+
)
|
2186
|
+
"""
|
2187
|
+
The bound extends to the start of the partition or the end of the
|
2188
|
+
partition, depending on whether this represents the upper or lower
|
2189
|
+
bound.
|
2190
|
+
"""
|
2191
|
+
|
2192
|
+
|
2193
|
+
@dataclass(eq=False, repr=False)
|
2194
|
+
class ExpressionWindowFunctionBoundPreceding(betterproto.Message):
|
2195
|
+
"""
|
2196
|
+
Defines that the bound extends this far back from the current record.
|
2197
|
+
"""
|
2198
|
+
|
2199
|
+
offset: int = betterproto.int64_field(1)
|
2200
|
+
"""
|
2201
|
+
A strictly positive integer specifying the number of records that
|
2202
|
+
the window extends back from the current record. Required. Use
|
2203
|
+
CurrentRow for offset zero and Following for negative offsets.
|
2204
|
+
"""
|
2205
|
+
|
2206
|
+
|
2207
|
+
@dataclass(eq=False, repr=False)
|
2208
|
+
class ExpressionWindowFunctionBoundFollowing(betterproto.Message):
|
2209
|
+
"""Defines that the bound extends this far ahead of the current record."""
|
2210
|
+
|
2211
|
+
offset: int = betterproto.int64_field(1)
|
2212
|
+
"""
|
2213
|
+
A strictly positive integer specifying the number of records that
|
2214
|
+
the window extends ahead of the current record. Required. Use
|
2215
|
+
CurrentRow for offset zero and Preceding for negative offsets.
|
2216
|
+
"""
|
2217
|
+
|
2218
|
+
|
2219
|
+
@dataclass(eq=False, repr=False)
|
2220
|
+
class ExpressionWindowFunctionBoundCurrentRow(betterproto.Message):
|
2221
|
+
"""Defines that the bound extends to or from the current record."""
|
2222
|
+
|
2223
|
+
pass
|
2224
|
+
|
2225
|
+
|
2226
|
+
@dataclass(eq=False, repr=False)
|
2227
|
+
class ExpressionWindowFunctionBoundUnbounded(betterproto.Message):
|
2228
|
+
"""
|
2229
|
+
Defines an "unbounded bound": for lower bounds this means the start
|
2230
|
+
of the partition, and for upper bounds this means the end of the
|
2231
|
+
partition.
|
2232
|
+
"""
|
2233
|
+
|
2234
|
+
pass
|
2235
|
+
|
2236
|
+
|
2237
|
+
@dataclass(eq=False, repr=False)
|
2238
|
+
class ExpressionIfThen(betterproto.Message):
|
2239
|
+
ifs: List["ExpressionIfThenIfClause"] = betterproto.message_field(1)
|
2240
|
+
"""A list of one or more IfClauses"""
|
2241
|
+
|
2242
|
+
else_: "Expression" = betterproto.message_field(2)
|
2243
|
+
"""The returned Expression if no IfClauses are satisified"""
|
2244
|
+
|
2245
|
+
|
2246
|
+
@dataclass(eq=False, repr=False)
|
2247
|
+
class ExpressionIfThenIfClause(betterproto.Message):
|
2248
|
+
if_: "Expression" = betterproto.message_field(1)
|
2249
|
+
then: "Expression" = betterproto.message_field(2)
|
2250
|
+
|
2251
|
+
|
2252
|
+
@dataclass(eq=False, repr=False)
|
2253
|
+
class ExpressionCast(betterproto.Message):
|
2254
|
+
type: "Type" = betterproto.message_field(1)
|
2255
|
+
input: "Expression" = betterproto.message_field(2)
|
2256
|
+
failure_behavior: "ExpressionCastFailureBehavior" = betterproto.enum_field(3)
|
2257
|
+
|
2258
|
+
|
2259
|
+
@dataclass(eq=False, repr=False)
|
2260
|
+
class ExpressionSwitchExpression(betterproto.Message):
|
2261
|
+
match: "Expression" = betterproto.message_field(3)
|
2262
|
+
ifs: List["ExpressionSwitchExpressionIfValue"] = betterproto.message_field(1)
|
2263
|
+
else_: "Expression" = betterproto.message_field(2)
|
2264
|
+
|
2265
|
+
|
2266
|
+
@dataclass(eq=False, repr=False)
|
2267
|
+
class ExpressionSwitchExpressionIfValue(betterproto.Message):
|
2268
|
+
if_: "ExpressionLiteral" = betterproto.message_field(1)
|
2269
|
+
then: "Expression" = betterproto.message_field(2)
|
2270
|
+
|
2271
|
+
|
2272
|
+
@dataclass(eq=False, repr=False)
|
2273
|
+
class ExpressionSingularOrList(betterproto.Message):
|
2274
|
+
value: "Expression" = betterproto.message_field(1)
|
2275
|
+
options: List["Expression"] = betterproto.message_field(2)
|
2276
|
+
|
2277
|
+
|
2278
|
+
@dataclass(eq=False, repr=False)
|
2279
|
+
class ExpressionMultiOrList(betterproto.Message):
|
2280
|
+
value: List["Expression"] = betterproto.message_field(1)
|
2281
|
+
options: List["ExpressionMultiOrListRecord"] = betterproto.message_field(2)
|
2282
|
+
|
2283
|
+
|
2284
|
+
@dataclass(eq=False, repr=False)
|
2285
|
+
class ExpressionMultiOrListRecord(betterproto.Message):
|
2286
|
+
fields: List["Expression"] = betterproto.message_field(1)
|
2287
|
+
|
2288
|
+
|
2289
|
+
@dataclass(eq=False, repr=False)
|
2290
|
+
class ExpressionEmbeddedFunction(betterproto.Message):
|
2291
|
+
arguments: List["Expression"] = betterproto.message_field(1)
|
2292
|
+
output_type: "Type" = betterproto.message_field(2)
|
2293
|
+
python_pickle_function: "ExpressionEmbeddedFunctionPythonPickleFunction" = (
|
2294
|
+
betterproto.message_field(3, group="kind")
|
2295
|
+
)
|
2296
|
+
web_assembly_function: "ExpressionEmbeddedFunctionWebAssemblyFunction" = (
|
2297
|
+
betterproto.message_field(4, group="kind")
|
2298
|
+
)
|
2299
|
+
|
2300
|
+
|
2301
|
+
@dataclass(eq=False, repr=False)
|
2302
|
+
class ExpressionEmbeddedFunctionPythonPickleFunction(betterproto.Message):
|
2303
|
+
function: bytes = betterproto.bytes_field(1)
|
2304
|
+
prerequisite: List[str] = betterproto.string_field(2)
|
2305
|
+
|
2306
|
+
|
2307
|
+
@dataclass(eq=False, repr=False)
|
2308
|
+
class ExpressionEmbeddedFunctionWebAssemblyFunction(betterproto.Message):
|
2309
|
+
script: bytes = betterproto.bytes_field(1)
|
2310
|
+
prerequisite: List[str] = betterproto.string_field(2)
|
2311
|
+
|
2312
|
+
|
2313
|
+
@dataclass(eq=False, repr=False)
|
2314
|
+
class ExpressionReferenceSegment(betterproto.Message):
|
2315
|
+
"""
|
2316
|
+
A way to reference the inner property of a complex record. Can reference
|
2317
|
+
either a map key by literal, a struct field by the ordinal position of
|
2318
|
+
the desired field or a particular element in an array. Supports
|
2319
|
+
expressions that would roughly translate to something similar to:
|
2320
|
+
a.b[2].c['my_map_key'].x where a,b,c and x are struct field references
|
2321
|
+
(ordinalized in the internal representation here), [2] is a list offset
|
2322
|
+
and ['my_map_key'] is a reference into a map field.
|
2323
|
+
"""
|
2324
|
+
|
2325
|
+
map_key: "ExpressionReferenceSegmentMapKey" = betterproto.message_field(
|
2326
|
+
1, group="reference_type"
|
2327
|
+
)
|
2328
|
+
struct_field: "ExpressionReferenceSegmentStructField" = betterproto.message_field(
|
2329
|
+
2, group="reference_type"
|
2330
|
+
)
|
2331
|
+
list_element: "ExpressionReferenceSegmentListElement" = betterproto.message_field(
|
2332
|
+
3, group="reference_type"
|
2333
|
+
)
|
2334
|
+
|
2335
|
+
|
2336
|
+
@dataclass(eq=False, repr=False)
|
2337
|
+
class ExpressionReferenceSegmentMapKey(betterproto.Message):
|
2338
|
+
map_key: "ExpressionLiteral" = betterproto.message_field(1)
|
2339
|
+
"""literal based reference to specific possible value in map."""
|
2340
|
+
|
2341
|
+
child: "ExpressionReferenceSegment" = betterproto.message_field(2)
|
2342
|
+
"""Optional child segment"""
|
2343
|
+
|
2344
|
+
|
2345
|
+
@dataclass(eq=False, repr=False)
|
2346
|
+
class ExpressionReferenceSegmentStructField(betterproto.Message):
|
2347
|
+
field: int = betterproto.int32_field(1)
|
2348
|
+
"""zero-indexed ordinal position of field in struct"""
|
2349
|
+
|
2350
|
+
child: "ExpressionReferenceSegment" = betterproto.message_field(2)
|
2351
|
+
"""Optional child segment"""
|
2352
|
+
|
2353
|
+
|
2354
|
+
@dataclass(eq=False, repr=False)
|
2355
|
+
class ExpressionReferenceSegmentListElement(betterproto.Message):
|
2356
|
+
offset: int = betterproto.int32_field(1)
|
2357
|
+
"""zero-indexed ordinal position of element in list"""
|
2358
|
+
|
2359
|
+
child: "ExpressionReferenceSegment" = betterproto.message_field(2)
|
2360
|
+
"""Optional child segment"""
|
2361
|
+
|
2362
|
+
|
2363
|
+
@dataclass(eq=False, repr=False)
|
2364
|
+
class ExpressionMaskExpression(betterproto.Message):
|
2365
|
+
"""
|
2366
|
+
A reference that takes an existing subtype and selectively removes fields
|
2367
|
+
from it. For example, one might initially have an inner struct with 100
|
2368
|
+
fields but a a particular operation only needs to interact with only 2 of
|
2369
|
+
those 100 fields. In this situation, one would use a mask expression to
|
2370
|
+
eliminate the 98 fields that are not relevant to the rest of the operation
|
2371
|
+
pipeline.
|
2372
|
+
|
2373
|
+
Note that this does not fundamentally alter the structure of data beyond
|
2374
|
+
the elimination of unnecessary elements.
|
2375
|
+
"""
|
2376
|
+
|
2377
|
+
select: "ExpressionMaskExpressionStructSelect" = betterproto.message_field(1)
|
2378
|
+
maintain_singular_struct: bool = betterproto.bool_field(2)
|
2379
|
+
|
2380
|
+
|
2381
|
+
@dataclass(eq=False, repr=False)
|
2382
|
+
class ExpressionMaskExpressionSelect(betterproto.Message):
|
2383
|
+
struct: "ExpressionMaskExpressionStructSelect" = betterproto.message_field(
|
2384
|
+
1, group="type"
|
2385
|
+
)
|
2386
|
+
list: "ExpressionMaskExpressionListSelect" = betterproto.message_field(
|
2387
|
+
2, group="type"
|
2388
|
+
)
|
2389
|
+
map: "ExpressionMaskExpressionMapSelect" = betterproto.message_field(
|
2390
|
+
3, group="type"
|
2391
|
+
)
|
2392
|
+
|
2393
|
+
|
2394
|
+
@dataclass(eq=False, repr=False)
|
2395
|
+
class ExpressionMaskExpressionStructSelect(betterproto.Message):
|
2396
|
+
struct_items: List[
|
2397
|
+
"ExpressionMaskExpressionStructItem"
|
2398
|
+
] = betterproto.message_field(1)
|
2399
|
+
|
2400
|
+
|
2401
|
+
@dataclass(eq=False, repr=False)
|
2402
|
+
class ExpressionMaskExpressionStructItem(betterproto.Message):
|
2403
|
+
field: int = betterproto.int32_field(1)
|
2404
|
+
child: "ExpressionMaskExpressionSelect" = betterproto.message_field(2)
|
2405
|
+
|
2406
|
+
|
2407
|
+
@dataclass(eq=False, repr=False)
|
2408
|
+
class ExpressionMaskExpressionListSelect(betterproto.Message):
|
2409
|
+
selection: List[
|
2410
|
+
"ExpressionMaskExpressionListSelectListSelectItem"
|
2411
|
+
] = betterproto.message_field(1)
|
2412
|
+
child: "ExpressionMaskExpressionSelect" = betterproto.message_field(2)
|
2413
|
+
|
2414
|
+
|
2415
|
+
@dataclass(eq=False, repr=False)
|
2416
|
+
class ExpressionMaskExpressionListSelectListSelectItem(betterproto.Message):
|
2417
|
+
item: "ExpressionMaskExpressionListSelectListSelectItemListElement" = (
|
2418
|
+
betterproto.message_field(1, group="type")
|
2419
|
+
)
|
2420
|
+
slice: "ExpressionMaskExpressionListSelectListSelectItemListSlice" = (
|
2421
|
+
betterproto.message_field(2, group="type")
|
2422
|
+
)
|
2423
|
+
|
2424
|
+
|
2425
|
+
@dataclass(eq=False, repr=False)
|
2426
|
+
class ExpressionMaskExpressionListSelectListSelectItemListElement(betterproto.Message):
|
2427
|
+
field: int = betterproto.int32_field(1)
|
2428
|
+
|
2429
|
+
|
2430
|
+
@dataclass(eq=False, repr=False)
|
2431
|
+
class ExpressionMaskExpressionListSelectListSelectItemListSlice(betterproto.Message):
|
2432
|
+
start: int = betterproto.int32_field(1)
|
2433
|
+
end: int = betterproto.int32_field(2)
|
2434
|
+
|
2435
|
+
|
2436
|
+
@dataclass(eq=False, repr=False)
|
2437
|
+
class ExpressionMaskExpressionMapSelect(betterproto.Message):
|
2438
|
+
key: "ExpressionMaskExpressionMapSelectMapKey" = betterproto.message_field(
|
2439
|
+
1, group="select"
|
2440
|
+
)
|
2441
|
+
expression: "ExpressionMaskExpressionMapSelectMapKeyExpression" = (
|
2442
|
+
betterproto.message_field(2, group="select")
|
2443
|
+
)
|
2444
|
+
child: "ExpressionMaskExpressionSelect" = betterproto.message_field(3)
|
2445
|
+
|
2446
|
+
|
2447
|
+
@dataclass(eq=False, repr=False)
|
2448
|
+
class ExpressionMaskExpressionMapSelectMapKey(betterproto.Message):
|
2449
|
+
map_key: str = betterproto.string_field(1)
|
2450
|
+
|
2451
|
+
|
2452
|
+
@dataclass(eq=False, repr=False)
|
2453
|
+
class ExpressionMaskExpressionMapSelectMapKeyExpression(betterproto.Message):
|
2454
|
+
map_key_expression: str = betterproto.string_field(1)
|
2455
|
+
|
2456
|
+
|
2457
|
+
@dataclass(eq=False, repr=False)
|
2458
|
+
class ExpressionFieldReference(betterproto.Message):
|
2459
|
+
"""
|
2460
|
+
A reference to an inner part of a complex object. Can reference reference a
|
2461
|
+
single element or a masked version of elements
|
2462
|
+
"""
|
2463
|
+
|
2464
|
+
direct_reference: "ExpressionReferenceSegment" = betterproto.message_field(
|
2465
|
+
1, group="reference_type"
|
2466
|
+
)
|
2467
|
+
masked_reference: "ExpressionMaskExpression" = betterproto.message_field(
|
2468
|
+
2, group="reference_type"
|
2469
|
+
)
|
2470
|
+
expression: "Expression" = betterproto.message_field(3, group="root_type")
|
2471
|
+
root_reference: "ExpressionFieldReferenceRootReference" = betterproto.message_field(
|
2472
|
+
4, group="root_type"
|
2473
|
+
)
|
2474
|
+
outer_reference: "ExpressionFieldReferenceOuterReference" = (
|
2475
|
+
betterproto.message_field(5, group="root_type")
|
2476
|
+
)
|
2477
|
+
|
2478
|
+
|
2479
|
+
@dataclass(eq=False, repr=False)
|
2480
|
+
class ExpressionFieldReferenceRootReference(betterproto.Message):
|
2481
|
+
"""
|
2482
|
+
Singleton that expresses this FieldReference is rooted off the root
|
2483
|
+
incoming record type
|
2484
|
+
"""
|
2485
|
+
|
2486
|
+
pass
|
2487
|
+
|
2488
|
+
|
2489
|
+
@dataclass(eq=False, repr=False)
|
2490
|
+
class ExpressionFieldReferenceOuterReference(betterproto.Message):
|
2491
|
+
"""A root reference for the outer relation's subquery"""
|
2492
|
+
|
2493
|
+
steps_out: int = betterproto.uint32_field(1)
|
2494
|
+
"""
|
2495
|
+
number of subquery boundaries to traverse up for this field's reference
|
2496
|
+
|
2497
|
+
This value must be >= 1
|
2498
|
+
"""
|
2499
|
+
|
2500
|
+
|
2501
|
+
@dataclass(eq=False, repr=False)
|
2502
|
+
class ExpressionSubquery(betterproto.Message):
|
2503
|
+
"""Subquery relation expression"""
|
2504
|
+
|
2505
|
+
scalar: "ExpressionSubqueryScalar" = betterproto.message_field(
|
2506
|
+
1, group="subquery_type"
|
2507
|
+
)
|
2508
|
+
"""Scalar subquery"""
|
2509
|
+
|
2510
|
+
in_predicate: "ExpressionSubqueryInPredicate" = betterproto.message_field(
|
2511
|
+
2, group="subquery_type"
|
2512
|
+
)
|
2513
|
+
"""x IN y predicate"""
|
2514
|
+
|
2515
|
+
set_predicate: "ExpressionSubquerySetPredicate" = betterproto.message_field(
|
2516
|
+
3, group="subquery_type"
|
2517
|
+
)
|
2518
|
+
"""EXISTS/UNIQUE predicate"""
|
2519
|
+
|
2520
|
+
set_comparison: "ExpressionSubquerySetComparison" = betterproto.message_field(
|
2521
|
+
4, group="subquery_type"
|
2522
|
+
)
|
2523
|
+
"""ANY/ALL predicate"""
|
2524
|
+
|
2525
|
+
|
2526
|
+
@dataclass(eq=False, repr=False)
|
2527
|
+
class ExpressionSubqueryScalar(betterproto.Message):
|
2528
|
+
"""
|
2529
|
+
A subquery with one row and one column. This is often an aggregate
|
2530
|
+
though not required to be.
|
2531
|
+
"""
|
2532
|
+
|
2533
|
+
input: "Rel" = betterproto.message_field(1)
|
2534
|
+
|
2535
|
+
|
2536
|
+
@dataclass(eq=False, repr=False)
|
2537
|
+
class ExpressionSubqueryInPredicate(betterproto.Message):
|
2538
|
+
"""
|
2539
|
+
Predicate checking that the left expression is contained in the right
|
2540
|
+
subquery
|
2541
|
+
|
2542
|
+
Examples:
|
2543
|
+
|
2544
|
+
x IN (SELECT * FROM t)
|
2545
|
+
(x, y) IN (SELECT a, b FROM t)
|
2546
|
+
"""
|
2547
|
+
|
2548
|
+
needles: List["Expression"] = betterproto.message_field(1)
|
2549
|
+
haystack: "Rel" = betterproto.message_field(2)
|
2550
|
+
|
2551
|
+
|
2552
|
+
@dataclass(eq=False, repr=False)
|
2553
|
+
class ExpressionSubquerySetPredicate(betterproto.Message):
|
2554
|
+
"""
|
2555
|
+
A predicate over a set of rows in the form of a subquery
|
2556
|
+
EXISTS and UNIQUE are common SQL forms of this operation.
|
2557
|
+
"""
|
2558
|
+
|
2559
|
+
predicate_op: "ExpressionSubquerySetPredicatePredicateOp" = betterproto.enum_field(
|
2560
|
+
1
|
2561
|
+
)
|
2562
|
+
"""TODO: should allow expressions"""
|
2563
|
+
|
2564
|
+
tuples: "Rel" = betterproto.message_field(2)
|
2565
|
+
|
2566
|
+
|
2567
|
+
@dataclass(eq=False, repr=False)
|
2568
|
+
class ExpressionSubquerySetComparison(betterproto.Message):
|
2569
|
+
"""
|
2570
|
+
A subquery comparison using ANY or ALL.
|
2571
|
+
Examples:
|
2572
|
+
|
2573
|
+
SELECT *
|
2574
|
+
FROM t1
|
2575
|
+
WHERE x < ANY(SELECT y from t2)
|
2576
|
+
"""
|
2577
|
+
|
2578
|
+
reduction_op: "ExpressionSubquerySetComparisonReductionOp" = betterproto.enum_field(
|
2579
|
+
1
|
2580
|
+
)
|
2581
|
+
"""ANY or ALL"""
|
2582
|
+
|
2583
|
+
comparison_op: "ExpressionSubquerySetComparisonComparisonOp" = (
|
2584
|
+
betterproto.enum_field(2)
|
2585
|
+
)
|
2586
|
+
"""A comparison operator"""
|
2587
|
+
|
2588
|
+
left: "Expression" = betterproto.message_field(3)
|
2589
|
+
"""left side of the expression"""
|
2590
|
+
|
2591
|
+
right: "Rel" = betterproto.message_field(4)
|
2592
|
+
"""right side of the expression"""
|
2593
|
+
|
2594
|
+
|
2595
|
+
@dataclass(eq=False, repr=False)
|
2596
|
+
class SortField(betterproto.Message):
|
2597
|
+
"""
|
2598
|
+
The description of a field to sort on (including the direction of sorting and null semantics)
|
2599
|
+
"""
|
2600
|
+
|
2601
|
+
expr: "Expression" = betterproto.message_field(1)
|
2602
|
+
direction: "SortFieldSortDirection" = betterproto.enum_field(2, group="sort_kind")
|
2603
|
+
comparison_function_reference: int = betterproto.uint32_field(3, group="sort_kind")
|
2604
|
+
|
2605
|
+
|
2606
|
+
@dataclass(eq=False, repr=False)
|
2607
|
+
class AggregateFunction(betterproto.Message):
|
2608
|
+
"""An aggregate function."""
|
2609
|
+
|
2610
|
+
function_reference: int = betterproto.uint32_field(1)
|
2611
|
+
"""
|
2612
|
+
Points to a function_anchor defined in this plan, which must refer
|
2613
|
+
to an aggregate function in the associated YAML file. Required; 0 is
|
2614
|
+
considered to be a valid anchor/reference.
|
2615
|
+
"""
|
2616
|
+
|
2617
|
+
arguments: List["FunctionArgument"] = betterproto.message_field(7)
|
2618
|
+
"""
|
2619
|
+
The arguments to be bound to the function. This must have exactly the
|
2620
|
+
number of arguments specified in the function definition, and the
|
2621
|
+
argument types must also match exactly:
|
2622
|
+
|
2623
|
+
- Value arguments must be bound using FunctionArgument.value, and
|
2624
|
+
the expression in that must yield a value of a type that a function
|
2625
|
+
overload is defined for.
|
2626
|
+
- Type arguments must be bound using FunctionArgument.type, and a
|
2627
|
+
function overload must be defined for that type.
|
2628
|
+
- Enum arguments must be bound using FunctionArgument.enum
|
2629
|
+
followed by Enum.specified, with a string that case-insensitively
|
2630
|
+
matches one of the allowed options.
|
2631
|
+
- Optional enum arguments must be bound using FunctionArgument.enum
|
2632
|
+
followed by either Enum.specified or Enum.unspecified. If specified,
|
2633
|
+
the string must case-insensitively match one of the allowed options.
|
2634
|
+
"""
|
2635
|
+
|
2636
|
+
options: List["FunctionOption"] = betterproto.message_field(8)
|
2637
|
+
"""
|
2638
|
+
Options to specify behavior for corner cases, or leave behavior
|
2639
|
+
unspecified if the consumer does not need specific behavior in these
|
2640
|
+
cases.
|
2641
|
+
"""
|
2642
|
+
|
2643
|
+
output_type: "Type" = betterproto.message_field(5)
|
2644
|
+
"""
|
2645
|
+
Must be set to the return type of the function, exactly as derived
|
2646
|
+
using the declaration in the extension.
|
2647
|
+
"""
|
2648
|
+
|
2649
|
+
phase: "AggregationPhase" = betterproto.enum_field(4)
|
2650
|
+
"""
|
2651
|
+
Describes which part of the aggregation to perform within the context of
|
2652
|
+
distributed algorithms. Required. Must be set to INITIAL_TO_RESULT for
|
2653
|
+
aggregate functions that are not decomposable.
|
2654
|
+
"""
|
2655
|
+
|
2656
|
+
sorts: List["SortField"] = betterproto.message_field(3)
|
2657
|
+
"""
|
2658
|
+
If specified, the aggregated records are ordered according to this list
|
2659
|
+
before they are aggregated. The first sort field has the highest
|
2660
|
+
priority; only if a sort field determines two records to be equivalent is
|
2661
|
+
the next field queried. This field is optional.
|
2662
|
+
"""
|
2663
|
+
|
2664
|
+
invocation: "AggregateFunctionAggregationInvocation" = betterproto.enum_field(6)
|
2665
|
+
"""
|
2666
|
+
Specifies whether equivalent records are merged before being aggregated.
|
2667
|
+
Optional, defaults to AGGREGATION_INVOCATION_ALL.
|
2668
|
+
"""
|
2669
|
+
|
2670
|
+
args: List["Expression"] = betterproto.message_field(2)
|
2671
|
+
"""deprecated; use arguments instead"""
|
2672
|
+
|
2673
|
+
def __post_init__(self) -> None:
|
2674
|
+
super().__post_init__()
|
2675
|
+
if self.is_set("args"):
|
2676
|
+
warnings.warn("AggregateFunction.args is deprecated", DeprecationWarning)
|
2677
|
+
|
2678
|
+
|
2679
|
+
@dataclass(eq=False, repr=False)
|
2680
|
+
class ReferenceRel(betterproto.Message):
|
2681
|
+
"""
|
2682
|
+
This rel is used to create references,
|
2683
|
+
in case we refer to a RelRoot field names will be ignored
|
2684
|
+
"""
|
2685
|
+
|
2686
|
+
subtree_ordinal: int = betterproto.int32_field(1)
|
2687
|
+
|
2688
|
+
|
2689
|
+
@dataclass(eq=False, repr=False)
|
2690
|
+
class PlanRel(betterproto.Message):
|
2691
|
+
"""Either a relation or root relation"""
|
2692
|
+
|
2693
|
+
rel: "Rel" = betterproto.message_field(1, group="rel_type")
|
2694
|
+
"""Any relation (used for references and CTEs)"""
|
2695
|
+
|
2696
|
+
root: "RelRoot" = betterproto.message_field(2, group="rel_type")
|
2697
|
+
"""The root of a relation tree"""
|
2698
|
+
|
2699
|
+
|
2700
|
+
@dataclass(eq=False, repr=False)
|
2701
|
+
class Plan(betterproto.Message):
|
2702
|
+
"""
|
2703
|
+
Describe a set of operations to complete.
|
2704
|
+
For compactness sake, identifiers are normalized at the plan level.
|
2705
|
+
"""
|
2706
|
+
|
2707
|
+
version: "Version" = betterproto.message_field(6)
|
2708
|
+
"""
|
2709
|
+
Substrait version of the plan. Optional up to 0.17.0, required for later
|
2710
|
+
versions.
|
2711
|
+
"""
|
2712
|
+
|
2713
|
+
extension_uris: List["extensions.SimpleExtensionUri"] = betterproto.message_field(1)
|
2714
|
+
"""a list of yaml specifications this plan may depend on"""
|
2715
|
+
|
2716
|
+
extensions: List[
|
2717
|
+
"extensions.SimpleExtensionDeclaration"
|
2718
|
+
] = betterproto.message_field(2)
|
2719
|
+
"""a list of extensions this plan may depend on"""
|
2720
|
+
|
2721
|
+
relations: List["PlanRel"] = betterproto.message_field(3)
|
2722
|
+
"""one or more relation trees that are associated with this plan."""
|
2723
|
+
|
2724
|
+
advanced_extensions: "extensions.AdvancedExtension" = betterproto.message_field(4)
|
2725
|
+
"""additional extensions associated with this plan."""
|
2726
|
+
|
2727
|
+
expected_type_urls: List[str] = betterproto.string_field(5)
|
2728
|
+
"""
|
2729
|
+
A list of com.google.Any entities that this plan may use. Can be used to
|
2730
|
+
warn if some embedded message types are unknown. Note that this list may
|
2731
|
+
include message types that are ignorable (optimizations) or that are
|
2732
|
+
unused. In many cases, a consumer may be able to work with a plan even if
|
2733
|
+
one or more message types defined here are unknown.
|
2734
|
+
"""
|
2735
|
+
|
2736
|
+
|
2737
|
+
@dataclass(eq=False, repr=False)
|
2738
|
+
class PlanVersion(betterproto.Message):
|
2739
|
+
"""
|
2740
|
+
This message type can be used to deserialize only the version of a Substrait
|
2741
|
+
Plan message. This prevents deserialization errors when there were breaking
|
2742
|
+
changes between the Substrait version of the tool that produced the plan and
|
2743
|
+
the Substrait version used to deserialize it, such that a consumer can emit
|
2744
|
+
a more helpful error message in this case.
|
2745
|
+
"""
|
2746
|
+
|
2747
|
+
version: "Version" = betterproto.message_field(6)
|
2748
|
+
|
2749
|
+
|
2750
|
+
@dataclass(eq=False, repr=False)
|
2751
|
+
class Version(betterproto.Message):
|
2752
|
+
major_number: int = betterproto.uint32_field(1)
|
2753
|
+
"""Substrait version number."""
|
2754
|
+
|
2755
|
+
minor_number: int = betterproto.uint32_field(2)
|
2756
|
+
patch_number: int = betterproto.uint32_field(3)
|
2757
|
+
git_hash: str = betterproto.string_field(4)
|
2758
|
+
"""
|
2759
|
+
If a particular version of Substrait is used that does not correspond to
|
2760
|
+
a version number exactly (for example when using an unofficial fork or
|
2761
|
+
using a version that is not yet released or is between versions), set this
|
2762
|
+
to the full git hash of the utilized commit of
|
2763
|
+
https://github.com/substrait-io/substrait (or fork thereof), represented
|
2764
|
+
using a lowercase hex ASCII string 40 characters in length. The version
|
2765
|
+
number above should be set to the most recent version tag in the history
|
2766
|
+
of that commit.
|
2767
|
+
"""
|
2768
|
+
|
2769
|
+
producer: str = betterproto.string_field(5)
|
2770
|
+
"""
|
2771
|
+
Identifying information for the producer that created this plan. Under
|
2772
|
+
ideal circumstances, consumers should not need this information. However,
|
2773
|
+
it is foreseen that consumers may need to work around bugs in particular
|
2774
|
+
producers in practice, and therefore may need to know which producer
|
2775
|
+
created the plan.
|
2776
|
+
"""
|
2777
|
+
|
2778
|
+
|
2779
|
+
@dataclass(eq=False, repr=False)
|
2780
|
+
class ExpressionReference(betterproto.Message):
|
2781
|
+
expression: "Expression" = betterproto.message_field(1, group="expr_type")
|
2782
|
+
measure: "AggregateFunction" = betterproto.message_field(2, group="expr_type")
|
2783
|
+
output_names: List[str] = betterproto.string_field(3)
|
2784
|
+
"""Field names in depth-first order"""
|
2785
|
+
|
2786
|
+
|
2787
|
+
@dataclass(eq=False, repr=False)
|
2788
|
+
class ExtendedExpression(betterproto.Message):
|
2789
|
+
"""
|
2790
|
+
Describe a set of operations to complete.
|
2791
|
+
For compactness sake, identifiers are normalized at the plan level.
|
2792
|
+
"""
|
2793
|
+
|
2794
|
+
version: "Version" = betterproto.message_field(7)
|
2795
|
+
"""
|
2796
|
+
Substrait version of the expression. Optional up to 0.17.0, required for later
|
2797
|
+
versions.
|
2798
|
+
"""
|
2799
|
+
|
2800
|
+
extension_uris: List["extensions.SimpleExtensionUri"] = betterproto.message_field(1)
|
2801
|
+
"""a list of yaml specifications this expression may depend on"""
|
2802
|
+
|
2803
|
+
extensions: List[
|
2804
|
+
"extensions.SimpleExtensionDeclaration"
|
2805
|
+
] = betterproto.message_field(2)
|
2806
|
+
"""a list of extensions this expression may depend on"""
|
2807
|
+
|
2808
|
+
referred_expr: List["ExpressionReference"] = betterproto.message_field(3)
|
2809
|
+
"""one or more expression trees with same order in plan rel"""
|
2810
|
+
|
2811
|
+
base_schema: "NamedStruct" = betterproto.message_field(4)
|
2812
|
+
advanced_extensions: "extensions.AdvancedExtension" = betterproto.message_field(5)
|
2813
|
+
"""additional extensions associated with this expression."""
|
2814
|
+
|
2815
|
+
expected_type_urls: List[str] = betterproto.string_field(6)
|
2816
|
+
"""
|
2817
|
+
A list of com.google.Any entities that this plan may use. Can be used to
|
2818
|
+
warn if some embedded message types are unknown. Note that this list may
|
2819
|
+
include message types that are ignorable (optimizations) or that are
|
2820
|
+
unused. In many cases, a consumer may be able to work with a plan even if
|
2821
|
+
one or more message types defined here are unknown.
|
2822
|
+
"""
|
2823
|
+
|
2824
|
+
|
2825
|
+
@dataclass(eq=False, repr=False)
|
2826
|
+
class ParameterizedType(betterproto.Message):
|
2827
|
+
bool: "TypeBoolean" = betterproto.message_field(1, group="kind")
|
2828
|
+
i8: "TypeI8" = betterproto.message_field(2, group="kind")
|
2829
|
+
i16: "TypeI16" = betterproto.message_field(3, group="kind")
|
2830
|
+
i32: "TypeI32" = betterproto.message_field(5, group="kind")
|
2831
|
+
i64: "TypeI64" = betterproto.message_field(7, group="kind")
|
2832
|
+
fp32: "TypeFp32" = betterproto.message_field(10, group="kind")
|
2833
|
+
fp64: "TypeFp64" = betterproto.message_field(11, group="kind")
|
2834
|
+
string: "TypeString" = betterproto.message_field(12, group="kind")
|
2835
|
+
binary: "TypeBinary" = betterproto.message_field(13, group="kind")
|
2836
|
+
timestamp: "TypeTimestamp" = betterproto.message_field(14, group="kind")
|
2837
|
+
"""
|
2838
|
+
Deprecated in favor of `ParameterizedPrecisionTimestamp precision_timestamp`
|
2839
|
+
"""
|
2840
|
+
|
2841
|
+
date: "TypeDate" = betterproto.message_field(16, group="kind")
|
2842
|
+
time: "TypeTime" = betterproto.message_field(17, group="kind")
|
2843
|
+
interval_year: "TypeIntervalYear" = betterproto.message_field(19, group="kind")
|
2844
|
+
interval_day: "ParameterizedTypeParameterizedIntervalDay" = (
|
2845
|
+
betterproto.message_field(20, group="kind")
|
2846
|
+
)
|
2847
|
+
interval_compound: "ParameterizedTypeParameterizedIntervalCompound" = (
|
2848
|
+
betterproto.message_field(36, group="kind")
|
2849
|
+
)
|
2850
|
+
timestamp_tz: "TypeTimestampTz" = betterproto.message_field(29, group="kind")
|
2851
|
+
"""
|
2852
|
+
Deprecated in favor of `ParameterizedPrecisionTimestampTZ precision_timestamp_tz`
|
2853
|
+
"""
|
2854
|
+
|
2855
|
+
uuid: "TypeUuid" = betterproto.message_field(32, group="kind")
|
2856
|
+
fixed_char: "ParameterizedTypeParameterizedFixedChar" = betterproto.message_field(
|
2857
|
+
21, group="kind"
|
2858
|
+
)
|
2859
|
+
varchar: "ParameterizedTypeParameterizedVarChar" = betterproto.message_field(
|
2860
|
+
22, group="kind"
|
2861
|
+
)
|
2862
|
+
fixed_binary: "ParameterizedTypeParameterizedFixedBinary" = (
|
2863
|
+
betterproto.message_field(23, group="kind")
|
2864
|
+
)
|
2865
|
+
decimal: "ParameterizedTypeParameterizedDecimal" = betterproto.message_field(
|
2866
|
+
24, group="kind"
|
2867
|
+
)
|
2868
|
+
precision_timestamp: "ParameterizedTypeParameterizedPrecisionTimestamp" = (
|
2869
|
+
betterproto.message_field(34, group="kind")
|
2870
|
+
)
|
2871
|
+
precision_timestamp_tz: "ParameterizedTypeParameterizedPrecisionTimestampTz" = (
|
2872
|
+
betterproto.message_field(35, group="kind")
|
2873
|
+
)
|
2874
|
+
struct: "ParameterizedTypeParameterizedStruct" = betterproto.message_field(
|
2875
|
+
25, group="kind"
|
2876
|
+
)
|
2877
|
+
list: "ParameterizedTypeParameterizedList" = betterproto.message_field(
|
2878
|
+
27, group="kind"
|
2879
|
+
)
|
2880
|
+
map: "ParameterizedTypeParameterizedMap" = betterproto.message_field(
|
2881
|
+
28, group="kind"
|
2882
|
+
)
|
2883
|
+
user_defined: "ParameterizedTypeParameterizedUserDefined" = (
|
2884
|
+
betterproto.message_field(30, group="kind")
|
2885
|
+
)
|
2886
|
+
user_defined_pointer: int = betterproto.uint32_field(31, group="kind")
|
2887
|
+
"""
|
2888
|
+
Deprecated in favor of user_defined, which allows nullability and
|
2889
|
+
variations to be specified. If user_defined_pointer is encountered,
|
2890
|
+
treat it as being non-nullable and having the default variation.
|
2891
|
+
"""
|
2892
|
+
|
2893
|
+
type_parameter: "ParameterizedTypeTypeParameter" = betterproto.message_field(
|
2894
|
+
33, group="kind"
|
2895
|
+
)
|
2896
|
+
|
2897
|
+
def __post_init__(self) -> None:
|
2898
|
+
super().__post_init__()
|
2899
|
+
if self.is_set("timestamp"):
|
2900
|
+
warnings.warn(
|
2901
|
+
"ParameterizedType.timestamp is deprecated", DeprecationWarning
|
2902
|
+
)
|
2903
|
+
if self.is_set("timestamp_tz"):
|
2904
|
+
warnings.warn(
|
2905
|
+
"ParameterizedType.timestamp_tz is deprecated", DeprecationWarning
|
2906
|
+
)
|
2907
|
+
if self.is_set("user_defined_pointer"):
|
2908
|
+
warnings.warn(
|
2909
|
+
"ParameterizedType.user_defined_pointer is deprecated",
|
2910
|
+
DeprecationWarning,
|
2911
|
+
)
|
2912
|
+
|
2913
|
+
|
2914
|
+
@dataclass(eq=False, repr=False)
|
2915
|
+
class ParameterizedTypeTypeParameter(betterproto.Message):
|
2916
|
+
name: str = betterproto.string_field(1)
|
2917
|
+
bounds: List["ParameterizedType"] = betterproto.message_field(2)
|
2918
|
+
|
2919
|
+
|
2920
|
+
@dataclass(eq=False, repr=False)
|
2921
|
+
class ParameterizedTypeIntegerParameter(betterproto.Message):
|
2922
|
+
name: str = betterproto.string_field(1)
|
2923
|
+
range_start_inclusive: "ParameterizedTypeNullableInteger" = (
|
2924
|
+
betterproto.message_field(2)
|
2925
|
+
)
|
2926
|
+
range_end_exclusive: "ParameterizedTypeNullableInteger" = betterproto.message_field(
|
2927
|
+
3
|
2928
|
+
)
|
2929
|
+
|
2930
|
+
|
2931
|
+
@dataclass(eq=False, repr=False)
|
2932
|
+
class ParameterizedTypeNullableInteger(betterproto.Message):
|
2933
|
+
value: int = betterproto.int64_field(1)
|
2934
|
+
|
2935
|
+
|
2936
|
+
@dataclass(eq=False, repr=False)
|
2937
|
+
class ParameterizedTypeParameterizedFixedChar(betterproto.Message):
|
2938
|
+
length: "ParameterizedTypeIntegerOption" = betterproto.message_field(1)
|
2939
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
2940
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
2941
|
+
|
2942
|
+
|
2943
|
+
@dataclass(eq=False, repr=False)
|
2944
|
+
class ParameterizedTypeParameterizedVarChar(betterproto.Message):
|
2945
|
+
length: "ParameterizedTypeIntegerOption" = betterproto.message_field(1)
|
2946
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
2947
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
2948
|
+
|
2949
|
+
|
2950
|
+
@dataclass(eq=False, repr=False)
|
2951
|
+
class ParameterizedTypeParameterizedFixedBinary(betterproto.Message):
|
2952
|
+
length: "ParameterizedTypeIntegerOption" = betterproto.message_field(1)
|
2953
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
2954
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
2955
|
+
|
2956
|
+
|
2957
|
+
@dataclass(eq=False, repr=False)
|
2958
|
+
class ParameterizedTypeParameterizedDecimal(betterproto.Message):
|
2959
|
+
scale: "ParameterizedTypeIntegerOption" = betterproto.message_field(1)
|
2960
|
+
precision: "ParameterizedTypeIntegerOption" = betterproto.message_field(2)
|
2961
|
+
variation_pointer: int = betterproto.uint32_field(3)
|
2962
|
+
nullability: "TypeNullability" = betterproto.enum_field(4)
|
2963
|
+
|
2964
|
+
|
2965
|
+
@dataclass(eq=False, repr=False)
|
2966
|
+
class ParameterizedTypeParameterizedIntervalDay(betterproto.Message):
|
2967
|
+
precision: "ParameterizedTypeIntegerOption" = betterproto.message_field(1)
|
2968
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
2969
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
2970
|
+
|
2971
|
+
|
2972
|
+
@dataclass(eq=False, repr=False)
|
2973
|
+
class ParameterizedTypeParameterizedIntervalCompound(betterproto.Message):
|
2974
|
+
precision: "ParameterizedTypeIntegerOption" = betterproto.message_field(1)
|
2975
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
2976
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
2977
|
+
|
2978
|
+
|
2979
|
+
@dataclass(eq=False, repr=False)
|
2980
|
+
class ParameterizedTypeParameterizedPrecisionTimestamp(betterproto.Message):
|
2981
|
+
precision: "ParameterizedTypeIntegerOption" = betterproto.message_field(1)
|
2982
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
2983
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
2984
|
+
|
2985
|
+
|
2986
|
+
@dataclass(eq=False, repr=False)
|
2987
|
+
class ParameterizedTypeParameterizedPrecisionTimestampTz(betterproto.Message):
|
2988
|
+
precision: "ParameterizedTypeIntegerOption" = betterproto.message_field(1)
|
2989
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
2990
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
2991
|
+
|
2992
|
+
|
2993
|
+
@dataclass(eq=False, repr=False)
|
2994
|
+
class ParameterizedTypeParameterizedStruct(betterproto.Message):
|
2995
|
+
types: List["ParameterizedType"] = betterproto.message_field(1)
|
2996
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
2997
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
2998
|
+
|
2999
|
+
|
3000
|
+
@dataclass(eq=False, repr=False)
|
3001
|
+
class ParameterizedTypeParameterizedNamedStruct(betterproto.Message):
|
3002
|
+
names: List[str] = betterproto.string_field(1)
|
3003
|
+
"""list of names in dfs order"""
|
3004
|
+
|
3005
|
+
struct: "ParameterizedTypeParameterizedStruct" = betterproto.message_field(2)
|
3006
|
+
|
3007
|
+
|
3008
|
+
@dataclass(eq=False, repr=False)
|
3009
|
+
class ParameterizedTypeParameterizedList(betterproto.Message):
|
3010
|
+
type: "ParameterizedType" = betterproto.message_field(1)
|
3011
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3012
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3013
|
+
|
3014
|
+
|
3015
|
+
@dataclass(eq=False, repr=False)
|
3016
|
+
class ParameterizedTypeParameterizedMap(betterproto.Message):
|
3017
|
+
key: "ParameterizedType" = betterproto.message_field(1)
|
3018
|
+
value: "ParameterizedType" = betterproto.message_field(2)
|
3019
|
+
variation_pointer: int = betterproto.uint32_field(3)
|
3020
|
+
nullability: "TypeNullability" = betterproto.enum_field(4)
|
3021
|
+
|
3022
|
+
|
3023
|
+
@dataclass(eq=False, repr=False)
|
3024
|
+
class ParameterizedTypeParameterizedUserDefined(betterproto.Message):
|
3025
|
+
type_pointer: int = betterproto.uint32_field(1)
|
3026
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3027
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3028
|
+
|
3029
|
+
|
3030
|
+
@dataclass(eq=False, repr=False)
|
3031
|
+
class ParameterizedTypeIntegerOption(betterproto.Message):
|
3032
|
+
literal: int = betterproto.int32_field(1, group="integer_type")
|
3033
|
+
parameter: "ParameterizedTypeIntegerParameter" = betterproto.message_field(
|
3034
|
+
2, group="integer_type"
|
3035
|
+
)
|
3036
|
+
|
3037
|
+
|
3038
|
+
@dataclass(eq=False, repr=False)
|
3039
|
+
class DerivationExpression(betterproto.Message):
|
3040
|
+
bool: "TypeBoolean" = betterproto.message_field(1, group="kind")
|
3041
|
+
i8: "TypeI8" = betterproto.message_field(2, group="kind")
|
3042
|
+
i16: "TypeI16" = betterproto.message_field(3, group="kind")
|
3043
|
+
i32: "TypeI32" = betterproto.message_field(5, group="kind")
|
3044
|
+
i64: "TypeI64" = betterproto.message_field(7, group="kind")
|
3045
|
+
fp32: "TypeFp32" = betterproto.message_field(10, group="kind")
|
3046
|
+
fp64: "TypeFp64" = betterproto.message_field(11, group="kind")
|
3047
|
+
string: "TypeString" = betterproto.message_field(12, group="kind")
|
3048
|
+
binary: "TypeBinary" = betterproto.message_field(13, group="kind")
|
3049
|
+
timestamp: "TypeTimestamp" = betterproto.message_field(14, group="kind")
|
3050
|
+
"""
|
3051
|
+
Deprecated in favor of `ExpressionPrecisionTimestamp precision_timestamp`
|
3052
|
+
"""
|
3053
|
+
|
3054
|
+
date: "TypeDate" = betterproto.message_field(16, group="kind")
|
3055
|
+
time: "TypeTime" = betterproto.message_field(17, group="kind")
|
3056
|
+
interval_year: "TypeIntervalYear" = betterproto.message_field(19, group="kind")
|
3057
|
+
timestamp_tz: "TypeTimestampTz" = betterproto.message_field(29, group="kind")
|
3058
|
+
"""
|
3059
|
+
Deprecated in favor of `ExpressionPrecisionTimestampTZ precision_timestamp_tz`
|
3060
|
+
"""
|
3061
|
+
|
3062
|
+
uuid: "TypeUuid" = betterproto.message_field(32, group="kind")
|
3063
|
+
interval_day: "DerivationExpressionExpressionIntervalDay" = (
|
3064
|
+
betterproto.message_field(20, group="kind")
|
3065
|
+
)
|
3066
|
+
interval_compound: "DerivationExpressionExpressionIntervalCompound" = (
|
3067
|
+
betterproto.message_field(42, group="kind")
|
3068
|
+
)
|
3069
|
+
fixed_char: "DerivationExpressionExpressionFixedChar" = betterproto.message_field(
|
3070
|
+
21, group="kind"
|
3071
|
+
)
|
3072
|
+
varchar: "DerivationExpressionExpressionVarChar" = betterproto.message_field(
|
3073
|
+
22, group="kind"
|
3074
|
+
)
|
3075
|
+
fixed_binary: "DerivationExpressionExpressionFixedBinary" = (
|
3076
|
+
betterproto.message_field(23, group="kind")
|
3077
|
+
)
|
3078
|
+
decimal: "DerivationExpressionExpressionDecimal" = betterproto.message_field(
|
3079
|
+
24, group="kind"
|
3080
|
+
)
|
3081
|
+
precision_timestamp: "DerivationExpressionExpressionPrecisionTimestamp" = (
|
3082
|
+
betterproto.message_field(40, group="kind")
|
3083
|
+
)
|
3084
|
+
precision_timestamp_tz: "DerivationExpressionExpressionPrecisionTimestampTz" = (
|
3085
|
+
betterproto.message_field(41, group="kind")
|
3086
|
+
)
|
3087
|
+
struct: "DerivationExpressionExpressionStruct" = betterproto.message_field(
|
3088
|
+
25, group="kind"
|
3089
|
+
)
|
3090
|
+
list: "DerivationExpressionExpressionList" = betterproto.message_field(
|
3091
|
+
27, group="kind"
|
3092
|
+
)
|
3093
|
+
map: "DerivationExpressionExpressionMap" = betterproto.message_field(
|
3094
|
+
28, group="kind"
|
3095
|
+
)
|
3096
|
+
user_defined: "DerivationExpressionExpressionUserDefined" = (
|
3097
|
+
betterproto.message_field(30, group="kind")
|
3098
|
+
)
|
3099
|
+
user_defined_pointer: int = betterproto.uint32_field(31, group="kind")
|
3100
|
+
"""
|
3101
|
+
Deprecated in favor of user_defined, which allows nullability and
|
3102
|
+
variations to be specified. If user_defined_pointer is encountered,
|
3103
|
+
treat it as being non-nullable and having the default variation.
|
3104
|
+
"""
|
3105
|
+
|
3106
|
+
type_parameter_name: str = betterproto.string_field(33, group="kind")
|
3107
|
+
integer_parameter_name: str = betterproto.string_field(34, group="kind")
|
3108
|
+
integer_literal: int = betterproto.int32_field(35, group="kind")
|
3109
|
+
unary_op: "DerivationExpressionUnaryOp" = betterproto.message_field(
|
3110
|
+
36, group="kind"
|
3111
|
+
)
|
3112
|
+
binary_op: "DerivationExpressionBinaryOp" = betterproto.message_field(
|
3113
|
+
37, group="kind"
|
3114
|
+
)
|
3115
|
+
if_else: "DerivationExpressionIfElse" = betterproto.message_field(38, group="kind")
|
3116
|
+
return_program: "DerivationExpressionReturnProgram" = betterproto.message_field(
|
3117
|
+
39, group="kind"
|
3118
|
+
)
|
3119
|
+
|
3120
|
+
def __post_init__(self) -> None:
|
3121
|
+
super().__post_init__()
|
3122
|
+
if self.is_set("timestamp"):
|
3123
|
+
warnings.warn(
|
3124
|
+
"DerivationExpression.timestamp is deprecated", DeprecationWarning
|
3125
|
+
)
|
3126
|
+
if self.is_set("timestamp_tz"):
|
3127
|
+
warnings.warn(
|
3128
|
+
"DerivationExpression.timestamp_tz is deprecated", DeprecationWarning
|
3129
|
+
)
|
3130
|
+
if self.is_set("user_defined_pointer"):
|
3131
|
+
warnings.warn(
|
3132
|
+
"DerivationExpression.user_defined_pointer is deprecated",
|
3133
|
+
DeprecationWarning,
|
3134
|
+
)
|
3135
|
+
|
3136
|
+
|
3137
|
+
@dataclass(eq=False, repr=False)
|
3138
|
+
class DerivationExpressionExpressionFixedChar(betterproto.Message):
|
3139
|
+
length: "DerivationExpression" = betterproto.message_field(1)
|
3140
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3141
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3142
|
+
|
3143
|
+
|
3144
|
+
@dataclass(eq=False, repr=False)
|
3145
|
+
class DerivationExpressionExpressionVarChar(betterproto.Message):
|
3146
|
+
length: "DerivationExpression" = betterproto.message_field(1)
|
3147
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3148
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3149
|
+
|
3150
|
+
|
3151
|
+
@dataclass(eq=False, repr=False)
|
3152
|
+
class DerivationExpressionExpressionFixedBinary(betterproto.Message):
|
3153
|
+
length: "DerivationExpression" = betterproto.message_field(1)
|
3154
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3155
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3156
|
+
|
3157
|
+
|
3158
|
+
@dataclass(eq=False, repr=False)
|
3159
|
+
class DerivationExpressionExpressionDecimal(betterproto.Message):
|
3160
|
+
scale: "DerivationExpression" = betterproto.message_field(1)
|
3161
|
+
precision: "DerivationExpression" = betterproto.message_field(2)
|
3162
|
+
variation_pointer: int = betterproto.uint32_field(3)
|
3163
|
+
nullability: "TypeNullability" = betterproto.enum_field(4)
|
3164
|
+
|
3165
|
+
|
3166
|
+
@dataclass(eq=False, repr=False)
|
3167
|
+
class DerivationExpressionExpressionPrecisionTimestamp(betterproto.Message):
|
3168
|
+
precision: "DerivationExpression" = betterproto.message_field(1)
|
3169
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3170
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3171
|
+
|
3172
|
+
|
3173
|
+
@dataclass(eq=False, repr=False)
|
3174
|
+
class DerivationExpressionExpressionIntervalDay(betterproto.Message):
|
3175
|
+
precision: "DerivationExpression" = betterproto.message_field(1)
|
3176
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3177
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3178
|
+
|
3179
|
+
|
3180
|
+
@dataclass(eq=False, repr=False)
|
3181
|
+
class DerivationExpressionExpressionIntervalCompound(betterproto.Message):
|
3182
|
+
precision: "DerivationExpression" = betterproto.message_field(1)
|
3183
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3184
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3185
|
+
|
3186
|
+
|
3187
|
+
@dataclass(eq=False, repr=False)
|
3188
|
+
class DerivationExpressionExpressionPrecisionTimestampTz(betterproto.Message):
|
3189
|
+
precision: "DerivationExpression" = betterproto.message_field(1)
|
3190
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3191
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3192
|
+
|
3193
|
+
|
3194
|
+
@dataclass(eq=False, repr=False)
|
3195
|
+
class DerivationExpressionExpressionStruct(betterproto.Message):
|
3196
|
+
types: List["DerivationExpression"] = betterproto.message_field(1)
|
3197
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3198
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3199
|
+
|
3200
|
+
|
3201
|
+
@dataclass(eq=False, repr=False)
|
3202
|
+
class DerivationExpressionExpressionNamedStruct(betterproto.Message):
|
3203
|
+
names: List[str] = betterproto.string_field(1)
|
3204
|
+
struct: "DerivationExpressionExpressionStruct" = betterproto.message_field(2)
|
3205
|
+
|
3206
|
+
|
3207
|
+
@dataclass(eq=False, repr=False)
|
3208
|
+
class DerivationExpressionExpressionList(betterproto.Message):
|
3209
|
+
type: "DerivationExpression" = betterproto.message_field(1)
|
3210
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3211
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3212
|
+
|
3213
|
+
|
3214
|
+
@dataclass(eq=False, repr=False)
|
3215
|
+
class DerivationExpressionExpressionMap(betterproto.Message):
|
3216
|
+
key: "DerivationExpression" = betterproto.message_field(1)
|
3217
|
+
value: "DerivationExpression" = betterproto.message_field(2)
|
3218
|
+
variation_pointer: int = betterproto.uint32_field(3)
|
3219
|
+
nullability: "TypeNullability" = betterproto.enum_field(4)
|
3220
|
+
|
3221
|
+
|
3222
|
+
@dataclass(eq=False, repr=False)
|
3223
|
+
class DerivationExpressionExpressionUserDefined(betterproto.Message):
|
3224
|
+
type_pointer: int = betterproto.uint32_field(1)
|
3225
|
+
variation_pointer: int = betterproto.uint32_field(2)
|
3226
|
+
nullability: "TypeNullability" = betterproto.enum_field(3)
|
3227
|
+
|
3228
|
+
|
3229
|
+
@dataclass(eq=False, repr=False)
|
3230
|
+
class DerivationExpressionIfElse(betterproto.Message):
|
3231
|
+
if_condition: "DerivationExpression" = betterproto.message_field(1)
|
3232
|
+
if_return: "DerivationExpression" = betterproto.message_field(2)
|
3233
|
+
else_return: "DerivationExpression" = betterproto.message_field(3)
|
3234
|
+
|
3235
|
+
|
3236
|
+
@dataclass(eq=False, repr=False)
|
3237
|
+
class DerivationExpressionUnaryOp(betterproto.Message):
|
3238
|
+
op_type: "DerivationExpressionUnaryOpUnaryOpType" = betterproto.enum_field(1)
|
3239
|
+
arg: "DerivationExpression" = betterproto.message_field(2)
|
3240
|
+
|
3241
|
+
|
3242
|
+
@dataclass(eq=False, repr=False)
|
3243
|
+
class DerivationExpressionBinaryOp(betterproto.Message):
|
3244
|
+
op_type: "DerivationExpressionBinaryOpBinaryOpType" = betterproto.enum_field(1)
|
3245
|
+
arg1: "DerivationExpression" = betterproto.message_field(2)
|
3246
|
+
arg2: "DerivationExpression" = betterproto.message_field(3)
|
3247
|
+
|
3248
|
+
|
3249
|
+
@dataclass(eq=False, repr=False)
|
3250
|
+
class DerivationExpressionReturnProgram(betterproto.Message):
|
3251
|
+
assignments: List[
|
3252
|
+
"DerivationExpressionReturnProgramAssignment"
|
3253
|
+
] = betterproto.message_field(1)
|
3254
|
+
final_expression: "DerivationExpression" = betterproto.message_field(2)
|
3255
|
+
|
3256
|
+
|
3257
|
+
@dataclass(eq=False, repr=False)
|
3258
|
+
class DerivationExpressionReturnProgramAssignment(betterproto.Message):
|
3259
|
+
name: str = betterproto.string_field(1)
|
3260
|
+
expression: "DerivationExpression" = betterproto.message_field(2)
|
3261
|
+
|
3262
|
+
|
3263
|
+
@dataclass(eq=False, repr=False)
|
3264
|
+
class FunctionSignature(betterproto.Message):
|
3265
|
+
"""List of function signatures available."""
|
3266
|
+
|
3267
|
+
pass
|
3268
|
+
|
3269
|
+
|
3270
|
+
@dataclass(eq=False, repr=False)
|
3271
|
+
class FunctionSignatureFinalArgVariadic(betterproto.Message):
|
3272
|
+
min_args: int = betterproto.int64_field(1)
|
3273
|
+
"""
|
3274
|
+
the minimum number of arguments allowed for the list of final arguments
|
3275
|
+
(inclusive).
|
3276
|
+
"""
|
3277
|
+
|
3278
|
+
max_args: int = betterproto.int64_field(2)
|
3279
|
+
"""
|
3280
|
+
the maximum number of arguments allowed for the list of final arguments
|
3281
|
+
(exclusive)
|
3282
|
+
"""
|
3283
|
+
|
3284
|
+
consistency: "FunctionSignatureFinalArgVariadicParameterConsistency" = (
|
3285
|
+
betterproto.enum_field(3)
|
3286
|
+
)
|
3287
|
+
"""the type of parameterized type consistency"""
|
3288
|
+
|
3289
|
+
|
3290
|
+
@dataclass(eq=False, repr=False)
|
3291
|
+
class FunctionSignatureFinalArgNormal(betterproto.Message):
|
3292
|
+
pass
|
3293
|
+
|
3294
|
+
|
3295
|
+
@dataclass(eq=False, repr=False)
|
3296
|
+
class FunctionSignatureScalar(betterproto.Message):
|
3297
|
+
arguments: List["FunctionSignatureArgument"] = betterproto.message_field(2)
|
3298
|
+
name: List[str] = betterproto.string_field(3)
|
3299
|
+
description: "FunctionSignatureDescription" = betterproto.message_field(4)
|
3300
|
+
deterministic: bool = betterproto.bool_field(7)
|
3301
|
+
session_dependent: bool = betterproto.bool_field(8)
|
3302
|
+
output_type: "DerivationExpression" = betterproto.message_field(9)
|
3303
|
+
variadic: "FunctionSignatureFinalArgVariadic" = betterproto.message_field(
|
3304
|
+
10, group="final_variable_behavior"
|
3305
|
+
)
|
3306
|
+
normal: "FunctionSignatureFinalArgNormal" = betterproto.message_field(
|
3307
|
+
11, group="final_variable_behavior"
|
3308
|
+
)
|
3309
|
+
implementations: List[
|
3310
|
+
"FunctionSignatureImplementation"
|
3311
|
+
] = betterproto.message_field(12)
|
3312
|
+
|
3313
|
+
|
3314
|
+
@dataclass(eq=False, repr=False)
|
3315
|
+
class FunctionSignatureAggregate(betterproto.Message):
|
3316
|
+
arguments: List["FunctionSignatureArgument"] = betterproto.message_field(2)
|
3317
|
+
name: str = betterproto.string_field(3)
|
3318
|
+
description: "FunctionSignatureDescription" = betterproto.message_field(4)
|
3319
|
+
deterministic: bool = betterproto.bool_field(7)
|
3320
|
+
session_dependent: bool = betterproto.bool_field(8)
|
3321
|
+
output_type: "DerivationExpression" = betterproto.message_field(9)
|
3322
|
+
variadic: "FunctionSignatureFinalArgVariadic" = betterproto.message_field(
|
3323
|
+
10, group="final_variable_behavior"
|
3324
|
+
)
|
3325
|
+
normal: "FunctionSignatureFinalArgNormal" = betterproto.message_field(
|
3326
|
+
11, group="final_variable_behavior"
|
3327
|
+
)
|
3328
|
+
ordered: bool = betterproto.bool_field(14)
|
3329
|
+
max_set: int = betterproto.uint64_field(12)
|
3330
|
+
intermediate_type: "Type" = betterproto.message_field(13)
|
3331
|
+
implementations: List[
|
3332
|
+
"FunctionSignatureImplementation"
|
3333
|
+
] = betterproto.message_field(15)
|
3334
|
+
|
3335
|
+
|
3336
|
+
@dataclass(eq=False, repr=False)
|
3337
|
+
class FunctionSignatureWindow(betterproto.Message):
|
3338
|
+
arguments: List["FunctionSignatureArgument"] = betterproto.message_field(2)
|
3339
|
+
name: List[str] = betterproto.string_field(3)
|
3340
|
+
description: "FunctionSignatureDescription" = betterproto.message_field(4)
|
3341
|
+
deterministic: bool = betterproto.bool_field(7)
|
3342
|
+
session_dependent: bool = betterproto.bool_field(8)
|
3343
|
+
intermediate_type: "DerivationExpression" = betterproto.message_field(9)
|
3344
|
+
output_type: "DerivationExpression" = betterproto.message_field(10)
|
3345
|
+
variadic: "FunctionSignatureFinalArgVariadic" = betterproto.message_field(
|
3346
|
+
16, group="final_variable_behavior"
|
3347
|
+
)
|
3348
|
+
normal: "FunctionSignatureFinalArgNormal" = betterproto.message_field(
|
3349
|
+
17, group="final_variable_behavior"
|
3350
|
+
)
|
3351
|
+
ordered: bool = betterproto.bool_field(11)
|
3352
|
+
max_set: int = betterproto.uint64_field(12)
|
3353
|
+
window_type: "FunctionSignatureWindowWindowType" = betterproto.enum_field(14)
|
3354
|
+
implementations: List[
|
3355
|
+
"FunctionSignatureImplementation"
|
3356
|
+
] = betterproto.message_field(15)
|
3357
|
+
|
3358
|
+
|
3359
|
+
@dataclass(eq=False, repr=False)
|
3360
|
+
class FunctionSignatureDescription(betterproto.Message):
|
3361
|
+
language: str = betterproto.string_field(1)
|
3362
|
+
body: str = betterproto.string_field(2)
|
3363
|
+
|
3364
|
+
|
3365
|
+
@dataclass(eq=False, repr=False)
|
3366
|
+
class FunctionSignatureImplementation(betterproto.Message):
|
3367
|
+
type: "FunctionSignatureImplementationType" = betterproto.enum_field(1)
|
3368
|
+
uri: str = betterproto.string_field(2)
|
3369
|
+
|
3370
|
+
|
3371
|
+
@dataclass(eq=False, repr=False)
|
3372
|
+
class FunctionSignatureArgument(betterproto.Message):
|
3373
|
+
name: str = betterproto.string_field(1)
|
3374
|
+
value: "FunctionSignatureArgumentValueArgument" = betterproto.message_field(
|
3375
|
+
2, group="argument_kind"
|
3376
|
+
)
|
3377
|
+
type: "FunctionSignatureArgumentTypeArgument" = betterproto.message_field(
|
3378
|
+
3, group="argument_kind"
|
3379
|
+
)
|
3380
|
+
enum: "FunctionSignatureArgumentEnumArgument" = betterproto.message_field(
|
3381
|
+
4, group="argument_kind"
|
3382
|
+
)
|
3383
|
+
|
3384
|
+
|
3385
|
+
@dataclass(eq=False, repr=False)
|
3386
|
+
class FunctionSignatureArgumentValueArgument(betterproto.Message):
|
3387
|
+
type: "ParameterizedType" = betterproto.message_field(1)
|
3388
|
+
constant: bool = betterproto.bool_field(2)
|
3389
|
+
|
3390
|
+
|
3391
|
+
@dataclass(eq=False, repr=False)
|
3392
|
+
class FunctionSignatureArgumentTypeArgument(betterproto.Message):
|
3393
|
+
type: "ParameterizedType" = betterproto.message_field(1)
|
3394
|
+
|
3395
|
+
|
3396
|
+
@dataclass(eq=False, repr=False)
|
3397
|
+
class FunctionSignatureArgumentEnumArgument(betterproto.Message):
|
3398
|
+
options: List[str] = betterproto.string_field(1)
|
3399
|
+
optional: bool = betterproto.bool_field(2)
|