We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1INTERSECT DISTINCT
1 parent 16c9401 commit ac547c0Copy full SHA for ac547c0
mindsdb_sql_parser/parser.py
@@ -1069,10 +1069,13 @@ def union(self, p):
1069
@_('select INTERSECT select',
1070
'union INTERSECT select',
1071
'select INTERSECT ALL select',
1072
- 'union INTERSECT ALL select')
+ 'union INTERSECT ALL select',
1073
+ 'select INTERSECT DISTINCT select',
1074
+ 'union INTERSECT DISTINCT select')
1075
def union(self, p):
1076
unique = not hasattr(p, 'ALL')
- return Intersect(left=p[0], right=p[2] if unique else p[3], unique=unique)
1077
+ return Intersect(left=p[0], right=p[-1], unique=unique)
1078
+
1079
@_('select EXCEPT select',
1080
'union EXCEPT select',
1081
'select EXCEPT ALL select',
0 commit comments