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

HAVING comparing ABS() result returns incorrect values

    XMLWordPrintable

Details

    Description

      The legacy regression test working_tpch1_compareLogOnly/having/having2.sql has a failure running the query:

      MariaDB [tpch1]> select cinteger, abs(avg(cinteger)) from DataTypeTestm group by cinteger having abs(avg(cinteger)) > 7483645;
      +----------+--------------------+
      | cinteger | abs(avg(cinteger)) |
      +----------+--------------------+
      |  7483646 |       7483646.0000 |
      |  7483647 |       7483647.0000 |
      +----------+--------------------+
      2 rows in set (0.011 sec)
      

      The correct result is however:

      MariaDB [tpch1]> select cinteger, abs(avg(cinteger)) from test42 group by cinteger having abs(avg(cinteger)) > 7483645;
      +----------+--------------------+
      | cinteger | abs(avg(cinteger)) |
      +----------+--------------------+
      | -7483646 |       7483646.0000 |
      |  7483646 |       7483646.0000 |
      |  7483647 |       7483647.0000 |
      +----------+--------------------+
      3 rows in set (0.001 sec)
      

      As you can see the 3d record with a negative cinteger value isn't returned.

      Attachments

        Activity

          People

            Unassigned Unassigned
            drrtuy Roman
            Votes:
            2 Vote for this issue
            Watchers:
            5 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.