Skip to content
Snippets Groups Projects
Commit e947112e authored by Igor Kuznetsov's avatar Igor Kuznetsov
Browse files

feat: add unary operator test

parent 46e47e9c
No related branches found
No related tags found
1 merge request!1414sbroad import
......@@ -282,3 +282,23 @@ motion [policy: segment([ref("identification_number")]), generation: none]
assert_eq!(actual_explain, explain_tree.to_string())
}
#[test]
fn unary_condition_plan() {
let query = r#"SELECT "id", "FIRST_NAME" FROM "test_space" WHERE "id" IS NULL and "FIRST_NAME" IS NOT NULL"#;
let plan = sql_to_optimized_ir(query, vec![]);
let top = &plan.get_top().unwrap();
let explain_tree = FullExplain::new(&plan, *top).unwrap();
let mut actual_explain = String::new();
actual_explain.push_str(
r#"projection ("test_space"."id" -> "id", "test_space"."FIRST_NAME" -> "FIRST_NAME")
selection ROW("test_space"."FIRST_NAME") is not null and ROW("test_space"."id") is null
scan "test_space"
"#,
);
assert_eq!(actual_explain, explain_tree.to_string())
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment