iffyio commented on code in PR #1852: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1852#discussion_r2096922347
########## src/parser/mod.rs: ########## @@ -16571,6 +16575,23 @@ mod tests { } } + #[test] + fn test_mysql_srid_create_table() { + let sql = r#"CREATE TABLE t (a geometry SRID 4326)"#; + let ast: Vec<Statement> = Parser::parse_sql(&MySqlDialect {}, sql).unwrap(); + + assert_eq!(ast.len(), 1); + if let Statement::CreateTable(v) = &ast[0] { + assert_eq!( + v.columns[0].options[0].option, + ColumnOption::Srid(Box::new(Expr::value(Value::Number( + "4326".parse().unwrap(), + false + )))) + ); + } + } Review Comment: can we instead extend one of the create table tests in either common or mysql tests file? (essentially this test ideally would live in one of those files I think) -- 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