google / cel-java

Fast, portable, non-Turing complete expression evaluation with gradual typing (Java)
https://cel.dev
Apache License 2.0
118 stars 16 forks source link

Cost Estimate support #390

Open jam01 opened 1 month ago

jam01 commented 1 month ago

Feature request checklist

Change Hello, mostly wanted to confirm that the Cost and CostEstimate support is not available in Java...?

The spec mentions about applications being able to limit utilization based on the complexity of expressions, but I'm not sure these facilities are actually part of the spec itself.

If it's not, would definitely be a great addition at some point. Thanks.

Example https://pkg.go.dev/github.com/google/cel-go/checker#Cost

Alternatives considered None

l46kok commented 1 month ago

Presently, cel-go is the only stack that supports cost estimation and tracking. The spec doesn't actually mandate these as a feature, but it would be a nice enhancement for cel-java. It is a fair amount of change and we aren't able to prioritize this work anytime soon, but we'd otherwise be happy to take contributions.