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

SELECT DISTINCT is not picking empty strings

    XMLWordPrintable

Details

    Description

      SELECT DISTINCT is not picking empty strings.

      Repro
      ------
      create table t1 (t text,c char(10),b blob) engine = columnstore;
      insert into t1 values (NULL,NULL,NULL);
      insert into t1 values ("","","");
      insert into t1 values ("hello","hello","hello");
      insert into t1 values ("HELLO","HELLO","HELLO");
      insert into t1 values ("HELLO MY","HELLO MY","HELLO MY");
      insert into t1 values ("a","a","a");
      insert into t1 values (1,1,1);
      insert into t1 values (NULL,NULL,NULL);
      update t1 set c="",b=null where c="1";
      update t1 set b="NewBlob" where c="a";
      update t1 set t="newhello", c="newhello" where b="hello";

      InnoDB> select distinct b from t1;
      ----------

      b
      ----------

      NULL

      hello
      HELLO
      HELLO MY
      NewBlob
      ----------
      6 rows in set (0.001 sec)

      Columnstore> select distinct b from t1;
      ----------

      b
      ----------

      NULL
      hello
      HELLO
      HELLO MY
      NewBlob
      ----------
      5 rows in set (0.008 sec)

      Attachments

        Activity

          People

            leonid.fedorov Leonid Fedorov
            susil.behera Susil Behera
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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