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

sum function provides different results between innodb and columnstore

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.0.8, 1.1.0
    • 1.0.9, 1.1.0
    • MDB Plugin
    • None
    • from user, reproduced a single-server google cloud
    • 2017-6, 2017-7

    Description

      CREATE SCHEMA roche_dw;

      CREATE TABLE roche_dw.authorsr (id INT, name VARCHAR(20), email VARCHAR(20));
      INSERT INTO roche_dw.authorsr (id,name,email) VALUES(1,"Vivek","xuz@abc.com");
      INSERT INTO roche_dw.authorsr (id,name,email) VALUES(2,"kaka","auz@abc.com");
      INSERT INTO roche_dw.authorsr (id,name,email) VALUES(3,"ddd","eee@abc.com");
      INSERT INTO roche_dw.authorsr (id,name,email) VALUES(4,"ssss","aaa@abc.com");

      CREATE TABLE roche_dw.authorsc (id INT, name VARCHAR(20), email VARCHAR(20)) engine=columnstore;
      INSERT INTO roche_dw.authorsc (id,name,email) VALUES(1,"Vivek","xuz@abc.com");
      INSERT INTO roche_dw.authorsc (id,name,email) VALUES(2,"kaka","auz@abc.com");
      INSERT INTO roche_dw.authorsc (id,name,email) VALUES(3,"ddd","eee@abc.com");
      INSERT INTO roche_dw.authorsc (id,name,email) VALUES(4,"ssss","aaa@abc.com");

      select sum(1) from roche_dw.authorsr;
      select sum(1) from roche_dw.authorsc;

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

      MariaDB [david]> CREATE SCHEMA roche_dw;
      Query OK, 1 row affected (0.00 sec)

      MariaDB [david]>
      MariaDB [david]> CREATE TABLE roche_dw.authorsr (id INT, name VARCHAR(20), email VARCHAR(20));
      Query OK, 0 rows affected (0.05 sec)

      MariaDB [david]> INSERT INTO roche_dw.authorsr (id,name,email) VALUES(1,"Vivek","xuz@abc.com");
      Query OK, 1 row affected (0.01 sec)

      MariaDB [david]> INSERT INTO roche_dw.authorsr (id,name,email) VALUES(2,"kaka","auz@abc.com");
      Query OK, 1 row affected (0.02 sec)

      MariaDB [david]> INSERT INTO roche_dw.authorsr (id,name,email) VALUES(3,"ddd","eee@abc.com");
      Query OK, 1 row affected (0.00 sec)

      MariaDB [david]> INSERT INTO roche_dw.authorsr (id,name,email) VALUES(4,"ssss","aaa@abc.com");
      Query OK, 1 row affected (0.00 sec)

      MariaDB [david]>
      MariaDB [david]>
      MariaDB [david]>
      MariaDB [david]> CREATE TABLE roche_dw.authorsc (id INT, name VARCHAR(20), email VARCHAR(20)) engine=columnstore;
      Query OK, 0 rows affected (2.55 sec)

      MariaDB [david]> INSERT INTO roche_dw.authorsc (id,name,email) VALUES(1,"Vivek","xuz@abc.com");
      Query OK, 1 row affected (0.22 sec)

      MariaDB [david]> INSERT INTO roche_dw.authorsc (id,name,email) VALUES(2,"kaka","auz@abc.com");
      Query OK, 1 row affected (0.09 sec)

      MariaDB [david]> INSERT INTO roche_dw.authorsc (id,name,email) VALUES(3,"ddd","eee@abc.com");
      Query OK, 1 row affected (0.09 sec)

      MariaDB [david]> INSERT INTO roche_dw.authorsc (id,name,email) VALUES(4,"ssss","aaa@abc.com");
      Query OK, 1 row affected (0.09 sec)

      MariaDB [david]>
      MariaDB [david]>
      MariaDB [david]> select sum(1) from roche_dw.authorsr;
      --------

      sum(1)

      --------

      4

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

      MariaDB [david]> select sum(1) from roche_dw.authorsc;
      --------

      sum(1)

      --------

      1

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

      Attachments

        Activity

          People

            dleeyh Daniel Lee (Inactive)
            hill David Hill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.