error message for missing column in QoQ is org.hsqldb.Expression@70e4800d

Description

the following code throws this error

Not in aggregate function or group by clause: org.hsqldb.Expression@70e4800d in statement [SELECT id FROM q group by id ORDER BY name]

org.hsqldb.Expression@70e4800d should be resolved to "name"

<cfset q=QueryNew("id,name","Integer,VarChar")> <cftry> <cfquery name="qoq" dbtype="query"> SELECT id FROM q group by id ORDER BY name </cfquery> <cfcatch> <cfdump var="#cfcatch#"> <cfabort> </cfcatch> </cftry> <cfdump var="#qoq#">

note: adobe ACF doesn't even throw an error (which is bad)

Environment

None

Activity

Zac Spitzer 
27 July 2024 at 11:32

Since the hsqldb changes and upgrade, this bug is resolved.

test refactored and enabled

https://github.com/lucee/Lucee/commit/4cf9b65a208b32b5655e74d425bfa055066905b4

Zac Spitzer 
30 December 2020 at 15:57

the problem being

org.hsqldb.Expression@70e4800d should be resolved to "name"

I don’t know if this might be related to the very old version of hsqldb, or how the exception is handled or if that’s just how hsqldb works. but with a complex QoQ it’s hard to debug

Pothys - MitrahSoft 
30 December 2020 at 15:35

I've checked with your above example, both lucee and ACF throws an error

Zac Spitzer 
30 December 2020 at 14:28

but the new QoQ doesn’t handle joins

<cfset q=QueryNew("id,name","Integer,VarChar")> <cftry>     <cfquery name="qoq" dbtype="query">         SELECT  q1.id         FROM    q q1, q q2         where   q1.id=q2.id         group   by q1.id         ORDER   BY name     </cfquery>     <cfcatch>         <cfdump var="#cfcatch#">         <cfabort>     </cfcatch> </cftry> <cfdump var="#qoq#">

Not in aggregate function or group by clause: org.hsqldb.Expression@36e2409 in statement [SELECT q1.id FROM q q1, q q2 where q1.id=q2.id group by q1.id ORDER BY name]

Pothys - MitrahSoft 
30 December 2020 at 14:21

I've checked this ticket and the issue was solved by the ticket https://luceeserver.atlassian.net/browse/LDEV-3042#icft=LDEV-3042 fix. I added the fixed version. , could you please check with fixed version and report here back.

Fixed

Details

Assignee

Reporter

Priority

Fix versions

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 29 September 2017 at 05:57
Updated 27 July 2024 at 11:32
Resolved 30 December 2020 at 14:22