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

GROUP_CONCAT() precision loss for huge narrow decimal

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.6.1, 6.1.1, 5.5.1
    • Fix Version/s: 6.1.1
    • Component/s: PrimProc
    • Labels:
      None
    • Sprint:
      2021-5, 2021-6

      Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a DECIMAL(17,1)) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES (-8999999999999999.9);
      SELECT GROUP_CONCAT(a) FROM t1;
      

      +---------------------+
      | GROUP_CONCAT(a)     |
      +---------------------+
      | -9000000000000000.0 |
      +---------------------+
      

      Looks wrong. The expected result is '-8999999999999999.9'.

      This happens because the underlying printing code in GroupConcator::outputRow() uses double representation.
      It should be fixed to print DECIMAL natively.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dleeyh Daniel Lee
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration