Skip to content

Commit ada68a8

Browse files
authored
feat: only use urns for referencing simple extensions (#971)
BREAKING CHANGE: drops uri fields from protobufs
1 parent dca3fe5 commit ada68a8

4 files changed

Lines changed: 9 additions & 38 deletions

File tree

proto/substrait/extended_expression.proto

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ message ExpressionReference {
2525
// Describe a set of operations to complete.
2626
// For compactness sake, identifiers are normalized at the plan level.
2727
message ExtendedExpression {
28+
reserved 1;
29+
2830
// Substrait version of the expression. Optional up to 0.17.0, required for later
2931
// versions.
3032
Version version = 7;
3133

32-
// a list of yaml specifications this expression may depend on
33-
// this is now deprecated and extension_urns should be used instead.
34-
repeated substrait.extensions.SimpleExtensionURI extension_uris = 1 [deprecated = true];
35-
3634
// a list of extension specifications this expression may depend on,
3735
// referenced by Extension URN
3836
repeated substrait.extensions.SimpleExtensionURN extension_urns = 8;

proto/substrait/extensions/extensions.proto

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,6 @@ option go_package = "github.com/substrait-io/substrait-protobuf/go/substraitpb/e
1010
option java_multiple_files = true;
1111
option java_package = "io.substrait.proto";
1212

13-
// This message is deprecated, use SimpleExtensionURN moving forwards
14-
message SimpleExtensionURI {
15-
option deprecated = true;
16-
// A surrogate key used in the context of a single plan used to reference the
17-
// URI associated with an extension.
18-
// 0 is a valid anchor/reference, but prefer non-zero values for ergonomics.
19-
uint32 extension_uri_anchor = 1;
20-
21-
// The URI where this extension YAML can be retrieved. This is the "namespace"
22-
// of this extension.
23-
string uri = 2;
24-
}
25-
2613
message SimpleExtensionURN {
2714
// A surrogate key used in the context of a single plan used to reference the
2815
// URN associated with an extension.
@@ -34,7 +21,7 @@ message SimpleExtensionURN {
3421
string urn = 2;
3522
}
3623

37-
// Describes a mapping between a specific extension entity and the uri/urn where
24+
// Describes a mapping between a specific extension entity and the URN where
3825
// that extension can be found.
3926
message SimpleExtensionDeclaration {
4027
oneof mapping_type {
@@ -45,13 +32,9 @@ message SimpleExtensionDeclaration {
4532

4633
// Describes a Type
4734
message ExtensionType {
48-
// references the extension_uri_anchor defined for a specific extension URI.
49-
// this is now deprecated and extension_urn_reference should be used instead.
50-
uint32 extension_uri_reference = 1 [deprecated = true];
35+
reserved 1;
5136

5237
// references the extension_urn_anchor defined for a specific extension URN.
53-
// If both extension_urn_reference and extension_uri_reference are present,
54-
// extension_urn_reference takes precedence.
5538
uint32 extension_urn_reference = 4;
5639

5740
// A surrogate key used in the context of a single plan to reference a
@@ -64,13 +47,9 @@ message SimpleExtensionDeclaration {
6447
}
6548

6649
message ExtensionTypeVariation {
67-
// references the extension_uri_anchor defined for a specific extension URI.
68-
// this is now deprecated and extension_urn_reference should be used instead.
69-
uint32 extension_uri_reference = 1 [deprecated = true];
50+
reserved 1;
7051

7152
// references the extension_urn_anchor defined for a specific extension URN.
72-
// If both extension_urn_reference and extension_uri_reference are present,
73-
// extension_urn_reference takes precedence.
7453
uint32 extension_urn_reference = 4;
7554

7655
// A surrogate key used in the context of a single plan to reference a
@@ -83,13 +62,9 @@ message SimpleExtensionDeclaration {
8362
}
8463

8564
message ExtensionFunction {
86-
// references the extension_uri_anchor defined for a specific extension URI.
87-
// this is now deprecated and extension_urn_reference should be used instead.
88-
uint32 extension_uri_reference = 1 [deprecated = true];
65+
reserved 1;
8966

9067
// references the extension_urn_anchor defined for a specific extension URN.
91-
// If both extension_urn_reference and extension_uri_reference are present,
92-
// extension_urn_reference takes precedence.
9368
uint32 extension_urn_reference = 4;
9469

9570
// A surrogate key used in the context of a single plan to reference a

proto/substrait/plan.proto

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ message PlanRel {
2525
// Describe a set of operations to complete.
2626
// For compactness sake, identifiers are normalized at the plan level.
2727
message Plan {
28+
reserved 1;
29+
2830
// Substrait version of the plan. Optional up to 0.17.0, required for later
2931
// versions.
3032
Version version = 6;
3133

32-
// a list of yaml specifications this plan may depend on
33-
// this is now deprecated and extension_urns should be used instead.
34-
repeated substrait.extensions.SimpleExtensionURI extension_uris = 1 [deprecated = true];
35-
3634
// a list of extension URNs this plan may depend on
3735
repeated substrait.extensions.SimpleExtensionURN extension_urns = 8;
3836

text/simple_extensions_schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ properties:
1111
# For reusing type classes and type variations from other extension files.
1212
# The keys are namespace identifiers that you can then use as dot-separated
1313
# prefix for type class and type variation names in functions and the base
14-
# type class for variations. The values must be extension URIs, following
14+
# type class for variations. The values must be extension URNs, following
1515
# the same format and conventions as those used in the proto plans.
1616
type: object
1717
patternProperties:

0 commit comments

Comments
 (0)