mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-12 06:52:02 +00:00
Add support for UNION DISTINCT BY NAME syntax (#997)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
parent
c03586b727
commit
5c10668dbb
3 changed files with 89 additions and 152 deletions
|
@ -5696,7 +5696,9 @@ impl<'a> Parser<'a> {
|
|||
pub fn parse_set_quantifier(&mut self, op: &Option<SetOperator>) -> SetQuantifier {
|
||||
match op {
|
||||
Some(SetOperator::Union) => {
|
||||
if self.parse_keywords(&[Keyword::BY, Keyword::NAME]) {
|
||||
if self.parse_keywords(&[Keyword::DISTINCT, Keyword::BY, Keyword::NAME]) {
|
||||
SetQuantifier::DistinctByName
|
||||
} else if self.parse_keywords(&[Keyword::BY, Keyword::NAME]) {
|
||||
SetQuantifier::ByName
|
||||
} else if self.parse_keyword(Keyword::ALL) {
|
||||
if self.parse_keywords(&[Keyword::BY, Keyword::NAME]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue