/
extensions.proto
79 lines (62 loc) · 2.44 KB
/
extensions.proto
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
// SPDX-License-Identifier: Apache-2.0
syntax = "proto3";
package substrait.extensions;
import "google/protobuf/any.proto";
option csharp_namespace = "Substrait.Protobuf";
option go_package = "github.com/substrait-io/substrait-go/proto/extensions";
option java_multiple_files = true;
option java_package = "io.substrait.proto";
message SimpleExtensionURI {
// A surrogate key used in the context of a single plan used to reference the
// URI associated with an extension.
uint32 extension_uri_anchor = 1;
// The URI where this extension YAML can be retrieved. This is the "namespace"
// of this extension.
string uri = 2;
}
// Describes a mapping between a specific extension entity and the uri where
// that extension can be found.
message SimpleExtensionDeclaration {
oneof mapping_type {
ExtensionType extension_type = 1;
ExtensionTypeVariation extension_type_variation = 2;
ExtensionFunction extension_function = 3;
}
// Describes a Type
message ExtensionType {
// references the extension_uri_anchor defined for a specific extension URI.
uint32 extension_uri_reference = 1;
// A surrogate key used in the context of a single plan to reference a
// specific extension type
uint32 type_anchor = 2;
// the name of the type in the defined extension YAML.
string name = 3;
}
message ExtensionTypeVariation {
// references the extension_uri_anchor defined for a specific extension URI.
uint32 extension_uri_reference = 1;
// A surrogate key used in the context of a single plan to reference a
// specific type variation
uint32 type_variation_anchor = 2;
// the name of the type in the defined extension YAML.
string name = 3;
}
message ExtensionFunction {
// references the extension_uri_anchor defined for a specific extension URI.
uint32 extension_uri_reference = 1;
// A surrogate key used in the context of a single plan to reference a
// specific function
uint32 function_anchor = 2;
// A function signature compound name
string name = 3;
}
}
// A generic object that can be used to embed additional extension information
// into the serialized substrait plan.
message AdvancedExtension {
// An optimization is helpful information that don't influence semantics. May
// be ignored by a consumer.
google.protobuf.Any optimization = 1;
// An enhancement alter semantics. Cannot be ignored by a consumer.
google.protobuf.Any enhancement = 2;
}