flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chesnay Schepler <ches...@apache.org>
Subject Re: Oracle 11g number serialization: classcast problem
Date Tue, 22 Mar 2016 14:46:12 GMT
The JDBC formats don't make any assumption as to what DB backend is used.

A JDBC float in general is returned as a double, since that was the 
recommended mapping i found when i wrote the formats.

Is the INT returned as a double as well?

Note: The (runtime) output type is in no way connected to the TypeInfo 
you pass when constructing the format.

On 21.03.2016 14:16, Stefano Bortoli wrote:
> Hi squirrels,
> I working on a flink job connecting to a Oracle DB. I started from the 
> JDBC example for Derby, and used the TupleTypeInfo to configure the 
> fields of the tuple as it is read.
> The record of the example has 2 INT, 1 FLOAT and 2 VARCHAR. 
> Apparently, using Oracle, all the numbers are read as Double, causing 
> a ClassCast exception. Of course I can fix it by changing the 
> TupleTypeInfo, but I wonder whether there is some assumption for 
> Oracle and Numbers.
> Thanks a lot for your support!
> saluti,
> Stefano

View raw message