Issue Details (XML | Word | Printable)

Key: OPENJPA-321
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Teresa Kan
Reporter: Kevin Sutter
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenJPA

DB2 ABS Casting problem

Created: 17/Aug/07 10:00 PM   Updated: 21/Aug/07 03:26 AM
Return to search
Component/s: jdbc
Affects Version/s: 0.9.7
Fix Version/s: 1.0.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works OPENJPA-321.patch 2007-08-20 10:14 PM Teresa Kan 11 kB
Text File Licensed for inclusion in ASF works OPENJPA-321.patch 2007-08-17 10:13 PM Catalina Wei 8 kB

Resolution Date: 21/Aug/07 03:26 AM


 Description  « Hide
Via the JPA TCK running against DB2, we found the following problem with casting and the ABS function:

Instead of generating:
..WHERE (CAST(t0.TOTALPRICE AS DOUBLE) > CAST(ABS(?) AS DOUBLE))

We need to generate:
..WHERE (CAST(t0.TOTALPRICE AS DOUBLE) > ABS(CAST(? AS DOUBLE))

While doing a bit more investigation we are finding similar problems with other function expressions such as MOD and TRIM.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Catalina Wei added a comment - 17/Aug/07 10:13 PM
Fix DB2 Casting problem for ABS, LENGTH, UPPER, LOWER, TRIM, SQRT.

Teresa Kan added a comment - 20/Aug/07 10:14 PM
Move some codes from AbstractDB2Dictionary to DB2Dictionary to eliminate unnecessary changes for Derby.

Kevin Sutter added a comment - 21/Aug/07 03:26 AM
Resolved via revision #567928.