tomershaniii commented on code in PR #1747: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1747#discussion_r2009043976
########## src/dialect/mysql.rs: ########## @@ -141,6 +149,280 @@ impl Dialect for MySqlDialect { fn supports_set_names(&self) -> bool { true } + /// Dialect-specific table/view option parser override + /// + /// This method is called to parse the next table/view option. + /// + /// If `None` is returned, falls back to the default behavior. + /// <https://dev.mysql.com/doc/refman/8.4/en/create-table.html> + fn parse_plain_option(&self, parser: &mut Parser) -> Result<Option<SqlOption>, ParserError> { + //Some consts + const COMPRESSION_OPTS: [&str; 3] = ["ZLIB", "LZ4", "NONE"]; + const INSERT_METHODS_OPTS: [&str; 3] = ["NO", "FIRST", "LAST"]; + + let keyword = match parser.parse_one_of_keywords(&[ Review Comment: I thought it would be better to parse more accurately where is is easy to implement (i.e. only a limited set of values are allowed). it does provide some value and I do not see the downside given that it's in dialect specific code. LMKWYT -- 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