iffyio commented on code in PR #1870: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1870#discussion_r2131631473
########## src/parser/mod.rs: ########## @@ -8134,7 +8134,19 @@ impl<'a> Parser<'a> { self.expect_token(&Token::LParen)?; let expr = Box::new(self.parse_expr()?); self.expect_token(&Token::RParen)?; - Ok(Some(TableConstraint::Check { name, expr })) + + let enforced = match dialect_of!(self is GenericDialect | MySqlDialect) { Review Comment: I think we can have the parser always accept the `NOT ENFORCED` keywords if they show up in the statement? Otherwise we'd want to turn this into a dialect method instead of using the dialect_of macro but that feels like it might not be worth it in this case -- 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