Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Duplicate
-
5.5.1
-
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
|