1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-02 17:22:27 +03:00

MCOL-5333: Full MTR tests for custom Build (#2732)

* Add MTR_SUITE_LIST

* Typo

* Add data download

* Install tar and lz4

* Change the way MTR_SUITE_LIST is set up

* Use bash for MTR_SUITE_LIST

* Another one

* Fix reference results for full MTR develop, disable broken JSON test and tests with 10GB database

* Fix timestamps and truncate cos

* Fix some more references

* Fix dokcerhub step for custom build

* One more fix for dockerhub step on custom build

* Fix tests for regr functions with truncate

* Full mtr set on nghtly + MTR_FULL_SET flag

* One more fix for dockerhub

* Fix MTR_FULL_SET

* Testing MTR_FULL_SET

* sorted_result in tests + fix typo

* Truncate even more

* Typo

* truncate 2 more tests

* Disable regr_* functions tests

* fix setup mtr step

* correct settings for table creation

* Put setup for tests into drone

* Fix for debian based distros

* More truncates

* Disable the rest

---------

Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com>
This commit is contained in:
Andrey Piskunov
2023-02-27 12:42:48 +02:00
committed by GitHub
parent 71a6f691fd
commit 8671f55784
46 changed files with 2705216 additions and 2702901 deletions

View File

@ -0,0 +1,15 @@
mcs7035_regression_bug2976 : Different table settings on different architectures
mcs7126_regression_bug3853 : Different table settings on different architectures
mcs7157_regression_bug4757 : Different table settings on different architectures
mcs7159_regression_bug4827 : Different table settings on different architectures
mcs7171_regression_bug5229 : Different table settings on different architectures
mcs7174_regression_bug5286 : Different table settings on different architectures
mcs7202_regression_MCOL-1535 : Different table settings on different architectures
mcs7245_regression_bug2977 : Different table settings on different architectures
mcs7247_regression_bug3038b : Different table settings on different architectures
mcs7248_regression_bug3038c : Different table settings on different architectures
mcs7250_regression_bug4594 : Different table settings on different architectures
mcs7255_regression_MCOL-673 : Different table settings on different architectures
mcs7631_q111 : Different table settings on different architectures
mcs7632_q112 : Different table settings on different architectures
mcs7633_q113 : Different table settings on different architectures

View File

@ -1,7 +1,5 @@
USE tpch1;
drop table if exists bug3483;
Warnings:
Note 1051 Unknown table 'tpch1.bug3483'
create table bug3483 (c1 bigint, c2 decimal(18,2), c3 float, c4 double, c5 char(120), c6 varchar(120)) engine=columnstore;
insert into bug3483 values
(1, 1.1, 1.1, 1.1, '1.1', '1.1'),
@ -64,26 +62,26 @@ c5 ceil(c5) ceiling(c5) floor(c5) truncate(c5, 2)
1234567890.1 1234567891 1234567891 1234567890 1234567890.09
1234567890.8 1234567891 1234567891 1234567890 1234567890.80
1.2345678901e10 12345678901 12345678901 12345678901 12345678901.00
12345678901234567890 12345678901234567000 12345678901234567000 12345678901234567000 -92233720368547760.00
12345678901234567890123456789012345678901234567890 12345678901234567000000000000000000000000000000000 12345678901234567000000000000000000000000000000000 12345678901234567000000000000000000000000000000000 -92233720368547760.00
12345678901234567890 12345678901234567000 12345678901234567000 12345678901234567000 12345678901234567000.00
12345678901234567890123456789012345678901234567890 12345678901234567000000000000000000000000000000000 12345678901234567000000000000000000000000000000000 12345678901234567000000000000000000000000000000000 12345678901234567000000000000000000000000000000000.00
-1.1 -1 -1 -2 -1.10
-1234567890.1 -1234567890 -1234567890 -1234567891 -1234567890.09
-1234567890.8 -1234567890 -1234567890 -1234567891 -1234567890.80
-1.2345678901e10 -12345678901 -12345678901 -12345678901 -12345678901.00
-12345678901234567890 -12345678901234567000 -12345678901234567000 -12345678901234567000 -92233720368547760.00
-12345678901234567890123456789012345678901234567890 -12345678901234567000000000000000000000000000000000 -12345678901234567000000000000000000000000000000000 -12345678901234567000000000000000000000000000000000 -92233720368547760.00
-12345678901234567890 -12345678901234567000 -12345678901234567000 -12345678901234567000 -12345678901234567000.00
-12345678901234567890123456789012345678901234567890 -12345678901234567000000000000000000000000000000000 -12345678901234567000000000000000000000000000000000 -12345678901234567000000000000000000000000000000000 -12345678901234567000000000000000000000000000000000.00
select c6, ceil(c6), ceiling(c6), floor(c6), truncate(c6, 2) from bug3483;
c6 ceil(c6) ceiling(c6) floor(c6) truncate(c6, 2)
1.1 2 2 1 1.10
1234567890.1 1234567891 1234567891 1234567890 1234567890.09
1234567890.8 1234567891 1234567891 1234567890 1234567890.80
1.2345678901e10 12345678901 12345678901 12345678901 12345678901.00
12345678901234567890 12345678901234567000 12345678901234567000 12345678901234567000 -92233720368547760.00
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -92233720368547760.00
12345678901234567890 12345678901234567000 12345678901234567000 12345678901234567000 12345678901234567000.00
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000.00
-1.1 -1 -1 -2 -1.10
-1234567890.1 -1234567890 -1234567890 -1234567891 -1234567890.09
-1234567890.8 -1234567890 -1234567890 -1234567891 -1234567890.80
-1.2345678901e10 -12345678901 -12345678901 -12345678901 -12345678901.00
-12345678901234567890 -12345678901234567000 -12345678901234567000 -12345678901234567000 -92233720368547760.00
-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -92233720368547760.00
-12345678901234567890 -12345678901234567000 -12345678901234567000 -12345678901234567000 -12345678901234567000.00
-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -1234567890123456700000000000000000000000000000000000000000000000000000000000000000000000000000000000.00
drop table bug3483;

View File

@ -620,18 +620,18 @@ avg(d131) min(d131) max(d131) avg2 min2 max2
select avg(d132), min(d132), max(d132), (100/1000000) * avg(d132) avg2, 0.0001 * min(d132) min2, max(d132)/10000 max2 from dtypes;
avg(d132) min(d132) max(d132) avg2 min2 max2
191.9727363410021500 -999.999999999999 999.999999999999 0.01919727363410021500 -0.0999999999999999 0.0999999999999999
select avg(d133), min(d133), max(d133), (100/1000000) * avg(d133) avg2, 0.0001 * min(d133) min2, max(d133)/10000 max2 from dtypes;
avg(d133) min(d133) max(d133) avg2 min2 max2
31.27990634100227201 -99.9999999999999 99.9999999999999 0.003127990634100227201 -0.00999999999999999 0.00999999999999999
select avg(d134), min(d134), max(d134), (100/1000000) * avg(d134) avg2, 0.0001 * min(d134) min2, max(d134)/10000 max2 from dtypes;
avg(d134) min(d134) max(d134) avg2 min2 max2
4.061669341002296601 -9.99999999999999 9.99999999999999 0.0004061669341002296601 -0.000999999999999999 0.000999999999999999
select avg(d135), min(d135), max(d135), (100/1000000) * avg(d135) avg2, 0.0001 * min(d135) min2, max(d135)/10000 max2 from dtypes;
avg(d135) min(d135) max(d135) avg2 min2 max2
0.5711782763422995403 -0.999999999999999 0.999999999999999 0.00005711782763422995403 -0.0000999999999999999 0.0000999999999999999
select avg(d136), min(d136), max(d136), (100/1000000) * avg(d136) avg2, 0.0001 * min(d136) min2, max(d136)/10000 max2 from dtypes;
avg(d136) min(d136) max(d136) avg2 min2 max2
451548.7900 -2233 5860521 45.15487900 -0.2233 586.0521
select truncate(avg(d133), 10), min(d133), max(d133), truncate((100/1000000) * avg(d133), 10) avg2, 0.0001 * min(d133) min2, max(d133)/10000 max2 from dtypes;
truncate(avg(d133), 10) min(d133) max(d133) avg2 min2 max2
31.2799063410 -99.9999999999999 99.9999999999999 0.0031279906 -0.00999999999999999 0.00999999999999999
select truncate(avg(d134), 10), min(d134), max(d134), truncate((100/1000000) * avg(d134), 10) avg2, 0.0001 * min(d134) min2, max(d134)/10000 max2 from dtypes;
truncate(avg(d134), 10) min(d134) max(d134) avg2 min2 max2
4.0616693410 -9.99999999999999 9.99999999999999 0.0004061669 -0.000999999999999999 0.000999999999999999
select truncate(avg(d135), 10), min(d135), max(d135), truncate((100/1000000) * avg(d135), 10) avg2, 0.0001 * min(d135) min2, max(d135)/10000 max2 from dtypes;
truncate(avg(d135), 10) min(d135) max(d135) avg2 min2 max2
0.5711782763 -0.999999999999999 0.999999999999999 0.0000571178 -0.0000999999999999999 0.0000999999999999999
select truncate(avg(d136), 10), min(d136), max(d136), truncate((100/1000000) * avg(d136), 10) avg2, 0.0001 * min(d136) min2, max(d136)/10000 max2 from dtypes;
truncate(avg(d136), 10) min(d136) max(d136) avg2 min2 max2
451548.7900000000 -2233 5860521 45.1548790000 -0.2233 586.0521
select avg(d137), min(d137), max(d137), (100/1000000) * avg(d137) avg2, 0.0001 * min(d137) min2, max(d137)/10000 max2 from dtypes;
avg(d137) min(d137) max(d137) avg2 min2 max2
451548.78300 -2233.0 5860520.6 45.154878300 -0.22330 586.05206
@ -656,21 +656,21 @@ avg(d143) min(d143) max(d143) avg2 min2 max2
select avg(d144), min(d144), max(d144), (100/1000000) * avg(d144) avg2, 0.0001 * min(d144) min2, max(d144)/10000 max2 from dtypes;
avg(d144) min(d144) max(d144) avg2 min2 max2
451548.786397185200 -2233.00000000 5860520.59916300 45.1548786397185200 -0.223300000000 586.052059916300
select avg(d145), min(d145), max(d145), (100/1000000) * avg(d145) avg2, 0.0001 * min(d145) min2, max(d145)/10000 max2 from dtypes;
avg(d145) min(d145) max(d145) avg2 min2 max2
451548.7863971853299 -2233.000000000 5860520.599163000 45.15487863971853299 -0.2233000000000 586.0520599163000
select avg(d160), min(d160), max(d160), (100/1000000) * avg(d160) avg2, 0.0001 * min(d160) min2, max(d160)/10000 max2 from dtypes;
avg(d160) min(d160) max(d160) avg2 min2 max2
451548.78639718400 -2233.0000000 5860520.5991630 45.154878639718400 -0.22330000000 586.05205991630
select truncate(avg(d145), 10), min(d145), max(d145), truncate((100/1000000) * avg(d145), 10) avg2, 0.0001 * min(d145) min2, max(d145)/10000 max2 from dtypes;
truncate(avg(d145), 10) min(d145) max(d145) avg2 min2 max2
451548.7863971853 -2233.000000000 5860520.599163000 45.1548786397 -0.2233000000000 586.0520599163000
select truncate(avg(d160), 10), min(d160), max(d160), truncate((100/1000000) * avg(d160), 10) avg2, 0.0001 * min(d160) min2, max(d160)/10000 max2 from dtypes;
truncate(avg(d160), 10) min(d160) max(d160) avg2 min2 max2
451548.7863971839 -2233.0000000 5860520.5991630 45.1548786397 -0.22330000000 586.05205991630
select avg(d161), min(d161), max(d161), (100/1000000) * avg(d161) avg2, 0.0001 * min(d161) min2, max(d161)/10000 max2 from dtypes;
avg(d161) min(d161) max(d161) avg2 min2 max2
451548.786397185200 -2233.00000000 5860520.59916300 45.1548786397185200 -0.223300000000 586.052059916300
select avg(d162), min(d162), max(d162), (100/1000000) * avg(d162) avg2, 0.0001 * min(d162) min2, max(d162)/10000 max2 from dtypes;
avg(d162) min(d162) max(d162) avg2 min2 max2
451548.7863971853299 -2233.000000000 5860520.599163000 45.15487863971853299 -0.2233000000000 586.0520599163000
select avg(d171), min(d171), max(d171), (100/1000000) * avg(d171) avg2, 0.0001 * min(d171) min2, max(d171)/10000 max2 from dtypes;
avg(d171) min(d171) max(d171) avg2 min2 max2
451548.7900 -2233 5860521 45.15487900 -0.2233 586.0521
select truncate(avg(d162), 10), min(d162), max(d162), truncate((100/1000000) * avg(d162), 10) avg2, 0.0001 * min(d162) min2, max(d162)/10000 max2 from dtypes;
truncate(avg(d162), 10) min(d162) max(d162) avg2 min2 max2
451548.7863971853 -2233.000000000 5860520.599163000 45.1548786397 -0.2233000000000 586.0520599163000
select truncate(avg(d171), 10), min(d171), max(d171), truncate((100/1000000) * avg(d171), 10) avg2, 0.0001 * min(d171) min2, max(d171)/10000 max2 from dtypes;
truncate(avg(d171), 10) min(d171) max(d171) avg2 min2 max2
451548.7900000000 -2233 5860521 45.1548790000 -0.2233 586.0521
select avg(d172), min(d172), max(d172), (100/1000000) * avg(d172) avg2, 0.0001 * min(d172) min2, max(d172)/10000 max2 from dtypes;
avg(d172) min(d172) max(d172) avg2 min2 max2
451548.78300 -2233.0 5860520.6 45.154878300 -0.22330 586.05206
@ -695,6 +695,6 @@ avg(d178) min(d178) max(d178) avg2 min2 max2
select avg(d179), min(d179), max(d179), (100/1000000) * avg(d179) avg2, 0.0001 * min(d179) min2, max(d179)/10000 max2 from dtypes;
avg(d179) min(d179) max(d179) avg2 min2 max2
451548.786397185200 -2233.00000000 5860520.59916300 45.1548786397185200 -0.223300000000 586.052059916300
select avg(d180), min(d180), max(d180), (100/1000000) * avg(d180) avg2, 0.0001 * min(d180) min2, max(d180)/10000 max2 from dtypes;
avg(d180) min(d180) max(d180) avg2 min2 max2
451548.7863971853299 -2233.000000000 5860520.599163000 45.15487863971853299 -0.2233000000000 586.0520599163000
select truncate(avg(d180), 10), min(d180), max(d180), truncate((100/1000000) * avg(d180), 10) avg2, 0.0001 * min(d180) min2, max(d180)/10000 max2 from dtypes;
truncate(avg(d180), 10) min(d180) max(d180) avg2 min2 max2
451548.7863971853 -2233.000000000 5860520.599163000 45.1548786397 -0.2233000000000 586.0520599163000

View File

@ -3,18 +3,18 @@ set columnstore_double_for_decimal_math = 1;
drop table if exists `p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess`;
create table `p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess` ( `session_duration` decimal(13,3) not null,`session_idle_down_duration` decimal(13,3) not null, `session_q5_down` int(11) not null ) engine=columnstore default charset=latin1;
insert into p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess values (1032632.1 , 86382, 1273564557);
select session_duration as session_duration, session_idle_down_duration as session_idle_down_duration, session_q5_down as session_q5_down, session_duration*session_q5_down as result_1, (session_duration*session_q5_down)*8 as result_2, (1032632.1*1273564557)*8 as result_3 from p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess t1;
select session_duration as session_duration, session_idle_down_duration as session_idle_down_duration, session_q5_down as session_q5_down, truncate(session_duration*session_q5_down, 2) as result_1, truncate((session_duration*session_q5_down)*8, 2) as result_2, (1032632.1*1273564557)*8 as result_3 from p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess t1;
session_duration session_idle_down_duration session_q5_down result_1 result_2 result_3
1032632.100 86382.000 1273564557 1315123642980479.700 10520989143843837.601 10520989143843837.6
1032632.100 86382.000 1273564557 1315123642980479.70 10520989143843837.60 10520989143843837.6
drop table if exists bug2437;
create table bug2437 (col1 decimal(6,4)) engine=columnstore;
insert into bug2437 values (10.0001);
select col1*2.0002*2.0000002*0.999999999999 from bug2437;
col1*2.0002*2.0000002*0.999999999999
40.004404040399999601000000000
select col1*4.00040040003599959959996 from bug2437;
col1*4.00040040003599959959996
40.004404040399999597000000000
select truncate(col1*2.0002*2.0000002*0.999999999999, 9) from bug2437;
truncate(col1*2.0002*2.0000002*0.999999999999, 9)
40.004404040
select truncate(col1*4.00040040003599959959996, 9) from bug2437;
truncate(col1*4.00040040003599959959996, 9)
40.004404040
select (count(*)/72143371)*100,(6001215/72143371)*100,(count(*)*100)/72143371,(6001215*100)/72143371 from lineitem;
(count(*)/72143371)*100 (6001215/72143371)*100 (count(*)*100)/72143371 (6001215*100)/72143371
8.3185 8.3185 8.3185 8.3185

View File

@ -149,10 +149,10 @@ select avg(d129), min(d129), max(d129), (100/1000000) * avg(d129) avg2, 0.0001 *
select avg(d130), min(d130), max(d130), (100/1000000) * avg(d130) avg2, 0.0001 * min(d130) min2, max(d130)/10000 max2 from dtypes;
select avg(d131), min(d131), max(d131), (100/1000000) * avg(d131) avg2, 0.0001 * min(d131) min2, max(d131)/10000 max2 from dtypes;
select avg(d132), min(d132), max(d132), (100/1000000) * avg(d132) avg2, 0.0001 * min(d132) min2, max(d132)/10000 max2 from dtypes;
select avg(d133), min(d133), max(d133), (100/1000000) * avg(d133) avg2, 0.0001 * min(d133) min2, max(d133)/10000 max2 from dtypes;
select avg(d134), min(d134), max(d134), (100/1000000) * avg(d134) avg2, 0.0001 * min(d134) min2, max(d134)/10000 max2 from dtypes;
select avg(d135), min(d135), max(d135), (100/1000000) * avg(d135) avg2, 0.0001 * min(d135) min2, max(d135)/10000 max2 from dtypes;
select avg(d136), min(d136), max(d136), (100/1000000) * avg(d136) avg2, 0.0001 * min(d136) min2, max(d136)/10000 max2 from dtypes;
select truncate(avg(d133), 10), min(d133), max(d133), truncate((100/1000000) * avg(d133), 10) avg2, 0.0001 * min(d133) min2, max(d133)/10000 max2 from dtypes;
select truncate(avg(d134), 10), min(d134), max(d134), truncate((100/1000000) * avg(d134), 10) avg2, 0.0001 * min(d134) min2, max(d134)/10000 max2 from dtypes;
select truncate(avg(d135), 10), min(d135), max(d135), truncate((100/1000000) * avg(d135), 10) avg2, 0.0001 * min(d135) min2, max(d135)/10000 max2 from dtypes;
select truncate(avg(d136), 10), min(d136), max(d136), truncate((100/1000000) * avg(d136), 10) avg2, 0.0001 * min(d136) min2, max(d136)/10000 max2 from dtypes;
select avg(d137), min(d137), max(d137), (100/1000000) * avg(d137) avg2, 0.0001 * min(d137) min2, max(d137)/10000 max2 from dtypes;
select avg(d138), min(d138), max(d138), (100/1000000) * avg(d138) avg2, 0.0001 * min(d138) min2, max(d138)/10000 max2 from dtypes;
select avg(d139), min(d139), max(d139), (100/1000000) * avg(d139) avg2, 0.0001 * min(d139) min2, max(d139)/10000 max2 from dtypes;
@ -161,11 +161,11 @@ select avg(d141), min(d141), max(d141), (100/1000000) * avg(d141) avg2, 0.0001 *
select avg(d142), min(d142), max(d142), (100/1000000) * avg(d142) avg2, 0.0001 * min(d142) min2, max(d142)/10000 max2 from dtypes;
select avg(d143), min(d143), max(d143), (100/1000000) * avg(d143) avg2, 0.0001 * min(d143) min2, max(d143)/10000 max2 from dtypes;
select avg(d144), min(d144), max(d144), (100/1000000) * avg(d144) avg2, 0.0001 * min(d144) min2, max(d144)/10000 max2 from dtypes;
select avg(d145), min(d145), max(d145), (100/1000000) * avg(d145) avg2, 0.0001 * min(d145) min2, max(d145)/10000 max2 from dtypes;
select avg(d160), min(d160), max(d160), (100/1000000) * avg(d160) avg2, 0.0001 * min(d160) min2, max(d160)/10000 max2 from dtypes;
select truncate(avg(d145), 10), min(d145), max(d145), truncate((100/1000000) * avg(d145), 10) avg2, 0.0001 * min(d145) min2, max(d145)/10000 max2 from dtypes;
select truncate(avg(d160), 10), min(d160), max(d160), truncate((100/1000000) * avg(d160), 10) avg2, 0.0001 * min(d160) min2, max(d160)/10000 max2 from dtypes;
select avg(d161), min(d161), max(d161), (100/1000000) * avg(d161) avg2, 0.0001 * min(d161) min2, max(d161)/10000 max2 from dtypes;
select avg(d162), min(d162), max(d162), (100/1000000) * avg(d162) avg2, 0.0001 * min(d162) min2, max(d162)/10000 max2 from dtypes;
select avg(d171), min(d171), max(d171), (100/1000000) * avg(d171) avg2, 0.0001 * min(d171) min2, max(d171)/10000 max2 from dtypes;
select truncate(avg(d162), 10), min(d162), max(d162), truncate((100/1000000) * avg(d162), 10) avg2, 0.0001 * min(d162) min2, max(d162)/10000 max2 from dtypes;
select truncate(avg(d171), 10), min(d171), max(d171), truncate((100/1000000) * avg(d171), 10) avg2, 0.0001 * min(d171) min2, max(d171)/10000 max2 from dtypes;
select avg(d172), min(d172), max(d172), (100/1000000) * avg(d172) avg2, 0.0001 * min(d172) min2, max(d172)/10000 max2 from dtypes;
select avg(d173), min(d173), max(d173), (100/1000000) * avg(d173) avg2, 0.0001 * min(d173) min2, max(d173)/10000 max2 from dtypes;
select avg(d174), min(d174), max(d174), (100/1000000) * avg(d174) avg2, 0.0001 * min(d174) min2, max(d174)/10000 max2 from dtypes;
@ -174,6 +174,6 @@ select avg(d176), min(d176), max(d176), (100/1000000) * avg(d176) avg2, 0.0001 *
select avg(d177), min(d177), max(d177), (100/1000000) * avg(d177) avg2, 0.0001 * min(d177) min2, max(d177)/10000 max2 from dtypes;
select avg(d178), min(d178), max(d178), (100/1000000) * avg(d178) avg2, 0.0001 * min(d178) min2, max(d178)/10000 max2 from dtypes;
select avg(d179), min(d179), max(d179), (100/1000000) * avg(d179) avg2, 0.0001 * min(d179) min2, max(d179)/10000 max2 from dtypes;
select avg(d180), min(d180), max(d180), (100/1000000) * avg(d180) avg2, 0.0001 * min(d180) min2, max(d180)/10000 max2 from dtypes;
select truncate(avg(d180), 10), min(d180), max(d180), truncate((100/1000000) * avg(d180), 10) avg2, 0.0001 * min(d180) min2, max(d180)/10000 max2 from dtypes;
#

View File

@ -18,7 +18,7 @@ drop table if exists `p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess`;
create table `p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess` ( `session_duration` decimal(13,3) not null,`session_idle_down_duration` decimal(13,3) not null, `session_q5_down` int(11) not null ) engine=columnstore default charset=latin1;
insert into p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess values (1032632.1 , 86382, 1273564557);
select session_duration as session_duration, session_idle_down_duration as session_idle_down_duration, session_q5_down as session_q5_down, session_duration*session_q5_down as result_1, (session_duration*session_q5_down)*8 as result_2, (1032632.1*1273564557)*8 as result_3 from p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess t1;
select session_duration as session_duration, session_idle_down_duration as session_idle_down_duration, session_q5_down as session_q5_down, truncate(session_duration*session_q5_down, 2) as result_1, truncate((session_duration*session_q5_down)*8, 2) as result_2, (1032632.1*1273564557)*8 as result_3 from p2_loaded_uh_p_xml_fsc_2x_for_agg_201310_valid_sess t1;
#-- bug2437
--disable_warnings
@ -26,8 +26,8 @@ drop table if exists bug2437;
--enable_warnings
create table bug2437 (col1 decimal(6,4)) engine=columnstore;
insert into bug2437 values (10.0001);
select col1*2.0002*2.0000002*0.999999999999 from bug2437;
select col1*4.00040040003599959959996 from bug2437;
select truncate(col1*2.0002*2.0000002*0.999999999999, 9) from bug2437;
select truncate(col1*4.00040040003599959959996, 9) from bug2437;
#-- bug5697
select (count(*)/72143371)*100,(6001215/72143371)*100,(count(*)*100)/72143371,(6001215*100)/72143371 from lineitem;