Skip to content

Commit

Permalink
add tpch16 and tpch18
Browse files Browse the repository at this point in the history
  • Loading branch information
xudong963 committed Jul 3, 2022
1 parent bd87b52 commit c46052c
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ impl Rule for RulePushDownFilterJoin {
let filter: Filter = s_expr.plan().clone().try_into()?;
let join_expr = s_expr.child(0)?;
let mut join: LogicalInnerJoin = join_expr.plan().clone().try_into()?;
if join.join_type == JoinType::Mark {
return Ok(());
}

let rel_expr = RelExpr::with_s_expr(join_expr);
let left_prop = rel_expr.derive_relational_prop_child(0)?;
Expand Down
34 changes: 34 additions & 0 deletions tests/suites/0_stateless/13_tpch/13_0016_q16.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Brand#11 PROMO ANODIZED TIN 45 4
Brand#11 SMALL PLATED COPPER 45 4
Brand#11 STANDARD POLISHED TIN 45 4
Brand#13 MEDIUM ANODIZED STEEL 36 4
Brand#14 SMALL ANODIZED NICKEL 45 4
Brand#15 LARGE ANODIZED BRASS 45 4
Brand#21 LARGE BURNISHED COPPER 19 4
Brand#23 ECONOMY BRUSHED COPPER 9 4
Brand#25 MEDIUM PLATED BRASS 45 4
Brand#31 ECONOMY PLATED STEEL 23 4
Brand#31 PROMO POLISHED TIN 23 4
Brand#32 MEDIUM BURNISHED BRASS 49 4
Brand#33 LARGE BRUSHED TIN 36 4
Brand#33 SMALL BURNISHED NICKEL 3 4
Brand#34 LARGE PLATED BRASS 45 4
Brand#34 MEDIUM BRUSHED COPPER 9 4
Brand#34 SMALL PLATED BRASS 14 4
Brand#35 STANDARD ANODIZED STEEL 23 4
Brand#43 PROMO POLISHED BRASS 19 4
Brand#43 SMALL BRUSHED NICKEL 9 4
Brand#44 SMALL PLATED COPPER 19 4
Brand#52 MEDIUM BURNISHED TIN 45 4
Brand#52 SMALL BURNISHED NICKEL 14 4
Brand#53 MEDIUM BRUSHED COPPER 3 4
Brand#55 STANDARD ANODIZED BRASS 36 4
Brand#55 STANDARD BRUSHED COPPER 3 4
Brand#13 SMALL BRUSHED NICKEL 19 2
Brand#25 SMALL BURNISHED COPPER 3 2
Brand#43 MEDIUM ANODIZED BRASS 14 2
Brand#53 STANDARD PLATED STEEL 45 2
Brand#24 MEDIUM PLATED STEEL 19 1
Brand#51 ECONOMY POLISHED STEEL 49 1
Brand#53 LARGE BURNISHED NICKEL 23 1
Brand#54 ECONOMY ANODIZED BRASS 9 1
31 changes: 31 additions & 0 deletions tests/suites/0_stateless/13_tpch/13_0016_q16.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
set enable_planner_v2 = 1;
select
p_brand,
p_type,
p_size,
count(distinct ps_suppkey) as supplier_cnt
from
partsupp,
part
where
p_partkey = ps_partkey
and p_brand <> 'Brand#45'
and p_type not like 'MEDIUM POLISHED%'
and p_size in (49, 14, 23, 45, 19, 3, 36, 9)
and ps_suppkey not in (
select
s_suppkey
from
supplier
where
s_comment like '%Customer%Complaints%'
)
group by
p_brand,
p_type,
p_size
order by
supplier_cnt desc,
p_brand,
p_type,
p_size;
Empty file.
33 changes: 33 additions & 0 deletions tests/suites/0_stateless/13_tpch/13_0018_q18.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
set enable_planner_v2 = 1;
select
c_name,
c_custkey,
o_orderkey,
o_orderdate,
o_totalprice,
sum(l_quantity)
from
customer,
orders,
lineitem
where
o_orderkey in (
select
l_orderkey
from
lineitem
group by
l_orderkey having
sum(l_quantity) > 300
)
and c_custkey = o_custkey
and o_orderkey = l_orderkey
group by
c_name,
c_custkey,
o_orderkey,
o_orderdate,
o_totalprice
order by
o_totalprice desc,
o_orderdate;

0 comments on commit c46052c

Please sign in to comment.