dynamobi/dynamobi — Issue #655: [FRG-217] After changing date/time/timestamp conventions, Fennel Calc needs to be updated
Author: dynamobi-build
Created: 2011-12-30 03:41:16+00:00
State: open

[reporter="jpham", created="Thu, 28 Sep 2006 13:05:31 -0500 (GMT-05:00)"]
(Old title was) FarragoJdbcTest.testDataTypes hangs if there is a resultSet error)

I'm not sure whether this is problem is limited to the test harness or if it could occur outside test situations.

When one fetches data through a Jdbc result set, it usually goes through org.eigenbase.util14.AbstractResultSet.java. One uses method such as getDate(), which in turn relies on methods like toDate(). The method toDate() casts a raw object, which may be of any type, into the desired type, such as Date.

In general, the methods are written according to this idiom:

if (o instanceof TypeA) {

...

} else if (o instance of TypeB) {

...

} else {

throw new ConversionError(...)

}

If an unexpected raw data type is encountered, and it cannot be casted to the desired type, then a ConversionError is thrown. Since it is such a common pattern, I expect that it must be well tested. But somehow, when I was missing a required conversion, I was getting a hang, with the last message sent to the trace being something to the effect of "Database... rollbackImpl".