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

AVG_DISTINCT Window Function returns values with incorrect scale

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 1.4.2
    • None
    • None
    • 2019-06

    Description

      The following example demonstrates the incorrect scale of the resulting values, which is reduced by a factor of 10^4:

      MariaDB [tpch1]> SELECT AVG(distinct salary) OVER (PARTITION BY depname) from empsalary where empno < 10000 order by empno;
      +--------------------------------------------------+
      | AVG(distinct salary) OVER (PARTITION BY depname) |
      +--------------------------------------------------+
      |                                           0.4900 |
      |                                           0.3700 |
      |                                           0.4900 |
      |                                           0.4900 |
      |                                           0.3700 |
      |                                           0.4975 |
      |                                           0.4975 |
      |                                           0.4975 |
      |                                           0.4975 |
      |                                           0.4975 |
      |                                           0.4975 |
      +--------------------------------------------------+
      11 rows in set, 1 warning (2 min 16.044 sec)
      

      Attachments

        Activity

          People

            dleeyh Daniel Lee (Inactive)
            tntnatbry Gagan Goel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.