Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-3440

CASE statement in the SELECT clause with IN/BETWEEN functions gives incorrect output

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Do
    • None
    • Icebox
    • MDB Plugin
    • 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)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            tntnatbry Gagan Goel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.