[MCOL-3295] group by order by error Created: 2019-05-07  Updated: 2020-08-25  Resolved: 2019-06-13

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: 1.2.3
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: David Hill (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

Customer asked if this is a group by order by error or BUG?

It seems that group by order by is not working, it requests a bigger sorting length but in fact it is working with the order by just fine. I tried increasing this max_length_for_sort_data it should not be greater than 4096000.

Select statement in following protecting comments



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2019-05-07 ]

This is a difficult one. It is a limitation of vtable. When group_concat_max_len is high then the group_concat gets turned into a TEXT equivalent data type which then no longer works for MariaDB's sorting algorithm (no possible length will be high enough). I don't know exactly what setting value would trigger this but I suspect >= 64KB.

This problem will go away with 1.4 / 10.4. As a workaround a subquery select can be used, something like:

select * from (select variant_id,group_concat(geno) from (select b.variant_id,num_sample_id,geno from qc_parentage_variant a,dairy.dairy_qc_geno b where a.variant_id=b.variant_id and b
.num_sample_id in (90571,113548) ) a group by variant_id order by variant_id limit 100000000) as sq;

It isn't something we would be able to fix before 1.4 / 10.4.

Comment by Andrew Hutchings (Inactive) [ 2019-06-13 ]

Closed as "Won't fix" because we cannot fix this without heavy modifications to MariaDB Server, there are workarounds and the limitation will go away with 1.4.

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