MohamedAbdeen21 commented on code in PR #1783: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1783#discussion_r2020251572
########## tests/sqlparser_mysql.rs: ########## @@ -947,6 +947,36 @@ fn parse_create_table_engine_default_charset() { } } +#[test] +fn parse_create_table_charset_collate() { + let sql = + "CREATE TABLE foo (id INT(11)) CHARACTER SET utf8mb3 DEFAULT COLLATE utf8mb4_0900_ai_ci"; + let expected = + "CREATE TABLE foo (id INT(11)) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb4_0900_ai_ci"; + match mysql().one_statement_parses_to(sql, expected) { Review Comment: If we want to switch this to use `verified_stmt` instead, we will need to replace both collate and charset fields in `CreateTable` with structs to capture the exact syntax used (was default keyword and/or assignment operator used? shorthand `CHARSET` instead of `CHARACTER SET`?). -- 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