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

Regression: CEIL incorrect for certain decimal numbers

    XMLWordPrintable

Details

    • 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

              David.Hall David Hall (Inactive)
              David.Hall David Hall (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1d
                  1d
                  Remaining:
                  Remaining Estimate - 1d
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.