Comments - Should GROUP BY require ORDER BY in columnstore?
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
Hi,
That behaviour does not sound correct. Can you please file a bug, preferably with a test case, at:
https://jira.mariadb.org/projects/MCOL/
Thanks Andrew,
I have created MCOL-1180.
Also, seems like this may be related to MCOL-643. If you wrap the SUM or AVG function with a FORMAT function in the test case you get the error message:
I found this to be the case even if I put the main query in a derived table. The query will execute if
max_length_for_sort_data
is set to 3M but will fail with the default of 1024.In this particular case the GROUP BY wouldn't order because it is within a subquery. But the MCOL ticket has it without the subquery so we will investigate ASAP.
MCOL-643 is semi-related. You need to set it max_length_for_sort_data high in ColumnStore for now. The reason is too complex to explain here. But we are working with the MariaDB Server team on a solution for this right now.
Thanks Andrew, I had originally tested this as one query. I should have pasted in this query,
I separated it hoping to get past the max_length_for_sort_data problem. This query executes if the columns 'Total' and 'Average' are not formatted.