Skip to content
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

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

vbarua
Copy link
Member

@vbarua vbarua commented Jun 26, 2024

BREAKING CHANGE: consumers must now check for multiple optimization messages within AdvancedExtensions

@vbarua
Copy link
Member Author

vbarua commented Jun 26, 2024

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;
Copy link
Member Author

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?

@westonpace @jacques-n

Copy link
Member

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).

Copy link
Member

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.

Copy link
Member Author

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.

@vbarua vbarua force-pushed the vbarua/allow-multiple-optimization branch from dd7a352 to 0844cf1 Compare June 26, 2024 19:06
@@ -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;
Copy link
Member Author

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.

@vbarua vbarua merged commit e523d5d into main Jun 28, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants