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

Attribute Tracking Through Comprehensions #321

Open
2 tasks done
jnthntatum opened this issue Mar 16, 2020 · 1 comment
Open
2 tasks done

Attribute Tracking Through Comprehensions #321

jnthntatum opened this issue Mar 16, 2020 · 1 comment

Comments

@jnthntatum
Copy link
Collaborator

jnthntatum commented Mar 16, 2020

Feature request checklist

  • There are no issues that match the desired change
  • The change is large enough it can't be addressed with a simple Pull Request
  • [] If this is a bug, please file a Bug Report.

Change
Add support for tracking attributes through comprehensions.

Example
var[2].field is declared unknown
for expression:
var.exists(x, x.field == 'test')
I would expect that var[2].field might be returned as an unknown value.

Adding tracking here to keep feature parity with cel-cpp. I'm not sure what the current level of support is in cel-go. Let me know if I can add more detail.

@TristonianJones
Copy link
Collaborator

TristonianJones commented Mar 16, 2020

Thanks Jon, the details look fine. Support for unknowns currently stops at comprehensions, but is slightly different from what you might have seen before since the Go implementation optimizes the field selection behavior in addition to building an attribute trail.

It's totally possible to make the change you've suggested and it would have a dramatic speedup on comprehension processing since currently the code will stop evaluation at var when it could actually complete the evaluation. :) Thanks for the report.

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

2 participants