Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Feb 2, 2024
1 parent ead6e58 commit d520009
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions edb/pgsql/compiler/relctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,24 +738,19 @@ def create_iterator_identity_for_path(
ctx: context.CompilerContextLevel,
apply_volatility: bool=True,
) -> None:

id_expr = pgast.FuncCall(
name=('edgedb', 'uuid_generate_v4'),
args=[],
)

if isinstance(stmt, pgast.SelectStmt):
path_id = pathctx.map_path_id(path_id, stmt.view_path_id_map)
if apply_volatility:
apply_volatility_ref(stmt, ctx=ctx)

if (path_id, 'iterator') not in stmt.path_rvar_map:
id_expr = pgast.FuncCall(
name=('edgedb', 'uuid_generate_v4'),
args=[],
)
pathctx.put_path_var(stmt, path_id, id_expr, aspect='iterator')
pathctx.put_path_bond(stmt, path_id, iterator=True)

if (path_id, 'iterator') in stmt.path_rvar_map:
return

pathctx.put_path_var(stmt, path_id, id_expr, aspect='iterator')


def get_scope(
ir_set: irast.Set, *,
Expand Down

0 comments on commit d520009

Please sign in to comment.