[MCOL-965] group_contact with order by on joined table causes error Created: 2017-10-10 Updated: 2017-10-23 Resolved: 2017-10-23 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MDB Plugin |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | 1.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Hall (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 2017-20, 2017-21 | ||||||||
| Description |
|
When working on After fixing the crash issue, the query fails with: This query works in 1.0 CREATE TABLE `phased_genotype` ( `animalID` varchar(18) DEFAULT NULL, `mid` int(11) DEFAULT NULL, `phase` tinyint(4) DEFAULT NULL ) ENGINE=Columnstore DEFAULT CHARSET=utf8; CREATE TABLE `phased_snp_info` ( `mid` int(11) DEFAULT NULL, `chr` tinyint(4) DEFAULT NULL, `position` bigint(20) DEFAULT NULL, `g_position` int(11) DEFAULT NULL ) ENGINE=Columnstore DEFAULT CHARSET=utf8; select animalID,group_concat(phase order by b.g_position separator '') as g from phased_genotype a,phased_snp_info b where a.mid=b.mid group by animalID; |
| Comments |
| Comment by David Hall (Inactive) [ 2017-10-11 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
There is special Columnstore code in sql_select.cc to prevent just this issue. Unfortunately, the surrounding code has been changed to the point that the action was being taken too soon, so the special code had to move a few lines: // @InfiniDB We don't need tmp table for vtable create phase. Plus Moving this to below the call to make_join_readinfo() fixes the problem. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-10-23 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 1.1.1-1 GitHub source Verified reported test case, as well as test case with data. MariaDB [mytest]> CREATE TABLE `phased_genotype` ( `animalID` varchar(18) DEFAULT NULL, `mid` int(11) DEFAULT NULL, `phase` tinyint(4) DEFAULT NULL ) ENGINE=Columnstore DEFAULT CHARSET=utf8; MariaDB [mytest]> CREATE TABLE `phased_snp_info` ( `mid` int(11) DEFAULT NULL, `chr` tinyint(4) DEFAULT NULL, `position` bigint(20) DEFAULT NULL, `g_position` int(11) DEFAULT NULL ) ENGINE=Columnstore DEFAULT CHARSET=utf8; MariaDB [mytest]> select animalID,group_concat(phase order by b.g_position separator '') as g from phased_genotype a,phased_snp_info b where a.mid=b.mid group by animalID; MariaDB [mytest]> select animalID,group_concat(phase order by b.g_position separator ' ') as g from phased_genotype a,phased_snp_info b where a.mid=b.mid group by animalID;
---------
--------- MariaDB [mytest]> select * from phased_genotype;
---------
--------- MariaDB [mytest]> select * from phased_snp_info;
-----
----- |