[MCOL-4273] SELECT...union/intersect/except...ORDER BY results are not consistent Created: 2020-08-25 Updated: 2023-10-27 Resolved: 2023-10-27 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | None |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Major |
| Reporter: | susil.behera | Assignee: | Leonid Fedorov |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Server version: 10.5.6 |
||
| Description |
|
SELECT...UNION...ORDER BY results are not consistent on both the engines Columnstore and Innodb. Due to this some tests are failing. MariaDB [test]> CREATE TABLE t1 (t1_int INT, t1_char CHAR(5))ENGINE=Columnstore; MariaDB [test]> CREATE TABLE t2 (t2_int INT, t2_char CHAR(5))ENGINE=Columnstore; MariaDB [test]> INSERT INTO t1 VALUES (NULL, ''),(1, 'aaa'),(2, 'aaa'),(3, 'ccc'),(4, 'ddd'),(5, 'aaa'),(6, ''),(7, 'eee'); MariaDB [test]> INSERT INTO t2 VALUES (NULL, ''),(1, 'eee'),(3, 'ccc'),(5, 'jjj'),(6, ''),(7, 'lll'),(9, 'eee'),(11, 'nnn'); Run 1 -
--------
-------- Run 2 -
--------
-------- Run 3 -
--------
-------- Run 4 -
--------
-------- Run 5 -
--------
-------- Run 6 -
--------
-------- Run 7 -
--------
-------- Run 8 (here it started giving different result) -
--------
-------- Run 9 -
--------
-------- Run 10 -
--------
-------- |
| Comments |
| Comment by susil.behera [ 2020-08-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
INTERSECT results are also inconsistent. MariaDB [test]> SELECT t1_char, t1_int FROM t1 INTERSECT SELECT t2_char, t2_int FROM t2 ORDER BY 1;
--------
-------- MariaDB [test]> SELECT t1_char, t1_int FROM t1 INTERSECT SELECT t2_char, t2_int FROM t2 ORDER BY 1;
--------
-------- EXCEPT results are also inconsistent. MariaDB [test]> SELECT t1_char, 'Character' AS Table1 FROM t1 EXCEPT SELECT t2_int, 'Integer' AS Table2 FROM t2 ORDER BY 2 ASC;
--------
-------- MariaDB [test]> SELECT t1_char, 'Character' AS Table1 FROM t1 EXCEPT SELECT t2_int, 'Integer' AS Table2 FROM t2 ORDER BY 2 ASC;
--------
-------- MariaDB [test]> SELECT t1_char, 'Character' AS Table1 FROM t1 EXCEPT SELECT t2_int, 'Integer' AS Table2 FROM t2 ORDER BY 2 ASC;
--------
-------- UNION ALL results are also inconsistent. MariaDB [test]> SELECT t1_char, 'Character' AS Table1 FROM t1 UNION ALL SELECT t2_int, 'Integer' AS Table2 FROM t2 ORDER BY 2 ASC;
--------
-------- MariaDB [test]> SELECT t1_char, 'Character' AS Table1 FROM t1 UNION ALL SELECT t2_int, 'Integer' AS Table2 FROM t2 ORDER BY 2 ASC;
--------
-------- MariaDB [test]> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-09-02 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
susil.behera MCS doesn't support nor EXCEPT nor INTERCEPT logic. |