repr should be very fast repr should allow for recreation of the object but this may not be practical
There’s an obvious upper limit of some number N
For medium sized queries: yes – view of the structure is nice to have
For mega-query WTF do we do
Are mega-queries wide/deep or both?
More likely to be deep / long than to have any huge number of columns
Placeholder of ... for no changes?
Only show columns in subsequent projections that differ from previous selection
Do we conk out at a certain depth / length?
r0 := AlchemyTable[part]
p_partkey int32!
p_mfgr string!
p_type string!
p_size int32!
...
r1 := AlchemyTable[partsupp]
ps_partkey int32!
ps_suppkey int32!
ps_availqty int32!
ps_supplycost decimal(15, 2)?
...
r10 := Selection[r9]
sort_keys:
r9.s_acctbal.desc()
r9.n_name
r9.s_name
r9.p_partkey
r2 := AlchemyTable[supplier]
s_suppkey int32!
s_name string!
s_address string!
s_nationkey int32!
s_phone string!
s_acctbal decimal(15, 2)
...
r3 := AlchemyTable[nation]
n_nationkey int32!
n_name string!
n_regionkey int32!
...
r4 := AlchemyTable[region]
r_regionkey int32!
r_name string!
...
r5 := InnerJoin[r0, r1] r0.p_partkey == r1.ps_partkey
InnerJoin[..., r2] r2.s_suppkey == r1.ps_suppkey
InnerJoin[..., r3] r2.s_nationkey == r3.n_nationkey
InnerJoin[..., r4] r3.n_regionkey == r4.r_regionkey
r6 := InnerJoin[r1, r2] r2.s_suppkey == r1.ps_suppkey
InnerJoin[..., r3] r2.s_nationkey == r3.n_nationkey
InnerJoin[..., r4] r3.n_regionkey == r4.r_regionkey
r7 := Selection[r6]
predicates:
r6.r_name == 'EUROPE'
r5.p_partkey == r6.ps_partkey
r8 := Selection[r5]
predicates:
r5.p_size == 25
r5.p_type LIKE "%BRASS"
r5.r_name == "EUROPE"
r5.ps_supplycost == r7.ps_supplycost.min()
r9 := Selection[r8]
selections[r8]:
s_acctbal
s_name
n_name
p_partkey
p_mfgr
s_address
s_phone
s_comment
Limit[r10, n=100]