From 44a08713fd3a49f05318cba12de6104948ae28ab Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:35:40 -0500 Subject: [PATCH] chore: rewrite with parent --- ibis/backends/base/sqlglot/rewrites.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibis/backends/base/sqlglot/rewrites.py b/ibis/backends/base/sqlglot/rewrites.py index affce8ca05c9..db17088f3096 100644 --- a/ibis/backends/base/sqlglot/rewrites.py +++ b/ibis/backends/base/sqlglot/rewrites.py @@ -51,7 +51,7 @@ def join_chain_to_select(_): @replace( Object(Select, Object(Select)) - & ~Check(_.find(ops.WindowFunction, filter=ops.Value)) + & ~Check(_.parent.find(ops.WindowFunction, filter=ops.Value)) ) def merge_select_select(_): subs = {ops.Field(_.parent, k): v for k, v in _.parent.fields.items()}