We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 370d119 commit bfbd008Copy full SHA for bfbd008
1 file changed
src/parser/mod.rs
@@ -9970,15 +9970,13 @@ impl<'a> Parser<'a> {
9970
&mut self,
9971
operator_name: &str,
9972
) -> Result<SetQuantifier, ParserError> {
9973
- if self.parse_keywords(&[Keyword::DISTINCT, Keyword::BY, Keyword::NAME]) {
9974
- Ok(SetQuantifier::DistinctByName)
9975
- } else if self.parse_keyword(Keyword::DISTINCT) {
9976
- Ok(SetQuantifier::Distinct)
9977
- } else {
9978
- Err(ParserError::ParserError(format!(
+ let quantifier = self.parse_set_quantifier(&Some(SetOperator::Intersect));
+ match quantifier {
+ SetQuantifier::Distinct | SetQuantifier::DistinctByName => Ok(quantifier),
+ _ => Err(ParserError::ParserError(format!(
9979
"{} pipe operator requires DISTINCT modifier",
9980
operator_name
9981
- )))
+ ))),
9982
}
9983
9984
0 commit comments