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

DISTINCT is case sensitive

    XMLWordPrintable

    Details

      Description

      DISTINCT, as in SELECT DISTINCT c1 from t1 is currently a binary compare in Columnstore. It needs to be utf and case insensitive (for collations that are case insensitve).

      This script demonstrates the problem:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a VARCHAR(20) CHARACTER SET latin1) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES ('a'),('b'),('A'),('B');
      SELECT DISTINCT a FROM t1;
      

      +------+
      | a    |
      +------+
      | a    |
      | b    |
      | A    |
      | B    |
      +------+
      

      Notice, all four rows returned.

      The expected result should consist of two rows only:

      +------+
      | a    |
      +------+
      | a    |
      | b    |
      +------+
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              David.Hall David Hall
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: