Issue Details (XML | Word | Printable)

Key: NUCRDBMS-206
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Yang ZHONG
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

DB2 : Java float should have been mapped to REAL instead of FLOAT

Created: 24/Jun/09 12:00 AM   Updated: 20/Oct/10 09:30 AM   Resolved: 13/Oct/10 08:42 AM
Component/s: Types
Affects Version/s: 1.1.3
Fix Version/s: 2.2.0.m2

File Attachments: 1. Zip Archive 206.zip (2 kB)

Environment: Linux, Java 5, DB2 9.1.0.2

Datastore: IBM DB2
Severity: Production


 Description  « Hide
JDO specification 2.2 page 222 "Table 8: Default jdbc-type" has specified Java float should be mapped to JDBC FLOAT by default. DataNucleus maps Java float to DB2 "FLOAT"/DOUBLE by default which should have been DB2 REAL which is the JDBC FLOAT for DB2. Tell me about it, DB2 shouldn't have named DOUBLE "FLOAT":

http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0008469.html

Single-precision floating-point (REAL)
A single-precision floating-point number is a 32-bit approximation of a real number. The number can be zero or can range from -3.4028234663852886e+38 to -1.1754943508222875e-38, or from 1.1754943508222875e-38 to 3.4028234663852886e+38.

Double-precision floating-point (DOUBLE or FLOAT)
A double-precision floating-point number is a 64-bit approximation of a real number. The number can be zero or can range from -1.7976931348623158e+308 to -2.2250738585072014e-308, or from 2.2250738585072014e-308 to 1.7976931348623158e+308.

Yang ZHONG added a comment - 24/Jun/09 12:02 AM
Can't test against 1.1.4 due to NUCRDBMS-205

Yang ZHONG made changes - 24/Jun/09 12:02 AM
Field Original Value New Value
Attachment 206.zip [ 10963 ]
Yang ZHONG added a comment - 24/Jun/09 12:09 AM - edited
Explicitly specifying
    jdbc-type="FLOAT"
doesn't change SchemTool output. I guess the summary should have been
    "JDBC FLOAT should have been mapped to DB2 REAL instead of FLOAT"

Andy Jefferson made changes - 10/Dec/09 11:12 AM
Summary Java float should have been mapped to DB2 REAL instead of FLOAT DB2 : Java float should have been mapped to REAL instead of FLOAT
Andy Jefferson added a comment - 13/Oct/10 08:42 AM
SVN trunk works for me

Andy Jefferson made changes - 13/Oct/10 08:42 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.2.0.m2 [ 11023 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 20/Oct/10 09:30 AM
Status Resolved [ 5 ] Closed [ 6 ]