You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the README, under "Common Questions", it is written that:
Checking is an optional, but strongly suggested, step in CEL expression validation. It is sufficient in some cases to simply Parse and rely on the runtime bindings and error handling to do the right thing.
I believe there currently is no way around checking an expression before evaluation, as an expression must be checked before it can be turned into a program and evaluated. An attempt to create a program from an unchecked AST always results in an error "programs must be created from checked expressions".
Checking in turn requires declaring variables. However, in my particular use case, I cannot acquire a full list of variables to be used in expressions (there may be many, and acquiring variable values is costly, so I would only like to do this whenever required). I believe that the above should be achievable with an unchecked variable and CelVariableResolver.
Activity
l46kok commentedon Mar 20, 2024
Hi,
This limitation is documented here:
But this is certainly a gap in CEL-Java with respect to the CEL specification. It's something we're aiming to address in the future.
[-][BUG] Evaluating unchecked expressions[/-][+]Evaluating unchecked expressions in CEL-Java[/+]l46kok commentedon Mar 2, 2026
Evaluation of parsed-only expressions are now supported through the planner based runtime here (experimental): https://github.com/google/cel-java/blob/main/runtime/src/main/java/dev/cel/runtime/CelRuntimeExperimentalFactory.java. It will be moved to CelRuntimeFactory once it stabilizes.
l46kok commentedon May 15, 2026
This is officially supported now in the planner runtime in the latest release: https://github.com/google/cel-java/releases/tag/v0.13.0