Skip to content

Commit fdc788f

Browse files
committed
Fix rewrites making UPDATE infer as ONE (#8800)
This was caused by some code doing something nonsensical, with a comment above it that I wrote saying that it must be wrong but made a particular test pass. That test still passes if I remove it, so all right. Fixes #8791.
1 parent 50d2500 commit fdc788f

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

edb/edgeql/compiler/viewgen.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,11 +1222,6 @@ def _compile_rewrites_for_stype(
12221222
scopectx.iterator_path_ids |= {anchor.path_id}
12231223
scopectx.anchors[key] = anchor
12241224

1225-
# XXX: I am pretty sure this must be wrong, but we get
1226-
# a failure without due to volatility issues in
1227-
# test_edgeql_rewrites_16
1228-
scopectx.env.singletons.append(anchors.subject_set.path_id)
1229-
12301225
ctx.path_scope.factoring_allowlist.add(anchors.subject_set.path_id)
12311226

12321227
# prepare expression

tests/test_edgeql_rewrites.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,15 @@ async def test_edgeql_rewrites_32(self):
11811181
[{'title': 'updated'}] * 2,
11821182
)
11831183

1184+
async def test_edgeql_rewrites_33(self):
1185+
async with self.assertRaisesRegexTx(
1186+
edgedb.InterfaceError,
1187+
r"more than one element"
1188+
):
1189+
await self.con.query_single('''
1190+
update Asdf set {}
1191+
''')
1192+
11841193
async def test_edgeql_rewrites_triggers_01(self):
11851194
await self.con.execute('''
11861195
create type Pidgeon {

0 commit comments

Comments
 (0)