[MCOL-3440] CASE statement in the SELECT clause with IN/BETWEEN functions gives incorrect output Created: 2019-08-19  Updated: 2023-03-06  Resolved: 2023-03-06

Status: Closed
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: None
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: Gagan Goel (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None


 Description   

Here are the steps to reproduce the issue:

MariaDB [test]> create table t2 (a int, b int)engine=columnstore;
Query OK, 0 rows affected (0.372 sec)
 
MariaDB [test]> insert into t2 values (1,1), (1,2), (2,1);
Query OK, 3 rows affected (0.439 sec)
Records: 3  Duplicates: 0  Warnings: 0
 
MariaDB [test]> select a, (case when a in (1,2) then b in (1,2) else b in (1,3) end) from t2;
+------+------------------------------------------------------------+
| a    | (case when a in (1,2) then b in (1,2) else b in (1,3) end) |
+------+------------------------------------------------------------+
|    1 |                                                          0 |
|    1 |                                                          0 |
|    2 |                                                          0 |
+------+------------------------------------------------------------+
3 rows in set (0.067 sec)



 Comments   
Comment by Todd Stoffel (Inactive) [ 2023-03-06 ]

This ticket was created prior to convergence with the server and may be obsolete. If you find this issue still exists in a modern version, please open a new ticket.

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