1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00
Files
mariadb-columnstore-engine/mysql-test/columnstore/autopilot/t/mcs6894_outerjoin_threeTables.test
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

67 lines
2.7 KiB
Plaintext
Executable File

# -------------------------------------------------------------- #
# Test case migrated from Autopilot outer join test suite
#
# Author: Daniel Lee, daniel.lee@mariadb.com
# -------------------------------------------------------------- #
#
--source ../include/have_columnstore.inc
#
USE outerjoin;
#
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
join region r on n.n_regionkey = r.r_regionkey
join customer c on n.n_nationkey = c.c_nationkey
where c_custkey < 100
order by 1, 2, 3, 4;
#
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
left join region r on n.n_regionkey = r.r_regionkey
left join customer c on n.n_nationkey = c.c_nationkey
where c_custkey < 100
order by 1, 2, 3, 4;
#
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
right join region r on n.n_regionkey = r.r_regionkey
right join customer c on n.n_nationkey = c.c_nationkey
where c_custkey < 100
order by 1, 2, 3, 4;
#
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
left join region r on n.n_regionkey = r.r_regionkey
right join customer c on n.n_nationkey = c.c_nationkey
where c_custkey < 100
order by 1, 2, 3, 4;
#
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
right join region r on n.n_regionkey = r.r_regionkey
left join customer c on n.n_nationkey = c.c_nationkey
where c_custkey < 100
order by 1, 2, 3, 4;
#
# filter in subquery
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
join region r on n.n_regionkey = r.r_regionkey
join (select * from customer where c_custkey < 100) c on n.n_nationkey = c.c_nationkey
order by 1, 2, 3, 4;
#
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
left join region r on n.n_regionkey = r.r_regionkey
left join (select * from customer where c_custkey < 100) c on n.n_nationkey = c.c_nationkey
order by 13, 2, 3, 4;
#
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
right join region r on n.n_regionkey = r.r_regionkey
right join (select * from customer where c_custkey < 100) c on n.n_nationkey = c.c_nationkey
order by 1, 2, 3, 4;
#
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
left join region r on n.n_regionkey = r.r_regionkey
right join (select * from customer where c_custkey < 100) c on n.n_nationkey = c.c_nationkey
order by 1, 2, 3, 4;
#
select c.c_custkey, n.n_nationkey, r.r_regionkey, c.*, n.*, r.* from nation n
right join region r on n.n_regionkey = r.r_regionkey
left join (select * from customer where c_custkey < 100) c on n.n_nationkey = c.c_nationkey
order by 17, 2, 3, 4;
#