Skip to content

Commit 3a2566e

Browse files
authored
Upscale some results in order to simplify comparison with pg-version (#6130)
1 parent 4ec8b28 commit 3a2566e

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

ydb/library/benchmarks/gen_queries/consts.yql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ $z0_9_35 = 0.9;
1515
$z1_1_35 = 1.1;
1616

1717
$round = ($x, $y) -> { return Math::Round($x, $y); };
18+
$upscale = ($x) -> { return $x; };

ydb/library/benchmarks/gen_queries/consts_decimal.yql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ $z0_05_35 = cast("0.05" as decimal(35,2));
1414
$z0_9_35 = cast("0.9" as decimal(35,2));
1515
$z1_1_35 = cast("1.1" as decimal(35,2));
1616
$round = ($x,$y) -> {return $x;};
17+
$upscale = ($x) -> { return cast($x as decimal(35,9)); };

ydb/library/benchmarks/queries/tpcds/yql/q20.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ select item.i_item_id
88
,item.i_class
99
,item.i_current_price
1010
,sum(cs_ext_sales_price) as itemrevenue
11-
,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over
11+
,$upscale(sum(cs_ext_sales_price)*100)/sum($upscale(sum(cs_ext_sales_price))) over
1212
(partition by item.i_class) as revenueratio
1313
from {{catalog_sales}} as catalog_sales
1414
cross join {{item}} as item

ydb/library/benchmarks/queries/tpcds/yql/q36.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
-- NB: Subquerys
44
-- start query 1 in stream 0 using template query36.tpl and seed 1544728811
55
select
6-
sum(ss_net_profit)/sum(ss_ext_sales_price) as gross_margin
6+
$upscale(sum(ss_net_profit))/$upscale(sum(ss_ext_sales_price)) as gross_margin
77
,item.i_category
88
,item.i_class
99
,grouping(item.i_category)+grouping(item.i_class) as lochierarchy
1010
,rank() over (
1111
partition by grouping(item.i_category)+grouping(item.i_class),
1212
case when grouping(item.i_class) = 0 then item.i_category else null end
13-
order by sum(ss_net_profit)/sum(ss_ext_sales_price) asc) as rank_within_parent
13+
order by $upscale(sum(ss_net_profit))/$upscale(sum(ss_ext_sales_price)) asc) as rank_within_parent
1414
from
1515
{{store_sales}} as store_sales
1616
cross join {{date_dim}} d1

0 commit comments

Comments
 (0)