Skip to content

Commit 70146e8

Browse files
committed
cte with union
1 parent 6c93ee0 commit 70146e8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

mindsdb_sql/parser/dialects/mindsdb/parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,13 +1050,14 @@ def ctes(self, p):
10501050
]
10511051
return ctes
10521052

1053-
@_('WITH identifier cte_columns_or_nothing AS LPAREN select RPAREN')
1053+
@_('WITH identifier cte_columns_or_nothing AS LPAREN select RPAREN',
1054+
'WITH identifier cte_columns_or_nothing AS LPAREN union RPAREN')
10541055
def ctes(self, p):
10551056
return [
10561057
CommonTableExpression(
10571058
name=p.identifier,
10581059
columns=p.cte_columns_or_nothing,
1059-
query=p.select)
1060+
query=p[5])
10601061
]
10611062

10621063
@_('empty')

0 commit comments

Comments
 (0)