[MCOL-3804] CLONE - group_concat with distinct concatenates even non-distinct values Created: 2020-02-18  Updated: 2020-03-17  Resolved: 2020-03-17

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.0.15, 1.1.6, 1.2.2
Fix Version/s: 1.2.6

Type: Bug Priority: Minor
Reporter: Patrick LeBlanc (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MCOL-2159 Fix group_concat Closed
is duplicated by MCOL-3805 CLONE - Fix group_concat Closed
Relates
relates to MCOL-1829 Output of 'select * (with order by li... Closed

 Description   

If the group_concat contains distinct together with sorting over non-distinct column CS concatenates distinct values multiple times.

Here is the setting:

create table cs1 (i bigint, a bigint) engine=columnstore;
insert into cs1 values (1,2),(1,3),(2,5),(1,42);

MariaDB [tpch1]> select group_concat(distinct i order by a) s from cs1;
+---------+
| s       |
+---------+
| 1,1,2,1 |
+---------+
1 row in set (0.031 sec)



 Comments   
Comment by Daniel Lee (Inactive) [ 2020-03-17 ]

Build verified: 1.2.6-1 BB

engine commit:
d4173ef

[root@localhost ~]# mcsmysql mytest
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 10.3.16-MariaDB-log Columnstore 1.2.6-1

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mytest]> create table cs1 (i bigint, a bigint) engine=columnstore;
Query OK, 0 rows affected (0.167 sec)

MariaDB [mytest]> insert into cs1 values (1,2),(1,3),(2,5),(1,42);
Query OK, 4 rows affected (0.355 sec)
Records: 4 Duplicates: 0 Warnings: 0

MariaDB [mytest]> select group_concat(distinct i order by a) s from cs1;
------

s

------

1,2

------
1 row in set (0.088 sec)

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