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

window function expression error (Error: should be in GROUP BY clause)

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 6.4.2
    • Icebox
    • DMLProc
    • None
    • Centos 7
      MariaDB 10.8.4
      Columnstore 6.4.3 (though not in affected versions list. see releasnum below)

    Description

      This is causing the query to fail and error stating it should be in GROUP BY clause. This is only occurs for Columnstore table, while MyISAM table has no issue.

      MariaDB [com_db]> SELECT hour_ct,
      > ADDDATE( DATE_FORMAT( hour_ct, '%Y%m-%d 00:00:00' ), INTERVAL 0 SECOND ) AS temp0,
      -> count(hour_ct) over(partition by left(hour_ct,10))
      -> FROM com_db.DC_MNI_mvcore_video_hourly
      -> WHERE ((hour_ct >= TIMESTAMP('2022-08-07 00:00:00')) AND (hour_ct < TIMESTAMP('2022-08-08 00:00:00')))
      -> GROUP BY hour_ct,temp0;
      ERROR 1815 (HY000): Internal error: MCS-2021: 'Expression/Function' 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.
      MariaDB [com_db]>

      [root@f68eac01f002 columnstore]# pwd
      /usr/share/columnstore
      [root@f68eac01f002 columnstore]# cat releasenum
      version=6.4.3
      release=1

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbsoul Majdi Bsoul
            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.