xitep commented on code in PR #2162:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2162#discussion_r2727049681
##########
src/parser/mod.rs:
##########
@@ -14005,6 +14015,59 @@ impl<'a> Parser<'a> {
})
}
+ /// Parses an optional optimizer hint at the current token position
+ ///
+ ///
[MySQL](https://dev.mysql.com/doc/refman/8.4/en/optimizer-hints.html#optimizer-hints-overview)
+ ///
[Oracle](https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/Comments.html#GUID-D316D545-89E2-4D54-977F-FC97815CD62E)
+ fn parse_optional_optimizer_hint(&mut self) ->
Result<Option<OptimizerHint>, ParserError> {
+ let supports_multiline = dialect_of!(self is MySqlDialect |
OracleDialect | GenericDialect);
+ let supports_singleline = dialect_of!(self is OracleDialect |
GenericDialect);
Review Comment:
i'm not sure `-- + foo` is a valid hint for mysql (that's why i did the
separation in the first place.) on oracle a `--+ quux` is valid.
--
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]