Skip to content

Commit

Permalink
cte with union
Browse files Browse the repository at this point in the history
  • Loading branch information
ea-rus committed Nov 10, 2024
1 parent 6c93ee0 commit 70146e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mindsdb_sql/parser/dialects/mindsdb/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,13 +1050,14 @@ def ctes(self, p):
]
return ctes

@_('WITH identifier cte_columns_or_nothing AS LPAREN select RPAREN')
@_('WITH identifier cte_columns_or_nothing AS LPAREN select RPAREN',
'WITH identifier cte_columns_or_nothing AS LPAREN union RPAREN')
def ctes(self, p):
return [
CommonTableExpression(
name=p.identifier,
columns=p.cte_columns_or_nothing,
query=p.select)
query=p[5])
]

@_('empty')
Expand Down

0 comments on commit 70146e8

Please sign in to comment.