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

regr_r2() and corr() outputs differ from the example DBMS

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • 5.5.1
    • 5.5.1
    • PrimProc
    • None

    Description

      The MTR test mcs199_regr_r2_function fails. The actual output differs from that of example DBMS that is Postgres in this case.

      CREATE TABLE t1 (x INT, y int, z CHAR(5));
      INSERT INTO t1 VALUES (NULL, NULL, ''),(20, 1, 'aaa'),(39, 2, 'aaa'),(48, 3, 'bbb'),(57, 4, 'bbb'),(66, 5, 'aaa'),(75, 6, 'aaa'),(84, 7, 'bbb');
      

      Here is the output from PG 12

      SELECT REGR_R2(y, x) FROM t1;
      0.9814869668246445
      

      SELECT z, REGR_R2(y, x) FROM t1 GROUP BY z ORDER BY z;
      aaa	0.9798973217047072
      bbb	1
      

      MTR test mcs192_corr_function. Same issue.

      PG12 returns

      SELECT z, CORR(y, x) FROM t1 GROUP BY z ORDER BY z;
      1
      

      whilst MCS returns

      SELECT z, CORR(y, x) FROM t1 GROUP BY z ORDER BY z;
      0.9999999999999999
      

      Attachments

        Issue Links

          Activity

            People

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