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

CTAS (Create Table as Select) with COUNT() ... FROM ... GROUP BY ... throws syntax error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.4, 1.5.3
    • 5.5.2
    • DDLProc
    • None
    • 2021-1, 2021-2

    Description

      Build tested: 1.4.3-1
      OS: centos 7
      Stack: single server

      CREATE TABLE ... ENGINE=columnstore AS SELECT ...COUNT() ... FROM ... GROUP BY ... throws syntax error.

      MariaDB [db1]> SELECT version();
      -------------------

      version()

      -------------------

      10.4.12-6-MariaDB

      -------------------
      1 row in set (0.000 sec)

      MariaDB [db1]> CREATE TABLE src (c0 int, c1 int);
      Query OK, 0 rows affected (0.016 sec)

      MariaDB [db1]> INSERT INTO src VALUES (1,1),(1,1),(1,1),(2,2),(2,2),(2,2),(3,3),(3,3),(3,3);
      Query OK, 9 rows affected (0.005 sec)
      Records: 9 Duplicates: 0 Warnings: 0

      MariaDB [db1]> CREATE TABLE tgt1 AS SELECT c0, count(c0) FROM src GROUP BY c0;
      Query OK, 3 rows affected (0.020 sec)
      Records: 3 Duplicates: 0 Warnings: 0

      MariaDB [db1]> SELECT * FROM tgt1;
      ---------------+

      c0 count(c0)

      ---------------+

      1 3
      2 3
      3 3

      ---------------+
      3 rows in set (0.001 sec)

      MariaDB [db1]> CREATE TABLE tgt2 engine = columnstore AS SELECT c0, count(c0) FROM src GROUP BY c0;
      ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.
      MariaDB [db1]>

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              susil.behera susil.behera
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.