-
Notifications
You must be signed in to change notification settings - Fork 190
Expand file tree
/
Copy pathsimple_extensions_schema.yaml
More file actions
376 lines (372 loc) · 10.4 KB
/
simple_extensions_schema.yaml
File metadata and controls
376 lines (372 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
$id: http://substrait.io/schemas/simple_extensions
$schema: https://json-schema.org/draft/2020-12/schema
title: Simple Extensions
additionalProperties: false
type: object
required: [urn]
properties:
urn:
type: string
dependencies:
# For reusing type classes and type variations from other extension files.
# The keys are namespace identifiers that you can then use as dot-separated
# prefix for type class and type variation names in functions and the base
# type class for variations. The values must be extension URNs, following
# the same format and conventions as those used in the proto plans.
type: object
patternProperties:
"^[a-zA-Z_\\$][a-zA-Z0-9_\\$]*$":
type: string
metadata: # arbitrary data created by extension author
type: object
types:
type: array
minItems: 1
items:
type: object
additionalProperties: false
required: [name]
properties:
name:
type: string
deprecated:
$ref: "#/$defs/deprecationStatus"
description:
type: string
metadata: # arbitrary data created by extension author
type: object
structure:
$ref: "#/$defs/type"
parameters: # parameter list for compound types
$ref: "#/$defs/type_param_defs"
variadic: # when set, last parameter may be specified one or more times
type: boolean
type_variations:
type: array
minItems: 1
items:
type: object
additionalProperties: false
required: [parent, name]
properties:
parent:
$ref: "#/$defs/type"
name:
type: string
deprecated:
$ref: "#/$defs/deprecationStatus"
description:
type: string
functions:
type: string
enum: [INHERITS, SEPARATE]
scalar_functions:
type: array
items:
$ref: "#/$defs/scalarFunction"
aggregate_functions:
type: array
items:
$ref: "#/$defs/aggregateFunction"
window_functions:
type: array
items:
$ref: "#/$defs/windowFunction"
$defs:
type:
oneOf:
- type: string # any data type
- type: object # syntactic sugar for a non-nullable named struct
type_param_defs: # an array of compound type parameter definitions
type: array
items:
type: object
required: [type]
properties:
name: # name of the parameter (for documentation only)
type: string
description: # description (for documentation only)
type: string
type: # expected metatype for the parameter
type: string
enum:
- dataType
- boolean
- integer
- enumeration
- string
min: # for integers, the minimum supported value (inclusive)
type: number
max: # for integers, the maximum supported value (inclusive)
type: number
options: # for enums, the list of supported values
$ref: "#/$defs/enum_options"
optional: # when set to true, the parameter may be omitted at the end or skipped using null
type: boolean
enum_options:
type: array
minItems: 1
uniqueItems: true
items:
type: string
enumeration_arg:
type: object
additionalProperties: false
required: [options]
properties:
name:
type: string
description:
type: string
options:
$ref: "#/$defs/enum_options"
value_arg:
type: object
required: [value]
properties:
name:
type: string
description:
type: string
value:
$ref: "#/$defs/type"
constant:
type: boolean
type_arg:
type: object
required: [type]
properties:
name:
type: string
description:
type: string
type:
type: string
arguments: # an array of arguments
type: array
items:
oneOf:
- $ref: "#/$defs/enumeration_arg"
- $ref: "#/$defs/value_arg"
- $ref: "#/$defs/type_arg"
options: # a map of options
type: object
additionalProperties:
type: object # option
additionalProperties: false
required: [values]
properties:
description:
type: string
values:
type: array
items:
type: string
variadicBehavior:
type: object
additionalProperties: false
properties:
min:
type: number
max:
type: number
parameterConsistency:
type: string
enum: [CONSISTENT, INCONSISTENT]
deterministic:
type: boolean
sessionDependent:
type: boolean
nullabilityHandling:
description: >-
Describes how nullability of arguments maps to nullability of output.
* MIRROR: Output is nullable if any argument is nullable; argument and return
types must not include nullability markers as they will be ignored for output
nullability derivation.
* DECLARED_OUTPUT: Output nullability matches the declared return type
regardless of argument nullability; argument types must not include
nullability markers.
* DISCRETE: Like DECLARED_OUTPUT, but arguments must also match their
declared nullability exactly.
type: string
enum: [MIRROR, DECLARED_OUTPUT, DISCRETE]
returnValue:
$ref: "#/$defs/type"
implementation:
type: object
additionalProperties:
type: string
intermediate:
$ref: "#/$defs/type"
decomposable:
type: string
enum: [NONE, ONE, MANY]
maxset:
type: number
ordered:
type: boolean
coreSemanticVersionString:
type: string
pattern: "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
description: >-
Semantic version string. Should follow semantic versioning format (e.g. "1.2.3").
We intentiaonally allow only core components (major.minor.patch) of the semantic version string.
deprecationStatus:
type: object
additionalProperties: false
required: [since]
properties:
since:
description: >-
Version since when the item is deprecated.
$ref: "#/$defs/coreSemanticVersionString"
reason:
description: >-
Description of the deprecation (for documentation only).
type: string
metadata:
description: >-
Arbitrary data created by extension author.
type: object
scalarFunction:
type: object
additionalProperties: false
required: [name, impls]
properties:
name:
type: string
deprecated:
$ref: "#/$defs/deprecationStatus"
description:
type: string
metadata: # arbitrary data created by extension author
type: object
impls:
type: array
minItems: 1
items:
type: object
additionalProperties: false
required: [return]
properties:
deprecated:
$ref: "#/$defs/deprecationStatus"
description:
type: string
args:
$ref: "#/$defs/arguments"
options:
$ref: "#/$defs/options"
variadic:
$ref: "#/$defs/variadicBehavior"
sessionDependent:
$ref: "#/$defs/sessionDependent"
deterministic:
$ref: "#/$defs/deterministic"
nullability:
$ref: "#/$defs/nullabilityHandling"
return:
$ref: "#/$defs/returnValue"
implementation:
$ref: "#/$defs/implementation"
aggregateFunction:
type: object
additionalProperties: false
required: [name, impls]
properties:
name:
type: string
deprecated:
$ref: "#/$defs/deprecationStatus"
description:
type: string
metadata: # arbitrary data created by extension author
type: object
impls:
type: array
minItems: 1
items:
type: object
additionalProperties: false
required: [return]
properties:
deprecated:
$ref: "#/$defs/deprecationStatus"
description:
type: string
args:
$ref: "#/$defs/arguments"
options:
$ref: "#/$defs/options"
variadic:
$ref: "#/$defs/variadicBehavior"
sessionDependent:
$ref: "#/$defs/sessionDependent"
deterministic:
$ref: "#/$defs/deterministic"
nullability:
$ref: "#/$defs/nullabilityHandling"
return:
$ref: "#/$defs/returnValue"
implementation:
$ref: "#/$defs/implementation"
intermediate:
$ref: "#/$defs/intermediate"
ordered:
$ref: "#/$defs/ordered"
maxset:
$ref: "#/$defs/maxset"
decomposable:
$ref: "#/$defs/decomposable"
windowFunction:
type: object
additionalProperties: false
required: [name, impls]
properties:
name:
type: string
deprecated:
$ref: "#/$defs/deprecationStatus"
description:
type: string
metadata: # arbitrary data created by extension author
type: object
impls:
type: array
minItems: 1
items:
type: object
additionalProperties: false
required: [return]
properties:
deprecated:
$ref: "#/$defs/deprecationStatus"
description:
type: string
args:
$ref: "#/$defs/arguments"
options:
$ref: "#/$defs/options"
variadic:
$ref: "#/$defs/variadicBehavior"
sessionDependent:
$ref: "#/$defs/sessionDependent"
deterministic:
$ref: "#/$defs/deterministic"
nullability:
$ref: "#/$defs/nullabilityHandling"
return:
$ref: "#/$defs/returnValue"
implementation:
$ref: "#/$defs/implementation"
intermediate:
$ref: "#/$defs/intermediate"
ordered:
$ref: "#/$defs/ordered"
maxset:
$ref: "#/$defs/maxset"
decomposable:
$ref: "#/$defs/decomposable"
window_type:
type: string
enum: [STREAMING, PARTITION]