Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
1.4.4, 1.5.3
-
None
Description
ColumnStore does not support cartesian joins.
When a View is created on a query containing a cartesian join, instead of reporting a failure, the view executes with incorrect results. If, however, the query inside the view is executed on it's own, appropriate error is reported.
Following are steps to reproduce (these queries are taken from working_tpch1_compareLogOnly/view/mts_view.50.sql):
MariaDB [test]> create table t1 (x int, y int) engine=columnstore; |
Query OK, 0 rows affected (0.334 sec) |
|
MariaDB [test]> create table t2 (x int, y int, z int) engine=columnstore; |
Query OK, 0 rows affected (0.342 sec) |
|
MariaDB [test]> create table t3 (x int, y int, z int) engine=columnstore; |
Query OK, 0 rows affected (0.334 sec) |
|
MariaDB [test]> create table t4 (x int, y int, z int) engine=columnstore; |
Query OK, 0 rows affected (0.402 sec) |
|
MariaDB [test]> insert into t1 values (1, 1), (2, 2), (3, null); |
Query OK, 3 rows affected (0.198 sec) |
Records: 3 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> insert into t2 values (1, 1, 1), (2, 2, null), (3, null, null); |
Query OK, 3 rows affected (0.199 sec) |
Records: 3 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> insert into t3 values (1, 1, 1), (2, 2, null), (3, null, null); |
Query OK, 3 rows affected (0.193 sec) |
Records: 3 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> insert into t4 values (1, 1, 1), (2, 2, null), (3, null, null); |
Query OK, 3 rows affected (0.197 sec) |
Records: 3 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> select t1.x from ((t1 join t2 on ((t1.y = t2.y))) join (t3 left join t4 on (t3.y = t4.y) and (t3.z = t4.z))) |
-> ;
|
ERROR 1815 (HY000): Internal error: IDB-1000: 't1, t2' and 't3, t4' are not joined. |
MariaDB [test]> create view v1 as select t1.x from ((t1 join t2 on ((t1.y = t2.y))) join (t3 left join t4 on (t3.y = t4.y) and (t3.z = t4.z))); |
Query OK, 0 rows affected (0.016 sec) |
|
MariaDB [test]> select * from v1; |
+------+ |
| x |
|
+------+ |
| NULL | |
| NULL | |
| NULL | |
+------+ |
3 rows in set (0.074 sec) |