1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-21 19:45:56 +03:00
Daniel Lee 4c9d6e39ac
Dlee mtr restructure (#2494)
* Restructured test suites and added autopilot and extended suites

* Updated autopilot with correct branch - develop

* Moved setup test case to a 'setup' directory, for consistency

* Fixed a path issue

* Updated some tests cases to keep up with development

Co-authored-by: root <root@rocky8.localdomain>
2022-08-09 21:20:56 +03:00

71 lines
3.6 KiB
Plaintext

# -------------------------------------------------------------- #
# Test case migrated from regression test suite: bug2589.sql
#
# Author: Daniel Lee, daniel.lee@mariadb.com
# -------------------------------------------------------------- #
#
--source ../include/have_columnstore.inc
#
USE tpch1;
#
select cidx, cbigint, round(cbigint) from datatypetestm;
select cidx, cbigint, round(cbigint,0) from datatypetestm;
select cidx, cbigint, round(cbigint,1) from datatypetestm;
select cidx, cbigint, round(cbigint,-1) from datatypetestm;
select cidx, cdecimal4_2, round(cdecimal4_2) from datatypetestm;
select cidx, cdecimal4_2, round(cdecimal4_2,2) from datatypetestm;
select cidx, cdecimal4_2, round(cdecimal4_2,0) from datatypetestm;
select cidx, cdecimal4_2, round(cdecimal4_2,-2) from datatypetestm;
select cidx, cdecimal18_2, round(cdecimal18_2,1) from datatypetestm;
select cidx, cdecimal18_2, round(cdecimal18_2,-1) from datatypetestm;
select cidx, cbigint from datatypetestm where round(cbigint) <> cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,1) <> cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,2) <> cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,0) <> cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,-2) <> cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,-1) <> cbigint;
select cidx, cbigint from datatypetestm where round(cbigint) = cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,1) = cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,2) = cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,0) = cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,-2) = cbigint;
select cidx, cbigint from datatypetestm where round(cbigint,-1) = cbigint;
select cidx, cdecimal4_2 from datatypetestm where round(cdecimal4_2,2) > cdecimal4_2;
select cidx, cdecimal4_2 from datatypetestm where round(cdecimal4_2,0) > cdecimal4_2;
select cidx, cdecimal4_2 from datatypetestm where round(cdecimal4_2,-1) > cdecimal4_2;
select cidx, cdecimal18_2 from datatypetestm where round(cdecimal18_2) < cdecimal18_2;
select cidx, cdecimal18_2 from datatypetestm where round(cdecimal18_2,1) < cdecimal18_2;
select cidx, cdecimal18_2 from datatypetestm where round(cdecimal18_2,2) < cdecimal18_2;
select cidx, cdecimal18_2 from datatypetestm where round(cdecimal18_2,0) < cdecimal18_2;
select cidx, cdecimal18_2 from datatypetestm where round(cdecimal18_2,-2) < cdecimal18_2;
select cidx, cdecimal18_2 from datatypetestm where round(cdecimal18_2,-1) < cdecimal18_2;
select round(r_regionkey, 0) from region;
select round(r_regionkey, -1) from region;
select round(r_regionkey, 1) from region;
select round(r_name, 2) from region;
select concat(n_name, round(n_nationkey, 0)) from nation;
select concat(n_name, round(n_nationkey, 1)) from nation;
select concat(n_name, round(n_nationkey, 2)) from nation;
select concat(n_name, round(n_nationkey, -1)) from nation;
select concat(n_name, round(n_nationkey, -2)) from nation;
select concat(n_name, round(n_nationkey/10, -1)) from nation;
select concat(n_name, round(n_nationkey/10, -2)) from nation;
select concat(n_name, round(n_nationkey/10, 1)) from nation;
select concat(n_name, round(n_nationkey/10, 2)) from nation;
select round(n_nationkey / n_regionkey - (n_nationkey * n_nationkey), 2) as rnd from nation, region where n_regionkey = r_regionkey order by 1;
select length(substr(n_name, round(n_nationkey / 10))) from nation;
select substr(cchar255, round(cdecimal1, 0),3) from datatypetestm where length(cchar255) > 5;
#