Skip to content

Release v0.10.0

Choose a tag to compare

@TristonianJones TristonianJones released this 08 Mar 01:27
· 463 commits to master since this release
7200247

Features

Heterogeneous Runtime Equality

CEL currently only supports homogeneous equality via type-checking; however, where type inferences are limited,
such as when working with JSON, the definition of runtime equality has been relaxed such that comparisons across
type are permitted.

  • Protobuf equality uses the C++ MessageDifferencer::Equals behavior
  • Numeric equality treats all numeric types as though they occur on a single continuous number line
  • All other comparisons across type return false.

This change will shift a certain category of runtime errors into non-errors.

  • Support heterogeneous null comparisons [#471]
  • Implement heterogeneous null comparisons for list and map [#472]
  • Numeric in/equality and comparisons across numeric types [#473]
  • Updates to cel-go proto equality to mirror C++ MessageDifferencer [#481]
  • Heterogeneous equality [#482]
  • Cross-type numeric declarations with opt-in [#484]

Expression Cost Tracking

Static analysis tools for better evaluation cost estimation with options to track and enforce these limits
during runtime evaluation. This work deprecates and will replace the interpreter.Coster interface for
heuristic costing of expressions.

  • EstimateCost API [#483]
  • Estimate costs for list and string concatenation and conditionals [#487]
  • Runtime cost calculation with limits [#494]
  • Adjust cost estimates to account for logical op short circuiting [#501]

Additional Changes

  • Expose an option to track macro call replacements [#470]
  • Move ref.Val -> api.expr.Value converter to io.go [#480]
  • List append optimizations for comprehension loops (40x speed-up in filter, map) [#491]
  • Add join to strings ext library [#495]
  • Add option to compile regex constants at program creation time [#497]
  • Context Eval for interruptable evaluation [#502]

Fixes

  • Ensure macro calls are tracked efficiently in lists and call targets by [#467]
  • Update the operator map structure [#466]
  • Update the ANTLR tool version and update lexer token names for consistency [#469]
  • Fix the panic in the codelab solution [#479]

New Contributors

Full Changelog: v0.9.0...v0.10.0