Lucee 6: Query of Queries Loses Original Order

Description

When using query of queries, the order from the first query is “lost” and we are having to add another ORDER BY to the query of the query. This is a change from how Lucee worked in the past.

Gavin_Baumanis said to mark it as a regression but I’m not seeing a way to do that.

Environment

OS : Windows Server 2012 R2 Datacenter
Java Version : 1.8.0_181 (Oracle Corporation) 64bit
Tomcat Version : Tomcat/8.5.33
Lucee Version : Lucee 6.0.0.585

Activity

Brad Wood 5 January 2024 at 19:57

This is not a bug nor a regression, it is working as designed. It was incorrect for your previous code to assume the order would be retained when not using an ORDER BY statement. Even traditional RDBMs don’t offer this guarantee. The reason this changed is because in Lucee 6, parallel streams are used to increase the performance of QoQ operations by processing each row in multiple threads at a time. This means the original order will not necessarily be preserved unless you use an ORDER BY, which is the correct way to ensure the order. This “worked” on older versions of Lucee as a “happy accident”.

Won't Do

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 5 January 2024 at 16:53
Updated 1 February 2024 at 17:28
Resolved 5 January 2024 at 19:57