Skip to content

Commit

Permalink
cqa
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Feb 2, 2024
1 parent d520009 commit 3effb2d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion edb/pgsql/compiler/relctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ def create_iterator_identity_for_path(
if apply_volatility:
apply_volatility_ref(stmt, ctx=ctx)

if (path_id, 'iterator') not in stmt.path_rvar_map:
if (path_id, 'iterator') not in stmt.path_namespace:
id_expr = pgast.FuncCall(
name=('edgedb', 'uuid_generate_v4'),
args=[],
Expand Down
4 changes: 2 additions & 2 deletions edb/pgsql/delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -4588,7 +4588,7 @@ def _alter_pointer_type(self, pointer, schema, orig_schema, context):
aux_ptr_col = None

source_rel_alias = f'source_{uuidgen.uuid1mc()}'
source_rel_alias = f'source_rel' # DEBUG
source_rel_alias = f'source_rel' # DEBUG
source_rel = f'''SELECT *, ctid FROM {tab}'''
source_iter_col = 'id'
if ptr_table:
Expand Down Expand Up @@ -4778,7 +4778,7 @@ def _compile_conversion_expr(
Contract when produce_ctes=True:
- Must be provided with alias of "iterator" rel - the relation that
contains a row for each of the evaluations for the USING expression.
- Must be provided with alias of "source" rel - the relation that
- Must be provided with alias of "source" rel - the relation that
contains all columns of the subject ObjectType.
- Result is SQL string that contains CTEs, last of which has following
signature: _conv_rel (val, iter)
Expand Down
2 changes: 0 additions & 2 deletions edb/schema/pointers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2440,8 +2440,6 @@ def _alter_begin(
schema: s_schema.Schema,
context: sd.CommandContext,
) -> s_schema.Schema:
from edb.ir import utils as irutils

orig_schema = schema
orig_rec = context.current().enable_recursion
context.current().enable_recursion = False
Expand Down
8 changes: 5 additions & 3 deletions tests/test_edgeql_ddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3036,9 +3036,11 @@ async def test_edgeql_ddl_ptr_using_dml_03(self):
"""
)

# only one Goodbye object, as only one link exists, so only one cast is
# performed
await self.assert_query_result(
'select Goodbye',
[{}] # a single object, as only one link exists and needs to be cast
[{}]
)
await self.assert_query_result(
'select World { hell }',
Expand Down Expand Up @@ -3082,7 +3084,7 @@ async def test_edgeql_ddl_ptr_using_dml_05(self):
"""
)
await self.assert_query_result(
'SELECT World { foo }',
'SELECT World { foo }',
[{"foo": "hello"}]
)

Expand All @@ -3095,7 +3097,7 @@ async def test_edgeql_ddl_ptr_using_dml_05(self):
"""
)
await self.assert_query_result(
'SELECT World { foo, hell: { bar } }',
'SELECT World { foo, hell: { bar } }',
[{"foo": "hello", "hell": {"bar": "hello world"}}]
)

Expand Down

0 comments on commit 3effb2d

Please sign in to comment.