-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make optimization a repeated field #653
Conversation
Following up on #649 (comment) |
@@ -72,7 +72,7 @@ message SimpleExtensionDeclaration { | |||
message AdvancedExtension { | |||
// An optimization is helpful information that don't influence semantics. May | |||
// be ignored by a consumer. | |||
google.protobuf.Any optimization = 1; | |||
repeated google.protobuf.Any optimization = 1; | |||
|
|||
// An enhancement alter semantics. Cannot be ignored by a consumer. | |||
google.protobuf.Any enhancement = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The discussion in #649 indicated that optimization
should be made repeated, but called out that enhancement
should not be repeated. Is there a specific reason why we wouldn't want that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. An enhancement feels more like an "is a" relationship and less like a "has a" relationship. In other words, an enhancement is likely to change the semantic intent of the relation in some way. Combining two enhancements is unlikely to be successful.
For example, let's assume that we had a hash join relation enhancement that applies a pre-filter (I know that such a property already exists but we'll assume it was forgotten). At the same time let's assume we have some strange enhancement that specifies which collation to use for the equality comparison. This enhancements would not be compatible (the pre-filter likely would perhaps not be expecting the collation to be used).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That being said, I don't think it was ruled out. Partly we just don't really have any idea what valid use cases for enhancement
look like yet. Until someone is using it though it probably doesn't have to be decided one way or the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. We can limit this to optimization
for now.
dd7a352
to
0844cf1
Compare
@@ -72,7 +72,7 @@ message SimpleExtensionDeclaration { | |||
message AdvancedExtension { | |||
// An optimization is helpful information that don't influence semantics. May | |||
// be ignored by a consumer. | |||
google.protobuf.Any optimization = 1; | |||
repeated google.protobuf.Any optimization = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta: I would have liked to pluralize this (i.e. optimizations
) this, but that is a breaking change due to json encoding.
BREAKING CHANGE: consumers must now check for multiple optimization messages within AdvancedExtensions