Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
evalengine: Implement integer division and modulo (#12656)
* evalengine: Implement integer division and modulo Signed-off-by: Dirkjan Bussink <[email protected]> * evalengine: Implement NOT and logical operations This adds the NOT and generic logical operations to the compiler and fixes a number of existing bugs in the evalengine. Specifically NOT is currently broken as we don't translate it properly. Some main issues are that we need to ensure lazy evaluation for the logical operations but also needing it for arithmetic as well. All cases where we've been pushing the boolean singleton value need to be fixed as well in the compiler, because we inline update things in arithmetic operations and we'd update the singleton value before. It also needs to split parsing into JSON from using an argument as a partial JSON value. This specifically is needed for CAST() with an input string where it should parse it. Additionally, convering a JSON boolean to numeric needs to create a floating point value, not an integer one. Signed-off-by: Dirkjan Bussink <[email protected]> * Fix tests Signed-off-by: Dirkjan Bussink <[email protected]> * evalengine/compiler: Use helpers where appropriate Signed-off-by: Dirkjan Bussink <[email protected]> --------- Signed-off-by: Dirkjan Bussink <[email protected]>
- Loading branch information