Skip to content

Releases: google/cel-java

v0.5.0

02 May 03:05

Choose a tag to compare

Note: Use 0.5.1 if you're using Maven Central

This release introduces mutable expressions to improve the performance of augmenting an AST via CEL optimizers. Roughly, the speed improvement ranges from 3x to 10x depending on the complexity of an AST.

Breaking Changes

Classes CelCreateList, CelCreateMap and CelCreateStruct have been renamed to CelList, CelMap and CelStruct respectively to be consistent across other canonical CEL implementations. There are no functional changes.

  • Remove modifier create from CelCreateList, CelCreateMap and CelCreateStruct in #318
  • Remove modifier create from mutable variants of list, map and struct in #323
  • Remove create modifiers from list,struct,map methods in #321

What's Changed

  • Accept a list as an argument to setParameterTypes in function overload decl in #278
  • Add a SubexpressionOptimizer baseline test case for fully extractable presence tests in #287
  • Implement CelMutableExpr in #289
  • Add CelMutableIdent in #291
  • Add CelMutableCreateList #292
  • Add CelMutableSelect in #297
  • Add CelMutableCreateStruct in #293
  • Add CelMutableCreateMap in #294
  • Add CelMutableComprehension in #295
  • Add CelMutableCall #298
  • Add copy constructor to deep copy mutable expressions in #296
  • Introduce a common expression tree interface between CelExpr and CelMutableExpr in #300
  • Compute Max IDs per subtree in NavigableExpr in #302
  • Add CelMutableAst in #303
  • Change MutableExprVisitor to visit using CelMutableExpr in #304
  • Change AST Mutator to accept mutable ASTs in #305
  • Change ConstantFoldingOptimizer to leverage mutable exprs in #308
  • Fully perform CSE on presence tests where possible in #311
  • Change AstMutator to augment macro source using mutable expr in #314
  • Drop expr suffix from CelExpr static constructors in #317
  • Specify better error message and code for invalid field selections in #316
  • Improve canEliminate logic by excluding nodes from ineligible comprehension branches in #312
  • Remove appending create modifier in ExprFormatter in #320
  • Remove modifier create from the common expression interface in #319
  • Change CelAstOptimizer interface signature. Cleanup unused methods in #310
  • Change SubexpressionOptimizer to leverage mutable exprs in #309
  • Add Mutable versions of NavigableExpr and AST in #307
  • Remove cached hashcode from MutableExpr in #306
  • Create a base navigable class that accepts a bound generic type of an expression in #301
  • Add a converter for adapting between CelExpr and CelMutableExpr #299
  • Rename MutableAst to AstMutator in #290
  • Use simple for loop instead of stream in CEL runtime equality #280

Fixes

  • Fix timestamp and duration conversion for JSON in #332
  • Change comprehension variable mangling logic to always generate a unique index per comprehension expr in #330
  • Fix optional type resolution in #283
  • Fix optional field selection behavior on structs in #286
  • Clean up dangling source information from macro expansion in #337
  • Do not re-use ID twice in exists_one macro in #338
  • Dedupe enum types by enum descriptor's fully qualified name in ProtoMessageTypeProvider in #324

Miscellaneous

  • Remove main AutoValue dependency from the published jar in #315
  • Add load() statements for the builtin Bazel java rules in #284
  • Update bazel WORKSPACE dependencies #331
  • Remove maven artifacts for optimizer, validator and extensions in #327
  • Add capability to regenerate baseline tests into a file in #329

Full Changelog: v0.4.1...v0.5.0

v0.4.1

21 Mar 19:56

Choose a tag to compare

What's Changed

  • Optimize scoped variable access using an unmodifiable map in #274
  • Fix an issue with incorrect boolean evaluation when short-circuiting is disabled in #275

Full Changelog: v0.4.0...v0.4.1

v0.4.0

06 Mar 23:37

Choose a tag to compare

This release introduces a new static optimizer that performs Common Subexpression Elimination to improve upon evaluation efficiency.

Breaking Changes

ConstantFoldingOptimizer.INSTANCE is made inaccessible with the following PR. Callers must use getInstance or newInstance methods instead.

What's Changed

Fixes

  • Fix constant folding to work with list provided as an identifier by @l46kok in #199
  • Fix standard function 'type' to accept a parameter type of TypeParamType instead of Dyn by @copybara-service in #207
  • Fix constant folding when ternary arg is replaced with a comprehension by @copybara-service in #268
  • Fix constant folding with in operator involving comprehension identifiers by @copybara-service in #263
  • Prevent string.format injection when interpreter exception is being built by @copybara-service in #218
  • Fix optional list/map indexing with unknowns. Fix optional map indexing via field selection. by @copybara-service in #262
  • Fix replacing namespaced identifiers for accu_init by @copybara-service in #261
  • Optimize parsing a large string literal by avoiding making substring copies #270

Miscellaneous

New Contributors

Full Changelog: v0.3.1...v0.4.0

v0.3.1

28 Feb 19:29
b8c661f

Choose a tag to compare

What's Changed

  • Don't include protos (and some other dependencies) in jars by @smparkes in #251
  • Prepare 0.3.1 release by @l46kok in #259

New Contributors

Full Changelog: v0.3.0...v0.3.1

v0.3.0

20 Dec 01:26

Choose a tag to compare

This release brings the following changes to improve safety, ease of use and evaluation performance:

  • Static AST validators have been added. Canonical literal validators are available for timestamp, durations, regex and homogeneous aggregate literals (for lists and maps).
  • Static AST optimizers. Used for optimizing type-checked ASTs for improved evaluation efficiency. Constant Folding is available for use.
  • Introduction of CelValue and CelValueProviders. CelValue is a native value representation leveraged in the runtime. This can be used to bind non-protobuf structs for evaluation (ex: POJOs).

What's Changed

New Contributors

Full Changelog: v0.2.0...v0.3.0

v0.2.0

08 Aug 22:12

Choose a tag to compare

This represents the release of CEL-Java in its entirety, including the parser, type-checker and runtime.

Full Changelog: v0.1.0...v0.2.0

v0.1.0

22 Feb 19:07

Choose a tag to compare

Initial release of CEL-Java

Features:

  • Evaluation of a type-checked expression
  • Adapters for CEL protobuf messages (dev.cel.expr and com.google.api.expr.v1alpha1)

Note: Compilation (Parsing + Type-Checking) is not yet supported but will be made available in the future. Please consider using CEL-Go implementation to produce a type-checked expression for time being.