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

GROUP BY on duplicate expressions using functions throws error "IDB-2001: ... is not in GROUP BY clause." on Columnstore

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 23.10
    • 23.10.1
    • MariaDB Server
    • MariaDB 10.5.18, Columnstore 5.6.8; RHEL 8.5
    • 2023-11

    Description

      The attached query throws the mentioned error when using Columnstore, but not when using InnoDB.
      Furthermore, using Columnstore, omitting the function calls also works.

      While this is for sure an unconventional query, this is generated by a third-party BI software, where we cannot influence how generation of the SQL statements is done.

      Attachments

        Activity

          I cloned https://jira.mariadb.org/browse/MCOL-5468, which is why the Assignee is set. I have no possibility to UNassign the ticket it seems.

          aeae81 andreas eschbacher added a comment - I cloned https://jira.mariadb.org/browse/MCOL-5468 , which is why the Assignee is set. I have no possibility to UNassign the ticket it seems.
          allen.herrera Allen Herrera added a comment -

          Group by the alias name, not the function

          The following works

          select distinct
          DAYOFWEEK(someDatetime) as C1,
          DAYOFWEEK(someDatetime) as C2,
          SUM(someInt)
          from A_CS
          group by 
          C1,
          C2;
          

          allen.herrera Allen Herrera added a comment - Group by the alias name, not the function The following works select distinct DAYOFWEEK(someDatetime) as C1, DAYOFWEEK(someDatetime) as C2, SUM(someInt) from A_CS group by C1, C2;

          fixed in latest develop (06.12.2023)

          testing finished ok

          kirill.perov@mariadb.com Kirill Perov (Inactive) added a comment - fixed in latest develop (06.12.2023) testing finished ok

          People

            denis0x0D Denis Khalikov (Inactive)
            aeae81 andreas eschbacher
            Roman Roman
            Kirill Perov Kirill Perov (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            6 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.