Should GROUP BY require ORDER BY in columnstore?

You are viewing an old version of this question. View the current version here.

I have a table with columns id INT, a DATETIME, and two DOUBLESs.

Running query that groups on the DATETIME does not also order by date time without the order by phrase. The documentation on SELECT https://mariadb.com/kb/en/library/columnstore-select/ shows that an ASC or DESC argument can be added to the GROUP BY. I tried each but I did not notice any change in the result set order. Is this expected behavior?

Answer Answered by Andrew Hutchings in this comment.

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.

Comments

Comments loading...
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.