Skip to content

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

Open
@TristonianJones

Description

@TristonianJones

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions