iffyio commented on code in PR #1762:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1762#discussion_r1988447089


##########
src/parser/mod.rs:
##########
@@ -8002,6 +8002,11 @@ impl<'a> Parser<'a> {
                 && dialect_of!(self is MySqlDialect | GenericDialect)
             {
                 AlterTableOperation::DropPrimaryKey
+            } else if self.parse_keywords(&[Keyword::FOREIGN, Keyword::KEY])
+                && dialect_of!(self is MySqlDialect | GenericDialect)

Review Comment:
   We can probably skip the dialect check altogether and have the parser always 
accept `DROP FOREIGN KEY` and maybe even `DROP PRIMARY KEY` to match? feels 
like that would still be reasonable



-- 
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

Reply via email to