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

Wrapper types do not unwrap to null when accessed on unset fields #109

Open
TristonianJones opened this issue Mar 31, 2021 · 0 comments
Open

Comments

@TristonianJones
Copy link
Collaborator

When a wrapper type field like google.protobuf.StringValue is not set and accessed on a protobuf message field, the evaluator should return a null value for the field to be consistent with the spec, and with wrapper behavior in protobuf generated code.

message Example {
   google.protobuf.Int32Value priority = 1;
   google.protobuf.StringValue message = 2;
}

The following should evaluate to true.

// example set to Example{}
example.priority != null || example.message == null

Note, this is a semantic change, and comparisons with null are painful to use in CEL without heterogeneous equality support.

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

No branches or pull requests

1 participant