[MCOL-4431] regr_r2() and corr() outputs differ from the example DBMS Created: 2020-12-03  Updated: 2020-12-03  Resolved: 2020-12-03

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 5.5.1
Fix Version/s: 5.5.1

Type: Bug Priority: Minor
Reporter: Roman Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-4429 REGR_R2() results differ when compare... Open
relates to MCOL-4430 CORR() results differ when compared t... Open

 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


Generated at Thu Feb 08 02:50:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.