Skip to content

Commit

Permalink
Fix tpch pg queries, make they as yql ones (ydb-platform#11782)
Browse files Browse the repository at this point in the history
  • Loading branch information
iddqdex authored Nov 20, 2024
1 parent 2dd1cac commit dd01e45
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ydb/library/benchmarks/queries/tpch/pg/q15.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ create view revenue0 (supplier_no, total_revenue) as
{{lineitem}}
where
l_shipdate >= date '1996-01-01'
and l_shipdate < date '1995-01-01' + interval '3' month
and l_shipdate < date '1996-01-01' + interval '3' month
group by
l_suppkey;

Expand Down
2 changes: 1 addition & 1 deletion ydb/library/benchmarks/queries/tpch/pg/q2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ from
where
p_partkey = ps_partkey
and s_suppkey = ps_suppkey
and p_size = 10
and p_size = 15
and p_type like '%BRASS'
and s_nationkey = n_nationkey
and n_regionkey = r_regionkey
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/benchmarks/queries/tpch/pg/q22.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ from
{{customer}}
where
substring(c_phone from 1 for 2) in
('13', '31', '23', '29', '30', '28', '17')
('13', '31', '23', '29', '30', '18', '17')
and c_acctbal > (
select
avg(c_acctbal)
Expand All @@ -26,7 +26,7 @@ from
where
c_acctbal > 0.00
and substring(c_phone from 1 for 2) in
('13', '31', '23', '29', '30', '28', '17')
('13', '31', '23', '29', '30', '18', '17')
)
and not exists (
select
Expand Down
2 changes: 1 addition & 1 deletion ydb/library/benchmarks/queries/tpch/pg/q6.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ from
where
l_shipdate >= date '1994-01-01'
and l_shipdate < date '1994-01-01' + interval '1' year
and l_discount between 0.01 - 0.0100001 and 0.01 + 0.0100001
and l_discount between 0.06 - 0.0100001 and 0.06 + 0.0100001
and l_quantity < 24;
2 changes: 1 addition & 1 deletion ydb/library/benchmarks/queries/tpch/yql/q10.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on
c.c_custkey = o.o_custkey
where
o.o_orderdate >= $border
and o.o_orderdate < ($border + Interval("P90D"))
and o.o_orderdate < ($border + Interval("P92D"))
);
$join2 = (
select
Expand Down

0 comments on commit dd01e45

Please sign in to comment.