sbroad fails to plan query with nested subqueries
SELECT "a1" FROM "ta1"
WHERE "a1" in (SELECT "b2" FROM "ta2" WHERE "b2" in (SELECT "c3" FROM "ta3"))
If you construct an ir test like this:
#[test]
fn front_sql5_1() {
let input = r#"SELECT "a1" FROM "ta1"
WHERE "a1" in (SELECT "b2" FROM "ta2" WHERE "b2" in (SELECT "c3" FROM "ta3"))
"#;
let plan = sql_to_optimized_ir(input, vec![]);
...
}
The sbroad will fail with the error:
called `Result::unwrap()` on an `Err` value: Invalid(Node, Some("node is not Expression type."))', sbroad-core/src/ir/transformation/helpers.rs:22:21