Skip to content

Add a SubexpressionOptimizer baseline test case for fully extractable presence tests#287

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_622036697
Apr 5, 2024
Merged

Add a SubexpressionOptimizer baseline test case for fully extractable presence tests#287
copybara-service[bot] merged 1 commit into
mainfrom
test_622036697

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Add a SubexpressionOptimizer baseline test case for fully extractable presence tests

Note that this isn't actually rewriting the AST in the most optimized form.

Example: has({'a': true}.a) && has({'a': true}.a) should rewrite to:

cel.@block([has({'a': true}.a)], @index0 && @index0)., not

cel.@block([{"a": true}], has(@index0.a) && has(@index0.a)).

This will be addressed with the incoming mutable AST enhancements.

@copybara-service copybara-service Bot force-pushed the test_622036697 branch 2 times, most recently from 835badc to 84228c0 Compare April 5, 2024 18:39
… presence tests

Note that this isn't actually rewriting the AST in the most optimized form.

Example: `has({'a': true}.a) && has({'a': true}.a)` should rewrite to:

`cel.@block([has({'a': true}.a)], @index0 && @index0`)., not

`cel.@block([{"a": true}], has(@index0.a) && has(@index0.a))`.

This will be addressed with the incoming mutable AST enhancements.

PiperOrigin-RevId: 622240518
@copybara-service copybara-service Bot merged commit 432a954 into main Apr 5, 2024
@copybara-service copybara-service Bot deleted the test_622036697 branch April 5, 2024 18:47
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.

1 participant