[MCOL-4373] UDAF + multiple DISTINCT in projection produces an invalid answer Created: 2020-11-02  Updated: 2021-01-14

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 5.4.1
Fix Version/s: Icebox

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

Issue Links:
Relates
relates to MCOL-641 Full DECIMAL support in ColumnStore Closed

 Description   

Here is the way to reproduce.

DROP TABLE IF EXISTS cs1;
 
CREATE TABLE cs1 (d1 DECIMAL(18), d2 DECIMAL(18,10), d3 DECIMAL(18,18), d4 DECIMAL(18),d5 DECIMAL(18),i1 INT) ENGINE=columnstore;
 
INSERT INTO cs1 VALUES
    (1234,5678,-0.1234567890,2,1,1),     
    (1234,-5678,0.1234567890,2,1,1),
    (123456789012,12345012.9012345678,0.12345634567890,2,1,1),
    (NULL,NULL,NULL,2,1,1),
    (0,0,0,2,1,1),
    (1234,5678,0.123456789012345678,3,2,2),
    (-123456789123456789,-5678,0.123456782345678,3,2,2),
    (12345678901234567,1234524.9012345678,0.1234567895678908,3,2,2),
    (NULL,NULL,NULL,3,2,2),
    (0,0,0,3,2,2),
    (1234,5678,-0.12345673,11111111111111111,1,1),
    (1234,5678,-0.12345673,11111111111111111,1,1),
    (1234,5678,-0.12345673,11111111111111112,1,1); 
select  regr_avgx(d1,d2), count(distinct (d4)), count(distinct (d3)), count(distinct (d2)) from cs1 group by d1;

One of the columns has all zeros.


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