From 64622e9db124272f79bf7412f86f4ef0684bdc27 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 11 Nov 2024 14:18:16 +0300 Subject: [PATCH] fix render select from union --- mindsdb_sql/render/sqlalchemy_render.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindsdb_sql/render/sqlalchemy_render.py b/mindsdb_sql/render/sqlalchemy_render.py index 929f262..c4c31aa 100644 --- a/mindsdb_sql/render/sqlalchemy_render.py +++ b/mindsdb_sql/render/sqlalchemy_render.py @@ -387,7 +387,7 @@ def to_table(self, node): if node.alias: table = aliased(table, name=self.get_alias(node.alias)) - elif isinstance(node, ast.Select): + elif isinstance(node, (ast.Select, ast.Union, ast.Intersect, ast.Except)): sub_stmt = self.prepare_select(node) alias = None if node.alias: