1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

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>
This commit is contained in:
Daniel Lee
2022-08-09 13:20:56 -05:00
committed by GitHub
parent 8b15e2f6a4
commit 4c9d6e39ac
6839 changed files with 10542409 additions and 77 deletions

View File

@ -0,0 +1,47 @@
USE tpch1;
drop table if exists testnulldate;
Warnings:
Note 1051 Unknown table 'tpch1.testnulldate'
create table testnulldate (id int, time_stamp datetime) engine=columnstore;
insert into testnulldate values (1, '2010-11-08 17:46:44');
insert into testnulldate values (2, null);
insert into testnulldate values (3, SUBDATE('2010-11-08 17:46:44', 1));
select
id,
`time_stamp`,
DATE(`time_stamp`) as `Date`,
case when `time_stamp` is null then 'N/A' else DATE(`time_stamp`) end as
`Test1`,
ifnull((DATE(`time_stamp`)),'N/A') as `Test2`,
if(`time_stamp` is null, 'N/A', DATE(`time_stamp`)) as `Test3`,
if(`time_stamp`<='2010-11-08 17:46:44',DATE(`time_stamp`),'N/A') as `Test4`,
if(`time_stamp`<='2010-11-08 17:46:44',DATE(`time_stamp`),DATE('2010-11-08 17:46:44')) as `Test5`
from testnulldate;
id time_stamp Date Test1 Test2 Test3 Test4 Test5
1 2010-11-08 17:46:44 2010-11-08 2010-11-08 2010-11-08 2010-11-08 2010-11-08 2010-11-08
2 NULL NULL N/A N/A N/A N/A 2010-11-08
3 2010-11-07 17:46:44 2010-11-07 2010-11-07 2010-11-07 2010-11-07 2010-11-07 2010-11-07
select
id,
`time_stamp`,
YEAR(`time_stamp`) as `Date`,
case when `time_stamp` is null then 'N/A' else YEAR(`time_stamp`) end as
`Test1`,
ifnull((YEAR(`time_stamp`)),'N/A') as `Test2`,
if(`time_stamp` is null, 'N/A', YEAR(`time_stamp`)) as `Test3`,
if(`time_stamp`<='2010-11-08 17:46:44',YEAR(`time_stamp`),'N/A') as `Test4`,
if(`time_stamp`<='2010-11-08 17:46:44',YEAR(`time_stamp`),DATE('2010-11-08 17:46:44')) as `Test5`
from testnulldate;
id time_stamp Date Test1 Test2 Test3 Test4 Test5
1 2010-11-08 17:46:44 2010 2010 2010 2010 2010 2010
2 NULL NULL N/A N/A N/A N/A 2010-11-08
3 2010-11-07 17:46:44 2010 2010 2010 2010 2010 2010
select
id,
case when `time_stamp` is null then 'N/A' end as `Test1`
from testnulldate;
id Test1
1 NULL
2 N/A
3 NULL
drop table if exists testnulldate;