rs-sac commented on code in PR #2025: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2025#discussion_r2337189458
########## tests/sqlparser_mysql.rs: ########## @@ -4132,6 +4132,40 @@ fn parse_straight_join() { .verified_stmt("SELECT a.*, b.* FROM table_a STRAIGHT_JOIN table_b AS b ON a.b_id = b.id"); } +#[test] +fn parse_cross_join_on() { + let sql = "SELECT * FROM t1 CROSS JOIN t2 ON a = b"; + let select = mysql().verified_only_select(sql); + assert_eq!( + Join { + relation: table_from_name(ObjectName::from(vec![Ident::new("t2")])), + global: false, + join_operator: JoinOperator::CrossJoin(JoinConstraint::On(Expr::BinaryOp { + left: Box::new(Expr::Identifier(Ident::new("a"))), + op: BinaryOperator::Eq, + right: Box::new(Expr::Identifier(Ident::new("b"))), + })), + }, + only(only(select.from).joins), + ); +} + +#[test] +fn parse_cross_join_using() { Review Comment: Done. ########## tests/sqlparser_mysql.rs: ########## @@ -4132,6 +4132,40 @@ fn parse_straight_join() { .verified_stmt("SELECT a.*, b.* FROM table_a STRAIGHT_JOIN table_b AS b ON a.b_id = b.id"); } +#[test] +fn parse_cross_join_on() { + let sql = "SELECT * FROM t1 CROSS JOIN t2 ON a = b"; + let select = mysql().verified_only_select(sql); Review Comment: Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org