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


##########
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:
   Not sure what you mean. Are you saying I should split out adding DISTINCTROW 
as an alias for DISTINCT into a separate PR?



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