[MCOL-5355] Add support for MCS-2030: Predicate and Logic operators can not be used where an expression is expected. needed for TPC-DS Created: 2022-12-16  Updated: 2023-07-02

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: 23.10

Type: Bug Priority: Major
Reporter: Gagan Goel (Inactive) Assignee: Sergey Zefirov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks

 Description   

The following simple query errors out in ColumnStore:

MariaDB [test]> create table t1 (a int, b int)engine=columnstore;
Query OK, 0 rows affected (0.525 sec)
 
MariaDB [test]> insert into t1 values (1, 0), (1, 1), (0, 1), (0, 0);
Query OK, 4 rows affected (1.154 sec)
Records: 4  Duplicates: 0  Warnings: 0
 
MariaDB [test]> select * from t1;
+------+------+
| a    | b    |
+------+------+
|    1 |    0 |
|    1 |    1 |
|    0 |    1 |
|    0 |    0 |
+------+------+
4 rows in set (0.126 sec)
 
MariaDB [test]> select a || b from t1;
ERROR 1178 (42000): The storage engine for the table doesn't support MCS-2030: Predicate and Logic operators can not be used where an expression is expected.
 
MariaDB [test]> select a xor b from t1;
ERROR 1178 (42000): The storage engine for the table doesn't support MCS-2030: Predicate and Logic operators can not be used where an expression is expected.

Expected output is as follows (i1 is the equivalent InnoDB table):

MariaDB [test]> select a || b from i1;
+--------+
| a || b |
+--------+
|      1 |
|      1 |
|      1 |
|      0 |
+--------+
4 rows in set (0.001 sec)
 
MariaDB [test]> select a xor b from i1;
+---------+
| a xor b |
+---------+
|       1 |
|       0 |
|       1 |
|       0 |
+---------+
4 rows in set (0.001 sec)

There are other very simple SQL queries as well that fail due to this error. Some of them are reported in earlier bug tickets:
MCOL-192
MCOL-1504
MCOL-1155


Generated at Thu Feb 08 02:57:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.