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

Regression: CEIL incorrect for certain decimal numbers

    XMLWordPrintable

    Details

    • Sprint:
      2021-8, 2021-9

      Description

      The CEIL() function can return an incorrect result for certain inputs.
      See working_tpch1/qa_fe_cnxFunctions/bug3334_ceil.sql

      There are a number of queries in the test that report incorrect results, but one can exemplify the issue.
      select 'ceil(d121/3)', id as id, d121/3, ceil(d121/3) as val from dtypes;

      where d121 is defined as decimal(15,1).
      Because of the expression inside the ceil function, the internal scale is shifted.
      Inside getRoundedIntegralPart(), the scale handling appears to cause a 0 rather than a 1 to be emitted for d121 = .2

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              David.Hall David Hall
              Reporter:
              David.Hall David Hall
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration