if you try to do a ANTI JOIN without <LEFT|RIGHT> ANTI, it treats ANTI as an alias for the table instead of an anti join
example query. This works fine in duckdb.
SELECT * from table1
ANTI JOIN table2 t2 on t1.id = t2.id
Full Example.
use sqlparser::dialect::GenericDialect;
use sqlparser::parser::Parser;
fn main() {
let sql = r#"
SELECT * from table1
ANTI JOIN table2 t2 on t1.id = t2.id
"#;
let dialect = GenericDialect {};
let ast = Parser::parse_sql(&dialect, sql).unwrap();
println!("AST: {:?}", ast);
}
if you try to do a
ANTI JOIN
without<LEFT|RIGHT> ANTI
, it treatsANTI
as an alias for the table instead of an anti joinexample query. This works fine in duckdb.
Full Example.