sabir-akhadov-localstack commented on code in PR #2761:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2761#discussion_r4422825230


##########
src/parser/mod.rs:
##########
@@ -18780,6 +18798,10 @@ impl<'a> Parser<'a> {
                 Some(GrantObjects::Procedures(
                     self.parse_comma_separated(Parser::parse_function_desc)?,
                 ))
+            } else if self.parse_keyword(Keyword::ROUTINE) {

Review Comment:
   This breaks a table named `routine`: `GRANT SELECT ON TABLE routine TO r` 
parses, but `Tables` prints without `TABLE`, so the output `GRANT SELECT ON 
routine TO r` no longer re-parses (`Expected: TO, found: r`). Guarding on the 
next token being a word other than `TO`/`FROM` before consuming `ROUTINE` 
avoids it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to