Skip to content

Commit

Permalink
explain: anonymize literals fix tests WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
aalexandrov committed Dec 5, 2023
1 parent 153e33e commit 78de5e5
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 73 deletions.
96 changes: 48 additions & 48 deletions test/sqllogictest/ldbc_bi.slt
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ Explained Query:
Return // { arity: 7 }
Project (#0..=#2, #4, #7, #5, #8) // { arity: 7 }
Map ((#5 / bigint_to_numeric(case when (#6 = 0) then null else #6 end)), (bigint_to_numeric(#4) / #3)) // { arity: 9 }
Reduce group_by=[#1, #2, #3, #4] aggregates=[count(*), sum(integer_to_bigint(#0{length})), count(integer_to_bigint(#0{length}))] // { arity: 7 }
Reduce group_by=[#1..=#4] aggregates=[count(*), sum(integer_to_bigint(#0{length})), count(integer_to_bigint(#0{length}))] // { arity: 7 }
CrossJoin type=differential // { arity: 5 }
implementation
%1[×]U » %0:message[×]if
Expand Down Expand Up @@ -738,7 +738,7 @@ LIMIT 100
Explained Query:
Finish order_by=[#4 desc nulls_first, #0{id} asc nulls_last] limit=100 output=[#0..=#4]
Return // { arity: 5 }
Reduce group_by=[#1{id}, #2{firstname}, #3{lastname}, #0{creationdate}] aggregates=[count(#4{messageid})] // { arity: 5 }
Reduce group_by=[#1{id}..=#3{lastname}, #0{creationdate}] aggregates=[count(#4{messageid})] // { arity: 5 }
Union // { arity: 5 }
Map (null) // { arity: 5 }
Union // { arity: 4 }
Expand Down Expand Up @@ -1589,7 +1589,7 @@ SELECT Person.id AS "person.id"
----
Explained Query:
Finish order_by=[#4 desc nulls_first, #0{id} asc nulls_last] limit=100 output=[#0..=#4]
Reduce group_by=[#0{id}, #1{firstname}, #2{lastname}] aggregates=[count(*), sum(#3)] // { arity: 5 }
Reduce group_by=[#0{id}..=#2{lastname}] aggregates=[count(*), sum(#3)] // { arity: 5 }
Project (#1..=#3, #25) // { arity: 4 }
Filter (#23{parentmessageid}) IS NULL AND (#11{creationdate} <= 2012-11-24 00:00:00 UTC) AND (#11{creationdate} >= 2012-08-29 00:00:00 UTC) AND (#1{id}) IS NOT NULL // { arity: 26 }
Join on=(#1{id} = #20{creatorpersonid} AND #12{messageid} = #24{rootpostid}) type=delta // { arity: 26 }
Expand Down Expand Up @@ -2004,15 +2004,15 @@ Explained Query:
Join on=(#0{creationdate} = #11{creationdate} AND #1{id} = #12{id} AND #2{firstname} = #13{firstname} AND #3{lastname} = #14{lastname} AND #4{gender} = #15{gender} AND #5{birthday} = #16{birthday} AND #6{locationip} = #17{locationip} AND #7{browserused} = #18{browserused} AND #8{locationcityid} = #19{locationcityid} AND #9{speaks} = #20{speaks} AND #10{email} = #21{email}) type=differential // { arity: 22 }
implementation
%0[#0..=#10]KKKKKKKKKKK » %1:person[#0..=#10]KKKKKKKKKKK
ArrangeBy keys=[[#0{creationdate}, #1{id}, #2{firstname}, #3{lastname}, #4{gender}, #5{birthday}, #6{locationip}, #7{browserused}, #8{locationcityid}, #9{speaks}, #10{email}]] // { arity: 11 }
ArrangeBy keys=[[#0{creationdate}..=#10{email}]] // { arity: 11 }
Union // { arity: 11 }
Negate // { arity: 11 }
Distinct project=[#0{creationdate}, #1{id}, #2{firstname}, #3{lastname}, #4{gender}, #5{birthday}, #6{locationip}, #7{browserused}, #8{locationcityid}, #9{speaks}, #10{email}] // { arity: 11 }
Distinct project=[#0{creationdate}..=#10{email}] // { arity: 11 }
Project (#0..=#10) // { arity: 11 }
Get l1 // { arity: 12 }
Distinct project=[#0{creationdate}, #1{id}, #2{firstname}, #3{lastname}, #4{gender}, #5{birthday}, #6{locationip}, #7{browserused}, #8{locationcityid}, #9{speaks}, #10{email}] // { arity: 11 }
Distinct project=[#0{creationdate}..=#10{email}] // { arity: 11 }
ReadIndex on=person person_id=[*** full scan ***] // { arity: 11 }
ArrangeBy keys=[[#0{creationdate}, #1{id}, #2{firstname}, #3{lastname}, #4{gender}, #5{birthday}, #6{locationip}, #7{browserused}, #8{locationcityid}, #9{speaks}, #10{email}]] // { arity: 11 }
ArrangeBy keys=[[#0{creationdate}..=#10{email}]] // { arity: 11 }
ReadIndex on=person person_id=[*** full scan ***] // { arity: 11 }
With
cte l1 =
Expand Down Expand Up @@ -2173,17 +2173,17 @@ Explained Query:
Join on=(#0{id} = #16{id} AND #1{url} = #17{url} AND #2{partofcontinentid} = #18{partofcontinentid} AND #3{id} = #19{id} AND #4{name} = #20{name} AND #5{url} = #21{url} AND #6{creationdate} = #22{creationdate} AND #7{id} = #23{id} AND #8{firstname} = #24{firstname} AND #9{lastname} = #25{lastname} AND #10{gender} = #26{gender} AND #11{birthday} = #27{birthday} AND #12{locationip} = #28{locationip} AND #13{browserused} = #29{browserused} AND #14{speaks} = #30{speaks} AND #15{email} = #31{email}) type=differential // { arity: 32 }
implementation
%0[#0..=#15]KKKKKKKKKKKKKKKK » %1:l0[#0..=#15]KKKKKKKKKKKKKKKK
ArrangeBy keys=[[#0{id}, #1{url}, #2{partofcontinentid}, #3{id}, #4{name}, #5{url}, #6{creationdate}, #7{id}, #8{firstname}, #9{lastname}, #10{gender}, #11{birthday}, #12{locationip}, #13{browserused}, #14{speaks}, #15{email}]] // { arity: 16 }
ArrangeBy keys=[[#0{id}..=#15{email}]] // { arity: 16 }
Union // { arity: 16 }
Negate // { arity: 16 }
Distinct project=[#0{id}, #1{url}, #2{partofcontinentid}, #3{id}, #4{name}, #5{url}, #6{creationdate}, #7{id}, #8{firstname}, #9{lastname}, #10{gender}, #11{birthday}, #12{locationip}, #13{browserused}, #14{speaks}, #15{email}] // { arity: 16 }
Distinct project=[#0{id}..=#15{email}] // { arity: 16 }
Project (#0..=#15) // { arity: 16 }
Filter (#0{id} = #0{id}) AND (#3{id} = #3{id}) // { arity: 17 }
Get l1 // { arity: 17 }
Distinct project=[#0{id}, #1{url}, #2{partofcontinentid}, #3{id}, #4{name}, #5{url}, #6{creationdate}, #7{id}, #8{firstname}, #9{lastname}, #10{gender}, #11{birthday}, #12{locationip}, #13{browserused}, #14{speaks}, #15{email}] // { arity: 16 }
Distinct project=[#0{id}..=#15{email}] // { arity: 16 }
Filter (#0{id} = #0{id}) AND (#3{id} = #3{id}) // { arity: 16 }
Get l0 // { arity: 16 }
ArrangeBy keys=[[#0{id}, #1{url}, #2{partofcontinentid}, #3{id}, #4{name}, #5{url}, #6{creationdate}, #7{id}, #8{firstname}, #9{lastname}, #10{gender}, #11{birthday}, #12{locationip}, #13{browserused}, #14{speaks}, #15{email}]] // { arity: 16 }
ArrangeBy keys=[[#0{id}..=#15{email}]] // { arity: 16 }
Get l0 // { arity: 16 }
cte l1 =
Project (#0..=#15, #17) // { arity: 17 }
Expand Down Expand Up @@ -2773,7 +2773,7 @@ Explained Query:
Get l17 // { arity: 6 }
With Mutually Recursive
cte l17 =
Distinct project=[#0, #1, #2{person2id}, #3, #4, #5] // { arity: 6 }
Distinct project=[#0..=#5] // { arity: 6 }
Union // { arity: 6 }
Map (0) // { arity: 6 }
Union // { arity: 5 }
Expand Down Expand Up @@ -2855,11 +2855,11 @@ Explained Query:
Join on=(#0 = #6 = #12 AND #1 = #7 = #13 AND #2 = #8 = #14 AND #3 = #9 AND #4 = #10 AND #5 = #11) type=differential // { arity: 16 }
implementation
%1:l10[#0..=#5]UKKKKKK » %0:l17[#0..=#5]KKKKKK » %2[#0..=#2]KKK
ArrangeBy keys=[[#0, #1, #2, #3, #4, #5]] // { arity: 6 }
ArrangeBy keys=[[#0..=#5]] // { arity: 6 }
Get l17 // { arity: 6 }
ArrangeBy keys=[[#0, #1, #2, #3, #4, #5]] // { arity: 6 }
ArrangeBy keys=[[#0..=#5]] // { arity: 6 }
Get l10 // { arity: 6 }
ArrangeBy keys=[[#0, #1, #2]] // { arity: 4 }
ArrangeBy keys=[[#0..=#2]] // { arity: 4 }
Union // { arity: 4 }
Map (true) // { arity: 4 }
Get l12 // { arity: 3 }
Expand All @@ -2868,30 +2868,30 @@ Explained Query:
Join on=(#0 = #3 AND #1 = #4 AND #2 = #5) type=differential // { arity: 6 }
implementation
%1:l11[#0..=#2]UKKK » %0[#0..=#2]KKK
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Union // { arity: 3 }
Negate // { arity: 3 }
Get l12 // { arity: 3 }
Get l11 // { arity: 3 }
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Get l11 // { arity: 3 }
cte l12 =
Project (#0..=#2) // { arity: 3 }
Join on=(#0 = #3 AND #1 = #4 AND #2 = #5) type=differential // { arity: 6 }
implementation
%1[#0..=#2]UKKKA » %0:l11[#0..=#2]UKKK
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Get l11 // { arity: 3 }
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
Distinct project=[#0, #1, #2] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Distinct project=[#0..=#2] // { arity: 3 }
Project (#0..=#2) // { arity: 3 }
Get l9 // { arity: 5 }
cte l11 =
Distinct project=[#0, #1, #2] // { arity: 3 }
Distinct project=[#0..=#2] // { arity: 3 }
Project (#0..=#2) // { arity: 3 }
Get l10 // { arity: 6 }
cte l10 =
Distinct project=[#0, #1, #2, #3, #4, #5] // { arity: 6 }
Distinct project=[#0..=#5] // { arity: 6 }
Get l17 // { arity: 6 }
cte l9 =
TopK order_by=[#3 asc nulls_last] limit=1000 // { arity: 5 }
Expand Down Expand Up @@ -3564,7 +3564,7 @@ Explained Query:
With Mutually Recursive
cte l0 =
Reduce group_by=[#0{id}, #1{id}] aggregates=[min(#2)] // { arity: 3 }
Distinct project=[#0{id}, #1{id}, #2] // { arity: 3 }
Distinct project=[#0{id}..=#2] // { arity: 3 }
Union // { arity: 3 }
Project (#1, #1, #12) // { arity: 3 }
Map (0) // { arity: 13 }
Expand Down Expand Up @@ -3867,7 +3867,7 @@ Explained Query:
Get l8 // { arity: 6 }
With Mutually Recursive
cte l8 =
Distinct project=[#0, #1{id}, #2{id}, #3, #4, #5] // { arity: 6 }
Distinct project=[#0..=#5] // { arity: 6 }
Union // { arity: 6 }
Map (0) // { arity: 6 }
Union // { arity: 5 }
Expand Down Expand Up @@ -3931,7 +3931,7 @@ Explained Query:
Get l4 // { arity: 5 }
cte l4 =
TopK group_by=[#0, #1, #2{dst}] order_by=[#3 asc nulls_last, #4 desc nulls_first] limit=1 // { arity: 5 }
Distinct project=[#0, #1, #2{dst}, #3, #4] // { arity: 5 }
Distinct project=[#0..=#4] // { arity: 5 }
Union // { arity: 5 }
Project (#3, #4, #1, #7, #8) // { arity: 5 }
Map ((#6 + bigint_to_double(#2{w})), false) // { arity: 9 }
Expand All @@ -3949,11 +3949,11 @@ Explained Query:
Join on=(#0 = #6 = #12 AND #1 = #7 = #13 AND #2 = #8 = #14 AND #3 = #9 AND #4 = #10 AND #5 = #11) type=differential // { arity: 16 }
implementation
%1:l1[#0..=#5]UKKKKKK » %0:l8[#0..=#5]KKKKKK » %2[#0..=#2]KKK
ArrangeBy keys=[[#0, #1, #2, #3, #4, #5]] // { arity: 6 }
ArrangeBy keys=[[#0..=#5]] // { arity: 6 }
Get l8 // { arity: 6 }
ArrangeBy keys=[[#0, #1, #2, #3, #4, #5]] // { arity: 6 }
ArrangeBy keys=[[#0..=#5]] // { arity: 6 }
Get l1 // { arity: 6 }
ArrangeBy keys=[[#0, #1, #2]] // { arity: 4 }
ArrangeBy keys=[[#0..=#2]] // { arity: 4 }
Union // { arity: 4 }
Map (true) // { arity: 4 }
Get l3 // { arity: 3 }
Expand All @@ -3962,32 +3962,32 @@ Explained Query:
Join on=(#0 = #3 AND #1 = #4 AND #2 = #5) type=differential // { arity: 6 }
implementation
%1:l2[#0..=#2]UKKK » %0[#0..=#2]KKK
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Union // { arity: 3 }
Negate // { arity: 3 }
Get l3 // { arity: 3 }
Get l2 // { arity: 3 }
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Get l2 // { arity: 3 }
cte l3 =
Project (#0..=#2) // { arity: 3 }
Join on=(#0 = #3 AND #1 = #4 AND #2 = #5) type=differential // { arity: 6 }
implementation
%1[#0..=#2]UKKKA » %0:l2[#0..=#2]UKKK
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Filter (#1) IS NOT NULL AND (#2) IS NOT NULL // { arity: 3 }
Get l2 // { arity: 3 }
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
Distinct project=[#0, #1, #2] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Distinct project=[#0..=#2] // { arity: 3 }
Project (#0..=#2) // { arity: 3 }
Filter (#1) IS NOT NULL AND (#2) IS NOT NULL // { arity: 5 }
Get l0 // { arity: 5 }
cte l2 =
Distinct project=[#0, #1, #2] // { arity: 3 }
Distinct project=[#0..=#2] // { arity: 3 }
Project (#0..=#2) // { arity: 3 }
Get l1 // { arity: 6 }
cte l1 =
Distinct project=[#0, #1, #2, #3, #4, #5] // { arity: 6 }
Distinct project=[#0..=#5] // { arity: 6 }
Get l8 // { arity: 6 }
cte l0 =
TopK order_by=[#3 asc nulls_last] limit=1000 // { arity: 5 }
Expand Down Expand Up @@ -4317,7 +4317,7 @@ Explained Query:
Map (10995116285979) // { arity: 4 }
Reduce group_by=[#0{dst}, #2] aggregates=[min(#1)] // { arity: 3 }
Reduce group_by=[#0{dst}, #2] aggregates=[min(#1)] // { arity: 3 }
Distinct project=[#0{dst}, #1, #2] // { arity: 3 }
Distinct project=[#0{dst}..=#2] // { arity: 3 }
Union // { arity: 3 }
Project (#4, #6, #7) // { arity: 3 }
Map ((#1 + integer_to_bigint(#5{w})), (#2 + 1)) // { arity: 8 }
Expand Down Expand Up @@ -4464,11 +4464,11 @@ Explained Query:
Get l11 // { arity: 6 }
With Mutually Recursive
cte l11 =
Distinct project=[#0, #1{personid}, #2{personid}, #3, #4, #5] // { arity: 6 }
Distinct project=[#0..=#5] // { arity: 6 }
Union // { arity: 6 }
Project (#0..=#2, #4, #3, #5) // { arity: 6 }
Map (false, 0, 0) // { arity: 6 }
Distinct project=[#0, #1{personid}, #2{personid}] // { arity: 3 }
Distinct project=[#0..=#2{personid}] // { arity: 3 }
Union // { arity: 3 }
Project (#1, #0, #0) // { arity: 3 }
Map (10995116285979, false) // { arity: 2 }
Expand Down Expand Up @@ -4559,11 +4559,11 @@ Explained Query:
Join on=(#0 = #6 = #12 AND #1 = #7 = #13 AND #2 = #8 = #14 AND #3 = #9 AND #4 = #10 AND #5 = #11) type=differential // { arity: 16 }
implementation
%1:l4[#0..=#5]UKKKKKK » %0:l11[#0..=#5]KKKKKK » %2[#0..=#2]KKK
ArrangeBy keys=[[#0, #1, #2, #3, #4, #5]] // { arity: 6 }
ArrangeBy keys=[[#0..=#5]] // { arity: 6 }
Get l11 // { arity: 6 }
ArrangeBy keys=[[#0, #1, #2, #3, #4, #5]] // { arity: 6 }
ArrangeBy keys=[[#0..=#5]] // { arity: 6 }
Get l4 // { arity: 6 }
ArrangeBy keys=[[#0, #1, #2]] // { arity: 4 }
ArrangeBy keys=[[#0..=#2]] // { arity: 4 }
Union // { arity: 4 }
Map (true) // { arity: 4 }
Get l6 // { arity: 3 }
Expand All @@ -4572,30 +4572,30 @@ Explained Query:
Join on=(#0 = #3 AND #1 = #4 AND #2 = #5) type=differential // { arity: 6 }
implementation
%1:l5[#0..=#2]UKKK » %0[#0..=#2]KKK
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Union // { arity: 3 }
Negate // { arity: 3 }
Get l6 // { arity: 3 }
Get l5 // { arity: 3 }
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Get l5 // { arity: 3 }
cte l6 =
Project (#0..=#2) // { arity: 3 }
Join on=(#0 = #3 AND #1 = #4 AND #2 = #5) type=differential // { arity: 6 }
implementation
%1[#0..=#2]UKKKA » %0:l5[#0..=#2]UKKK
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Get l5 // { arity: 3 }
ArrangeBy keys=[[#0, #1, #2]] // { arity: 3 }
Distinct project=[#0, #1, #2] // { arity: 3 }
ArrangeBy keys=[[#0..=#2]] // { arity: 3 }
Distinct project=[#0..=#2] // { arity: 3 }
Project (#0..=#2) // { arity: 3 }
Get l3 // { arity: 5 }
cte l5 =
Distinct project=[#0, #1, #2] // { arity: 3 }
Distinct project=[#0..=#2] // { arity: 3 }
Project (#0..=#2) // { arity: 3 }
Get l4 // { arity: 6 }
cte l4 =
Distinct project=[#0, #1, #2, #3, #4, #5] // { arity: 6 }
Distinct project=[#0..=#5] // { arity: 6 }
Get l11 // { arity: 6 }
cte l3 =
TopK order_by=[#3 asc nulls_last] limit=1000 // { arity: 5 }
Expand Down
Loading

0 comments on commit 78de5e5

Please sign in to comment.