vmware-archive / sql-to-dbsp-compiler

Compiler translating SQL view definitions into DBSP circuits (https://github.com/vmware/database-stream-processor)
Other
28 stars 5 forks source link

Several fixes for three-operand conversion #110

Closed mihaibudiu closed 1 year ago

mihaibudiu commented 1 year ago

Signed-off-by: Mihai Budiu mbudiu@vmware.com

mihaibudiu commented 1 year ago

@Kixiron this fixes several bugs in the three-operand conversion, but not all. I have thus marked the PR as a draft. But you should try this, since it should give you useful results for many queries.

Kixiron commented 1 year ago

This pr makes the body of the function get put into a block within function calls a la

let x = wrap_bool({
    let a = ...;
    let b = ...;
    b
});
x
mihaibudiu commented 1 year ago

@Kixiron I hope now I have fixed the three-operand code generation. I am also testing it thoroughly by running the generated three-operand as Rust code. The Rust compiler likes the result.