mvzink commented on code in PR #2172:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2172#discussion_r2766467608
##########
src/parser/mod.rs:
##########
@@ -4906,14 +4906,17 @@ impl<'a> Parser<'a> {
/// Parse either `ALL`, `DISTINCT` or `DISTINCT ON (...)`. Returns
[`None`] if `ALL` is parsed
/// and results in a [`ParserError`] if both `ALL` and `DISTINCT` are
found.
pub fn parse_all_or_distinct(&mut self) -> Result<Option<Distinct>,
ParserError> {
- let loc = self.peek_token().span.start;
let all = self.parse_keyword(Keyword::ALL);
let distinct = self.parse_keyword(Keyword::DISTINCT);
if !distinct {
return Ok(None);
}
if all {
- return parser_err!("Cannot specify both ALL and
DISTINCT".to_string(), loc);
+ self.prev_token();
+ return self.expected(
+ "ALL alone without DISTINCT or DISTINCTROW",
Review Comment:
Per [other
comment](https://github.com/apache/datafusion-sqlparser-rs/pull/2172#discussion_r2766466843):
this aliasing now only happens in the MySQL specific subparser.
--
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]