-
Notifications
You must be signed in to change notification settings - Fork 229
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
Clarify list and map equality rules #208
Comments
As a follow-up question, would it be possible to make the requirement be a boolean return for all equality tests? (or at least across equality tests of the same types, I suppose there is a case for returning an overload error when equality isn't asserted on the same types). This should yield not concrete issue since an error has the same semantic meaning than false (in an |
What you're observing is a property of homogeneous equality where
Since CEL's logical operators will return That said, expect some updates regarding equality behavior shortly. I'm in the process of writing up a proposal to support numeric equality at runtime (type-checker will still complain) and numeric comparisons generally (<, <=, >=, >). I think with these updates, then we can start to talk about heterogeneous comparisons at runtime which would work more like you might expect. |
Thanks for the clarification on lists and map! And sorry for overlooking things, I'll be looking out for your proposal. |
The reasoning for the behavior of list equality is a bit surprising, indeed:
yields to
no such overload
whileyields
false
.There are tests in this repository which assert the different behavior. It's unclear which exact rule to apply here, to decide whether false or an error should be returned and feels like the spec could be inheriting some of the underlying implementation properties.
In a similar fashion these two tests feel like they are contradicting each other:
Is there a description of which behavior to apply I have missed in the spec?
The text was updated successfully, but these errors were encountered: