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

Garbage result of a union between huge narrow DECIMAL and BIGINT

Details

    • 2021-7

    Description

      This ticket is for 5.6.1 only. Testing in 6.1.1 will need to wait until MCOL-4612 is MERGED into develop branch

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
      SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
      

      +-----------------------+
      | a                     |
      +-----------------------+
      |    9999999999999999.9 |
      | -844674407370955162.6 |
      +-----------------------+
      

      Looks wrong.

      Note, the problem cannot be repeated in 6.x because of MCOL-4612
      But perhaps it still exists. MCOL-4612 needs to be fixed first to verify it further in 6.x.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            Description {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.
            {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 5.6 because of
            bar Alexander Barkov made changes -
            Summary Wrong result of a union between huge narrow DECIMAL and BIGINT Garbage result of a union between huge narrow DECIMAL and BIGINT
            bar Alexander Barkov made changes -
            Description {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 5.6 because of
            {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 5.6 because of MCOL-4613
            bar Alexander Barkov made changes -
            Priority Major [ 3 ] Blocker [ 1 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Description {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 5.6 because of MCOL-4613
            {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 6.x because of MCOL-4613
            bar Alexander Barkov made changes -
            Affects Version/s 5.6.1 [ 25031 ]
            Affects Version/s 5.5.1 [ 25030 ]
            bar Alexander Barkov made changes -
            Fix Version/s 5.6.1 [ 25031 ]
            Fix Version/s 5.5.2 [ 25601 ]
            bar Alexander Barkov made changes -
            Description {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 6.x because of MCOL-4613
            {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 6.x because of MCOL-4613
            But perhaps it still exists. MCOL-4613 needs to be fixed first to verify it further in 6.x.
            bar Alexander Barkov made changes -
            Assignee Gagan Goel [ tntnatbry ]
            bar Alexander Barkov made changes -
            Assignee Gagan Goel [ tntnatbry ] Alexander Barkov [ bar ]
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Gagan Goel [ tntnatbry ]
            bar Alexander Barkov made changes -
            Description {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 6.x because of MCOL-4613
            But perhaps it still exists. MCOL-4613 needs to be fixed first to verify it further in 6.x.
            {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 6.x because of MCOL-4612
            But perhaps it still exists. MCOL-4612 needs to be fixed first to verify it further in 6.x.
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            bar Alexander Barkov made changes -
            gdorman Gregory Dorman (Inactive) made changes -
            Sprint 2021-7 [ 514 ]
            gdorman Gregory Dorman (Inactive) made changes -
            Rank Ranked lower
            tntnatbry Gagan Goel (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            tntnatbry Gagan Goel (Inactive) made changes -
            Assignee Gagan Goel [ tntnatbry ] Alexander Barkov [ bar ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Gagan Goel [ tntnatbry ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            tntnatbry Gagan Goel (Inactive) made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            tntnatbry Gagan Goel (Inactive) made changes -
            Status In Progress [ 3 ] In Testing [ 10301 ]
            tntnatbry Gagan Goel (Inactive) made changes -
            Assignee Gagan Goel [ tntnatbry ] Daniel Lee [ dleeyh ]
            dleeyh Daniel Lee (Inactive) made changes -
            Resolution Fixed [ 1 ]
            Status In Testing [ 10301 ] Closed [ 6 ]
            bar Alexander Barkov made changes -
            gdorman Gregory Dorman (Inactive) made changes -
            Affects Version/s 5.5.2 [ 25601 ]
            Affects Version/s All [ 25803 ]
            Affects Version/s 5.6.1 [ 25031 ]
            gdorman Gregory Dorman (Inactive) made changes -
            Labels tech_debt
            gdorman Gregory Dorman (Inactive) made changes -
            Description {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 6.x because of MCOL-4612
            But perhaps it still exists. MCOL-4612 needs to be fixed first to verify it further in 6.x.
            *This ticket is for 5.6.1 only. Testing in 6.1.1 will need to wait until MCOL-4612 is MERGED into develop branch*

            {code:sql}
            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore;
            INSERT INTO t1 VALUES (9999999999999999.9, 999999999999999999);
            SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
            {code}
            {noformat}
            +-----------------------+
            | a |
            +-----------------------+
            | 9999999999999999.9 |
            | -844674407370955162.6 |
            +-----------------------+
            {noformat}

            Looks wrong.

            Note, the problem cannot be repeated in 6.x because of MCOL-4612
            But perhaps it still exists. MCOL-4612 needs to be fixed first to verify it further in 6.x.
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            gdorman Gregory Dorman (Inactive) made changes -
            toddstoffel Todd Stoffel (Inactive) made changes -
            Affects Version/s All [ 25803 ]

            People

              dleeyh Daniel Lee (Inactive)
              bar Alexander Barkov
              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.