From 2484dcb9bf8402d9ac989cee29bcaf3b99040d8a Mon Sep 17 00:00:00 2001 From: dnwpark Date: Fri, 15 Nov 2024 17:32:06 -0500 Subject: [PATCH] Remove factoring from insert with volatile tests. (#7999) --- tests/test_edgeql_insert.py | 314 +++++++++++++++--------------------- 1 file changed, 128 insertions(+), 186 deletions(-) diff --git a/tests/test_edgeql_insert.py b/tests/test_edgeql_insert.py index 7123ddb9d9a..498ddbbfb21 100644 --- a/tests/test_edgeql_insert.py +++ b/tests/test_edgeql_insert.py @@ -5820,7 +5820,6 @@ async def test_edgeql_insert_cardinality_assertion(self): } ''') - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_01(self): await self.con.execute(''' WITH name := random(), @@ -5828,11 +5827,14 @@ async def test_edgeql_insert_volatile_01(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_02(self): await self.con.execute(''' WITH @@ -5842,11 +5844,14 @@ async def test_edgeql_insert_volatile_02(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_03(self): await self.con.execute(''' WITH @@ -5856,11 +5861,14 @@ async def test_edgeql_insert_volatile_03(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_04(self): await self.con.execute(''' WITH @@ -5870,11 +5878,14 @@ async def test_edgeql_insert_volatile_04(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_05(self): await self.con.execute(''' WITH name := random(), @@ -5882,11 +5893,14 @@ async def test_edgeql_insert_volatile_05(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_06(self): await self.con.execute(''' WITH @@ -5896,11 +5910,14 @@ async def test_edgeql_insert_volatile_06(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_07(self): await self.con.execute(''' WITH @@ -5910,11 +5927,14 @@ async def test_edgeql_insert_volatile_07(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_08(self): await self.con.execute(''' WITH @@ -5924,11 +5944,14 @@ async def test_edgeql_insert_volatile_08(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_09(self): await self.con.execute(''' WITH x := random() @@ -5939,11 +5962,14 @@ async def test_edgeql_insert_volatile_09(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_10(self): await self.con.execute(''' WITH x := "!" @@ -5954,11 +5980,14 @@ async def test_edgeql_insert_volatile_10(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_11(self): await self.con.execute(''' WITH x := random() @@ -5969,11 +5998,14 @@ async def test_edgeql_insert_volatile_11(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_12(self): await self.con.execute(''' WITH @@ -5986,37 +6018,43 @@ async def test_edgeql_insert_volatile_12(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) + await self.assert_query_result( + 'SELECT count(distinct(Person.name))', + [1], + ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_13(self): await self.con.execute(''' WITH x := ( WITH name := random(), - INSERT Person { name := name, tag := name } + INSERT Person { name := name, tag := name, tag2 := name } ) SELECT ( - INSERT Person { name := x.name ++ "!", tag := x.tag } + INSERT Person { + name := x.name ++ "!", + tag := x.tag ++ "!", + tag2 := x.tag2, + } ); ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', + 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_14(self): await self.con.execute(''' WITH @@ -6035,23 +6073,18 @@ async def test_edgeql_insert_volatile_14(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_15(self): await self.con.execute(''' WITH @@ -6070,23 +6103,18 @@ async def test_edgeql_insert_volatile_15(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_16(self): await self.con.execute(''' WITH @@ -6105,23 +6133,18 @@ async def test_edgeql_insert_volatile_16(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_17(self): await self.con.execute(''' WITH @@ -6140,23 +6163,18 @@ async def test_edgeql_insert_volatile_17(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_18(self): await self.con.execute(''' WITH @@ -6175,23 +6193,18 @@ async def test_edgeql_insert_volatile_18(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_19(self): await self.con.execute(''' WITH @@ -6210,23 +6223,18 @@ async def test_edgeql_insert_volatile_19(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_20(self): await self.con.execute(''' WITH @@ -6245,23 +6253,18 @@ async def test_edgeql_insert_volatile_20(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_21(self): await self.con.execute(''' WITH @@ -6280,23 +6283,18 @@ async def test_edgeql_insert_volatile_21(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_22(self): await self.con.execute(''' WITH @@ -6315,23 +6313,18 @@ async def test_edgeql_insert_volatile_22(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_23(self): await self.con.execute(''' WITH @@ -6350,23 +6343,18 @@ async def test_edgeql_insert_volatile_23(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_24(self): await self.con.execute(''' WITH @@ -6385,23 +6373,18 @@ async def test_edgeql_insert_volatile_24(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_25(self): await self.con.execute(''' WITH @@ -6420,23 +6403,18 @@ async def test_edgeql_insert_volatile_25(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_26(self): await self.con.execute(''' WITH @@ -6467,23 +6445,18 @@ async def test_edgeql_insert_volatile_26(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [3], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [3], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [2], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_27(self): await self.con.execute(''' WITH x := "!" @@ -6498,15 +6471,14 @@ async def test_edgeql_insert_volatile_27(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) await self.assert_query_result( - 'SELECT all(Note.name = Person.note)', + 'WITH N := (Note {ok := .name = .note}) SELECT all(N.ok)', [True], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_28(self): await self.con.execute(''' WITH x := random(), @@ -6521,15 +6493,14 @@ async def test_edgeql_insert_volatile_28(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) await self.assert_query_result( - 'SELECT all(Note.name = Person.note)', + 'WITH N := (Note {ok := .name = .note}) SELECT all(N.ok)', [True], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_29(self): await self.con.execute(''' WITH x := "!", @@ -6544,15 +6515,14 @@ async def test_edgeql_insert_volatile_29(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) await self.assert_query_result( - 'SELECT all(Note.name = Person.note)', + 'WITH N := (Note {ok := .name = .note}) SELECT all(N.ok)', [True], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_30(self): await self.con.execute(''' WITH x := random(), @@ -6567,15 +6537,14 @@ async def test_edgeql_insert_volatile_30(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) await self.assert_query_result( - 'SELECT all(Note.name = Person.note)', + 'WITH N := (Note {ok := .name = .note}) SELECT all(N.ok)', [True], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_31(self): await self.con.execute(''' WITH x := random(), @@ -6590,15 +6559,14 @@ async def test_edgeql_insert_volatile_31(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', [True], ) await self.assert_query_result( - 'SELECT all(Note.name = Person.note)', + 'WITH N := (Note {ok := .name = .note}) SELECT all(N.ok)', [True], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_32(self): await self.con.execute(''' FOR name in {random(), random()} @@ -6606,15 +6574,14 @@ async def test_edgeql_insert_volatile_32(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_33(self): await self.con.execute(''' WITH x := "!" @@ -6626,8 +6593,8 @@ async def test_edgeql_insert_volatile_33(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', @@ -6638,7 +6605,6 @@ async def test_edgeql_insert_volatile_33(self): [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_34(self): await self.con.execute(''' WITH x := random() @@ -6650,8 +6616,8 @@ async def test_edgeql_insert_volatile_34(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', @@ -6662,7 +6628,6 @@ async def test_edgeql_insert_volatile_34(self): [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_35(self): await self.con.execute(''' WITH x := random() @@ -6674,8 +6639,8 @@ async def test_edgeql_insert_volatile_35(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', @@ -6686,7 +6651,6 @@ async def test_edgeql_insert_volatile_35(self): [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_36(self): await self.con.execute(''' WITH x := "!" @@ -6697,8 +6661,8 @@ async def test_edgeql_insert_volatile_36(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', @@ -6709,7 +6673,6 @@ async def test_edgeql_insert_volatile_36(self): [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_37(self): await self.con.execute(''' WITH x := random() @@ -6720,8 +6683,8 @@ async def test_edgeql_insert_volatile_37(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', @@ -6732,7 +6695,6 @@ async def test_edgeql_insert_volatile_37(self): [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_38(self): await self.con.execute(''' WITH x := random() @@ -6743,8 +6705,8 @@ async def test_edgeql_insert_volatile_38(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', @@ -6755,7 +6717,6 @@ async def test_edgeql_insert_volatile_38(self): [1], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_39(self): await self.con.execute(''' FOR x in {"A", "B"} @@ -6766,23 +6727,18 @@ async def test_edgeql_insert_volatile_39(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [2], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_40(self): await self.con.execute(''' FOR x in {random(), random()} @@ -6793,23 +6749,18 @@ async def test_edgeql_insert_volatile_40(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [2], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_41(self): await self.con.execute(''' FOR x in {random(), random()} @@ -6820,23 +6771,18 @@ async def test_edgeql_insert_volatile_41(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', [2], ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], - ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))', [2], ) - @tb.needs_factoring_weakly async def test_edgeql_insert_volatile_42(self): await self.con.execute(''' WITH @@ -6856,16 +6802,12 @@ async def test_edgeql_insert_volatile_42(self): ''') await self.assert_query_result( - 'SELECT all(Person.name = Person.tag)', - [True, True], + 'WITH P := (Person {ok := .name = .tag}) SELECT all(P.ok)', + [True], ) await self.assert_query_result( 'SELECT count(distinct(Person.name))', - [2], - ) - await self.assert_query_result( - 'SELECT count(distinct(Person.tag))', - [2], + [3], ) await self.assert_query_result( 'SELECT count(distinct(Person.tag2))',