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

Identical expressions in SELECT part are not recognized as being part of GROUP BY part

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      The script:

      DROP DATABASE IF EXISTS MCOL_678;
       
      CREATE DATABASE MCOL_678;
       
      USE MCOL_678;
       
      CREATE TABLE t(ci1 integer, ci2 integer) engine=columnstore;
       
      INSERT INTO t(ci1, ci2) VALUES (NULL, 1), (NULL, 2), (1,3), (1,4), (2,5), (2,6), (3,7), (3,8);
      SELECT ci1+ci2, ci1+ci2, SUM(ci2), AVG(ci2) FROM t GROUP BY ci1+ci2, ci1+ci2;
      DROP TABLE t;
       
      DROP DATABASE MCOL_678;
      

      Columnstore complains with ERROR 1815 (HY000) at line 14: Internal error: MCS-2021: 'ci1+ci2' is not in GROUP BY clause. All non-aggregate columns in the SELECT and ORDER BY clause must be included in the GROUP BY clause..

      Server accepts and returns correct results.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sergey.zefirov Sergey Zefirov
            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.