From 03e4c77efa9dc7292b2470e5188df705240f1cfd Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Tue, 30 Jan 2024 15:27:46 -0800 Subject: [PATCH] Don't unconditionally populate 'iterator' aspect in include_rvar That causes us to have lots of incorrect 'iterator' aspects in rvar maps. Instead, just properly populate the aspects explicitly at the one relevant call site. This might help with #6714. --- edb/pgsql/compiler/dml.py | 1 + edb/pgsql/compiler/relctx.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/edb/pgsql/compiler/dml.py b/edb/pgsql/compiler/dml.py index 11cd9158f71..077eb53a6fc 100644 --- a/edb/pgsql/compiler/dml.py +++ b/edb/pgsql/compiler/dml.py @@ -382,6 +382,7 @@ def merge_iterator( put_iterator_bond(iterator, select) relctx.include_rvar( select, iterator_rvar, + aspects=('source', 'value', iterator.aspect), path_id=iterator.path_id, overwrite_path_rvar=True, ctx=ctx) diff --git a/edb/pgsql/compiler/relctx.py b/edb/pgsql/compiler/relctx.py index 552fbc3f7b6..43ba9cf7c98 100644 --- a/edb/pgsql/compiler/relctx.py +++ b/edb/pgsql/compiler/relctx.py @@ -212,7 +212,7 @@ def include_rvar( Compiler context. """ if aspects is None: - aspects = ('value', 'iterator') + aspects = ('value',) if path_id.is_objtype_path(): if isinstance(rvar, pgast.RangeSubselect): if pathctx.has_path_aspect(