dynamobi/dynamobi — Issue #858: [FRG-12] JDBC and SQL data type conversions are inconsistent
Author: dynamobi-build
Created: 2011-12-30 03:53:19+00:00
State: closed
Labels: FRG, JDBC Engine Driver

[reporter="angel", created="Tue, 27 Dec 2005 20:06:26 -0500 (GMT-05:00)"]
The conversion routines are inconsistent in the JDBC and SQL implementations.

For instance, when converting double/real types to the integral types:

In SQL: cast from double to integer is done using rounding

(rounding away from 0 when the value is at the midpoint, i.e 1.5->2, -1.5->-2)

in JDBC: conversion routines truncate

There may be other inconsistencies as well.

For consistency, the JDBC conversion routines (getXXX, setXXX) should be fixed to have the same behavior as casting in SQL. See IteratorResultSet's toLong, etc. FarragoJdbcTest should be updated accordingly.