5.4.3.2 QofQ rounds decimal column type to integer when joining

Description

When joining queries in a QofQ, columns of type decimal are rounded to the nearest integer. This occurs both when the joined query is from a database table with a precision defined for the column (e.g. decimal(12,2)) and when the joined query is created by queryNew, where it is not possible to define decimal precision. As such my repro uses queryNew to keep things simple.

Note that using a double type for the column does NOT trigger this bug. Also note that in Lucee 5.3.12.1 the same code produces the correct result (precision is maintained for the column value).

Here’s the repro:

Environment

Ubuntu 22.04
Lucee 5.4.3.2
Java 11.0.18

Attachments

1

Activity

Show:

Tim DeMoss 14 September 2023 at 14:21
Edited

FYI, the test doesn’t cover QofQ join for database table record sets (as opposed to queryNew) but I did test with table records and got a decimal result as expected.

[Saw the table test after I wrote this]

Zac Spitzer 14 September 2023 at 14:12

merged into normal 5.4 branch with the failing test disabled

Pothys - MitrahSoft 14 September 2023 at 07:02

I checked this issue with Lucee version 6.0.0.452-SNAPSHOT. It now returns the decimal value. However, when I checked this issue with 5.4.3.10-SNAPSHOT, it returns a decimal value with extra 0s. has created a new ticket regarding the 'extra 0s' issue, so I'm closing this ticket.

Zac Spitzer 13 September 2023 at 19:04
Edited

6.0

merging into 5.4 via CVE branch, this causes / highlights a regression but it’s better than the current problem

Tim DeMoss 12 September 2023 at 20:13

whilst there is a regression, i’d say that the extra .0000 is way better than the loss of decimal points

I wouldn’t argue with that.

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

Affects versions

Created 12 September 2023 at 18:35
Updated 15 September 2023 at 12:54
Resolved 14 September 2023 at 07:02