Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle big decimal in input #59

Open
anderseknert opened this issue Jun 20, 2022 · 1 comment
Open

Handle big decimal in input #59

anderseknert opened this issue Jun 20, 2022 · 1 comment
Labels
bug Something isn't working compliance

Comments

@anderseknert
Copy link
Collaborator

Something like sprintf("%s", 2e308) found inside of a policy currently has Jarl parsing 2e308 as a double with the value set to Infinity. We should allow reading these values the same way OPA does, using BigDecimal or whatever is most appropriate. We'd also need to ensure that all builtins dealing with numbers work with this as well.

As an aside, the Rego Playground seems to have problems with this as well, and x := 2e308 will render {"x": null} :)

@anderseknert anderseknert added bug Something isn't working compliance labels Jun 20, 2022
@anderseknert
Copy link
Collaborator Author

ClojureScript doesn't handle BigInt / BigDecimal values like Clojure. While we could probably work around this, these are generally not used in policy, and as such not prioritized. Will ignore any tests for these when the target is cljs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compliance
Projects
None yet
Development

No branches or pull requests

1 participant