Skip to content

Commit 7047c5f

Browse files
authored
make gp_dqa test case stable
use extra_float_digits to avoid float type issue of different architecture.
1 parent cd359e4 commit 7047c5f

3 files changed

Lines changed: 105 additions & 105 deletions

File tree

src/test/regress/expected/gp_dqa.out

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- are flowing from different segments in different order. Mask those
44
-- differences by setting 'extra_float_digits'. This isn't enough for all of
55
-- the queries, so a few also use TO_CHAR() to truncate the results further.
6-
set extra_float_digits=0;
6+
set extra_float_digits=-1;
77
SET optimizer_trace_fallback to on;
88
drop table if exists dqa_t1;
99
NOTICE: table "dqa_t1" does not exist, skipping
@@ -799,9 +799,9 @@ explain (costs off) select sum(distinct d), count(distinct i), count(distinct c)
799799

800800
-- multi args singledqa
801801
select corr(distinct d, i) from dqa_t1;
802-
corr
803-
--------------------
804-
0.0824013341460019
802+
corr
803+
-------------------
804+
0.082401334146002
805805
(1 row)
806806

807807
explain (costs off) select corr(distinct d, i) from dqa_t1;
@@ -894,9 +894,9 @@ explain (costs off) select to_char(corr(distinct d, i), '9.99999999999999') from
894894

895895
-- multi args multidqa
896896
select count(distinct c), corr(distinct d, i) from dqa_t1;
897-
count | corr
898-
-------+--------------------
899-
10 | 0.0824013341460019
897+
count | corr
898+
-------+-------------------
899+
10 | 0.082401334146002
900900
(1 row)
901901

902902
explain (costs off) select count(distinct c), corr(distinct d, i) from dqa_t1;
@@ -916,9 +916,9 @@ explain (costs off) select count(distinct c), corr(distinct d, i) from dqa_t1;
916916
(11 rows)
917917

918918
select count(distinct d), corr(distinct d, i) from dqa_t1;
919-
count | corr
920-
-------+--------------------
921-
23 | 0.0824013341460019
919+
count | corr
920+
-------+-------------------
921+
23 | 0.082401334146002
922922
(1 row)
923923

924924
explain (costs off) select count(distinct d), corr(distinct d, i) from dqa_t1;
@@ -938,9 +938,9 @@ explain (costs off) select count(distinct d), corr(distinct d, i) from dqa_t1;
938938
(11 rows)
939939

940940
select count(distinct d), count(distinct i), corr(distinct d, i) from dqa_t1;
941-
count | count | corr
942-
-------+-------+--------------------
943-
23 | 12 | 0.0824013341460019
941+
count | count | corr
942+
-------+-------+-------------------
943+
23 | 12 | 0.082401334146002
944944
(1 row)
945945

946946
explain (costs off) select count(distinct d), count(distinct i), corr(distinct d, i) from dqa_t1;
@@ -960,9 +960,9 @@ explain (costs off) select count(distinct d), count(distinct i), corr(distinct d
960960
(11 rows)
961961

962962
select count(distinct c), count(distinct d), count(distinct i), corr(distinct d, i) from dqa_t1;
963-
count | count | count | corr
964-
-------+-------+-------+--------------------
965-
10 | 23 | 12 | 0.0824013341460019
963+
count | count | count | corr
964+
-------+-------+-------+-------------------
965+
10 | 23 | 12 | 0.082401334146002
966966
(1 row)
967967

968968
explain (costs off) select count(distinct c), count(distinct d), count(distinct i), corr(distinct d, i) from dqa_t1;
@@ -1158,42 +1158,42 @@ explain (costs off) select count(distinct c), corr(distinct d, i), d, i from dqa
11581158
(16 rows)
11591159

11601160
select count(distinct c), corr(distinct d, i), dt from dqa_t1 group by dt;
1161-
count | corr | dt
1162-
-------+--------------------+------------
1163-
3 | 0.59603956067927 | 06-25-2009
1164-
3 | 0.0750939261482638 | 06-20-2009
1165-
3 | 0.0750939261482638 | 07-11-2009
1166-
3 | 0.0750939261482638 | 06-18-2009
1167-
3 | 0.0750939261482638 | 06-14-2009
1168-
3 | 0.755928946018455 | 06-10-2009
1169-
3 | 0.0750939261482638 | 06-28-2009
1170-
3 | 0.0750939261482638 | 06-17-2009
1171-
3 | 0.0750939261482638 | 06-16-2009
1172-
3 | 0.59603956067927 | 06-24-2009
1173-
3 | 0.0750939261482638 | 06-29-2009
1174-
3 | 0.0750939261482638 | 07-09-2009
1175-
3 | 0.0750939261482638 | 06-21-2009
1176-
3 | 0.0750939261482638 | 06-26-2009
1177-
3 | -0.709570905570559 | 06-13-2009
1178-
3 | -0.709570905570559 | 06-23-2009
1179-
3 | 0.59603956067927 | 06-11-2009
1180-
3 | 0.0750939261482638 | 07-10-2009
1181-
3 | 0.0750939261482638 | 07-01-2009
1182-
3 | -0.709570905570559 | 06-12-2009
1183-
3 | 0.59603956067927 | 07-04-2009
1184-
3 | 0.0750939261482638 | 06-15-2009
1185-
3 | 0.0750939261482638 | 06-30-2009
1186-
3 | 0.59603956067927 | 07-05-2009
1187-
2 | -1 | 07-12-2009
1188-
3 | 0.0750939261482638 | 07-02-2009
1189-
3 | 0.0750939261482638 | 06-27-2009
1190-
3 | -1 | 07-03-2009
1191-
3 | -0.709570905570559 | 07-06-2009
1192-
2 | -1 | 07-13-2009
1193-
3 | -0.709570905570559 | 07-07-2009
1194-
3 | 0.0750939261482638 | 07-08-2009
1195-
3 | 0.0750939261482638 | 06-19-2009
1196-
3 | -0.709570905570559 | 06-22-2009
1161+
count | corr | dt
1162+
-------+-------------------+------------
1163+
3 | 0.75592894601845 | 06-10-2009
1164+
3 | 0.075093926148264 | 07-11-2009
1165+
3 | 0.075093926148264 | 06-28-2009
1166+
3 | 0.075093926148264 | 06-19-2009
1167+
3 | 0.075093926148264 | 06-17-2009
1168+
3 | 0.075093926148264 | 07-08-2009
1169+
3 | 0.075093926148264 | 06-16-2009
1170+
2 | -1 | 07-13-2009
1171+
3 | 0.075093926148264 | 06-29-2009
1172+
3 | 0.59603956067927 | 07-04-2009
1173+
3 | -0.70957090557056 | 06-23-2009
1174+
2 | -1 | 07-12-2009
1175+
3 | 0.075093926148264 | 07-02-2009
1176+
3 | 0.59603956067927 | 06-11-2009
1177+
3 | 0.075093926148264 | 07-10-2009
1178+
3 | 0.075093926148264 | 06-18-2009
1179+
3 | 0.59603956067927 | 07-05-2009
1180+
3 | 0.075093926148264 | 06-20-2009
1181+
3 | 0.075093926148264 | 07-09-2009
1182+
3 | -0.70957090557056 | 06-12-2009
1183+
3 | 0.59603956067927 | 06-24-2009
1184+
3 | 0.075093926148264 | 06-14-2009
1185+
3 | 0.075093926148264 | 06-26-2009
1186+
3 | -0.70957090557056 | 06-22-2009
1187+
3 | -0.70957090557056 | 06-13-2009
1188+
3 | 0.075093926148264 | 06-21-2009
1189+
3 | -0.70957090557056 | 07-07-2009
1190+
3 | 0.075093926148264 | 06-27-2009
1191+
3 | -0.70957090557056 | 07-06-2009
1192+
3 | 0.075093926148264 | 07-01-2009
1193+
3 | -1 | 07-03-2009
1194+
3 | 0.075093926148264 | 06-15-2009
1195+
3 | 0.59603956067927 | 06-25-2009
1196+
3 | 0.075093926148264 | 06-30-2009
11971197
(34 rows)
11981198

11991199
explain (costs off) select count(distinct c), corr(distinct d, i), dt from dqa_t1 group by dt;

src/test/regress/expected/gp_dqa_optimizer.out

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- are flowing from different segments in different order. Mask those
44
-- differences by setting 'extra_float_digits'. This isn't enough for all of
55
-- the queries, so a few also use TO_CHAR() to truncate the results further.
6-
set extra_float_digits=0;
6+
set extra_float_digits=-1;
77
SET optimizer_trace_fallback to on;
88
drop table if exists dqa_t1;
99
NOTICE: table "dqa_t1" does not exist, skipping
@@ -824,9 +824,9 @@ DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disab
824824

825825
-- multi args singledqa
826826
select corr(distinct d, i) from dqa_t1;
827-
corr
828-
--------------------
829-
0.0824013341460019
827+
corr
828+
-------------------
829+
0.082401334146002
830830
(1 row)
831831

832832
explain (costs off) select corr(distinct d, i) from dqa_t1;
@@ -912,9 +912,9 @@ explain (costs off) select to_char(corr(distinct d, i), '9.99999999999999') from
912912
select count(distinct c), corr(distinct d, i) from dqa_t1;
913913
INFO: GPORCA failed to produce a plan, falling back to planner
914914
DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disabled in the optimizer
915-
count | corr
916-
-------+--------------------
917-
10 | 0.0824013341460019
915+
count | corr
916+
-------+-------------------
917+
10 | 0.082401334146002
918918
(1 row)
919919

920920
explain (costs off) select count(distinct c), corr(distinct d, i) from dqa_t1;
@@ -938,9 +938,9 @@ DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disab
938938
select count(distinct d), corr(distinct d, i) from dqa_t1;
939939
INFO: GPORCA failed to produce a plan, falling back to planner
940940
DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disabled in the optimizer
941-
count | corr
942-
-------+--------------------
943-
23 | 0.0824013341460019
941+
count | corr
942+
-------+-------------------
943+
23 | 0.082401334146002
944944
(1 row)
945945

946946
explain (costs off) select count(distinct d), corr(distinct d, i) from dqa_t1;
@@ -964,9 +964,9 @@ DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disab
964964
select count(distinct d), count(distinct i), corr(distinct d, i) from dqa_t1;
965965
INFO: GPORCA failed to produce a plan, falling back to planner
966966
DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disabled in the optimizer
967-
count | count | corr
968-
-------+-------+--------------------
969-
23 | 12 | 0.0824013341460019
967+
count | count | corr
968+
-------+-------+-------------------
969+
23 | 12 | 0.082401334146002
970970
(1 row)
971971

972972
explain (costs off) select count(distinct d), count(distinct i), corr(distinct d, i) from dqa_t1;
@@ -990,9 +990,9 @@ DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disab
990990
select count(distinct c), count(distinct d), count(distinct i), corr(distinct d, i) from dqa_t1;
991991
INFO: GPORCA failed to produce a plan, falling back to planner
992992
DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disabled in the optimizer
993-
count | count | count | corr
994-
-------+-------+-------+--------------------
995-
10 | 23 | 12 | 0.0824013341460019
993+
count | count | count | corr
994+
-------+-------+-------+-------------------
995+
10 | 23 | 12 | 0.082401334146002
996996
(1 row)
997997

998998
explain (costs off) select count(distinct c), count(distinct d), count(distinct i), corr(distinct d, i) from dqa_t1;
@@ -1200,42 +1200,42 @@ DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disab
12001200
select count(distinct c), corr(distinct d, i), dt from dqa_t1 group by dt;
12011201
INFO: GPORCA failed to produce a plan, falling back to planner
12021202
DETAIL: Feature not supported: Multiple Distinct Qualified Aggregates are disabled in the optimizer
1203-
count | corr | dt
1204-
-------+--------------------+------------
1205-
3 | 0.59603956067927 | 06-25-2009
1206-
3 | 0.0750939261482638 | 06-20-2009
1207-
3 | 0.0750939261482638 | 07-11-2009
1208-
3 | 0.0750939261482638 | 06-18-2009
1209-
3 | 0.0750939261482638 | 06-14-2009
1210-
3 | 0.755928946018455 | 06-10-2009
1211-
3 | 0.0750939261482638 | 06-28-2009
1212-
3 | 0.0750939261482638 | 06-17-2009
1213-
3 | 0.0750939261482638 | 06-16-2009
1214-
3 | 0.59603956067927 | 06-24-2009
1215-
3 | 0.0750939261482638 | 06-29-2009
1216-
3 | 0.0750939261482638 | 07-09-2009
1217-
3 | 0.0750939261482638 | 06-21-2009
1218-
3 | 0.0750939261482638 | 06-26-2009
1219-
3 | -0.709570905570559 | 06-13-2009
1220-
3 | -0.709570905570559 | 06-23-2009
1221-
3 | 0.59603956067927 | 06-11-2009
1222-
3 | 0.0750939261482638 | 07-10-2009
1223-
3 | 0.0750939261482638 | 07-01-2009
1224-
3 | -0.709570905570559 | 06-12-2009
1225-
3 | 0.59603956067927 | 07-04-2009
1226-
3 | 0.0750939261482638 | 06-15-2009
1227-
3 | 0.0750939261482638 | 06-30-2009
1228-
3 | 0.59603956067927 | 07-05-2009
1229-
2 | -1 | 07-12-2009
1230-
3 | 0.0750939261482638 | 07-02-2009
1231-
3 | 0.0750939261482638 | 06-27-2009
1232-
3 | -1 | 07-03-2009
1233-
3 | -0.709570905570559 | 07-06-2009
1234-
2 | -1 | 07-13-2009
1235-
3 | -0.709570905570559 | 07-07-2009
1236-
3 | 0.0750939261482638 | 07-08-2009
1237-
3 | 0.0750939261482638 | 06-19-2009
1238-
3 | -0.709570905570559 | 06-22-2009
1203+
count | corr | dt
1204+
-------+-------------------+------------
1205+
3 | 0.75592894601845 | 06-10-2009
1206+
3 | 0.075093926148264 | 07-11-2009
1207+
3 | 0.075093926148264 | 06-28-2009
1208+
3 | 0.075093926148264 | 06-19-2009
1209+
3 | 0.075093926148264 | 06-17-2009
1210+
3 | 0.075093926148264 | 07-08-2009
1211+
3 | 0.075093926148264 | 06-16-2009
1212+
3 | 0.075093926148264 | 06-29-2009
1213+
2 | -1 | 07-13-2009
1214+
3 | 0.59603956067927 | 07-04-2009
1215+
3 | -0.70957090557056 | 06-23-2009
1216+
2 | -1 | 07-12-2009
1217+
3 | 0.075093926148264 | 07-02-2009
1218+
3 | 0.59603956067927 | 06-11-2009
1219+
3 | 0.075093926148264 | 07-10-2009
1220+
3 | 0.075093926148264 | 06-18-2009
1221+
3 | 0.59603956067927 | 07-05-2009
1222+
3 | 0.075093926148264 | 06-20-2009
1223+
3 | 0.075093926148264 | 07-09-2009
1224+
3 | -0.70957090557056 | 06-12-2009
1225+
3 | 0.59603956067927 | 06-24-2009
1226+
3 | 0.075093926148264 | 06-14-2009
1227+
3 | 0.075093926148264 | 06-26-2009
1228+
3 | -0.70957090557056 | 06-22-2009
1229+
3 | -0.70957090557056 | 06-13-2009
1230+
3 | 0.075093926148264 | 06-21-2009
1231+
3 | -0.70957090557056 | 07-07-2009
1232+
3 | 0.075093926148264 | 06-27-2009
1233+
3 | -0.70957090557056 | 07-06-2009
1234+
3 | 0.075093926148264 | 07-01-2009
1235+
3 | -1 | 07-03-2009
1236+
3 | 0.075093926148264 | 06-15-2009
1237+
3 | 0.59603956067927 | 06-25-2009
1238+
3 | 0.075093926148264 | 06-30-2009
12391239
(34 rows)
12401240

12411241
explain (costs off) select count(distinct c), corr(distinct d, i), dt from dqa_t1 group by dt;

src/test/regress/sql/gp_dqa.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- are flowing from different segments in different order. Mask those
44
-- differences by setting 'extra_float_digits'. This isn't enough for all of
55
-- the queries, so a few also use TO_CHAR() to truncate the results further.
6-
set extra_float_digits=0;
6+
set extra_float_digits=-1;
77

88
SET optimizer_trace_fallback to on;
99

0 commit comments

Comments
 (0)