mvzink commented on code in PR #1538:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1538#discussion_r1896016157


##########
src/parser/mod.rs:
##########
@@ -11375,7 +11466,11 @@ impl<'a> Parser<'a> {
         } else {
             let object_type =
                 self.parse_one_of_keywords(&[Keyword::SEQUENCE, 
Keyword::SCHEMA, Keyword::TABLE]);
-            let objects = self.parse_comma_separated(|p| 
p.parse_object_name(false));
+            let objects = if dialect_of!(self is MySqlDialect | 
GenericDialect) {
+                self.parse_comma_separated(|p| 
p.parse_object_name_with_wildcards(false, true))
+            } else {
+                self.parse_comma_separated(|p| p.parse_object_name(false))
+            };

Review Comment:
   There's no "conflicting behavior" per se, so the tests pass without these 2 
checks, and I definitely see the value of reducing switches on dialect 
(especially using `dialect_of!` rather than a method on the dialect). But to be 
clear, this will mean that using `PostgreSqlDialect` for example will accept 
syntax that Postgres itself doesn't accept. If that's worth the tradeoff to 
reduce switching in here, I'm okay with that but just want to be clear that's 
okay.



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