mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
a0d97b22fc
These changes add support for set values in preparation for rules support. With these changes in place we will be able to compile all rules to wasm. These changes mostly duplicate existing code paths for object values but specialize them for sets. Sets are implemented as sorted lists for now. Set operations are O(n) for now. These changes are not accompanied with end-to-end tests due to partial evaluation. I.e., if set literals are constructed, any test operations like iteration will be unrolled by partial evaluation and since input can only contain JSON values, we don't have a way to fully exercise the set values. Once rules are supported we can improve this. Signed-off-by: Torin Sandall <torinsandall@gmail.com>