[ 
https://issues.apache.org/jira/browse/FLINK-34128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

blackpighe closed FLINK-34128.
------------------------------
    Resolution: Won't Fix

> oracle jdbc connector bug. When the oracle table field is of type float, the 
> type obtained by jdbc is bigdecimal. error is  'java.lang.ClassCastException: 
> java.math.BigDecimal cannot be cast to java.lang.Float'
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-34128
>                 URL: https://issues.apache.org/jira/browse/FLINK-34128
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / JDBC
>    Affects Versions: jdbc-3.0.0, jdbc-3.1.0
>         Environment: All current versions of flinks-jdbc-connector
>            Reporter: blackpighe
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2024-01-17-14-33-05-713.png, 
> image-2024-01-17-22-18-27-781.png
>
>
> create oracle table contain float field and execute sql occurred error.
> java.lang.ClassCastException: java.math.BigDecimal cannot be cast to 
> java.lang.Float
>  
> Locate the cause of the error:
> org/apache/flink/connector/jdbc/converter/AbstractJdbcRowConverter.java
> !image-2024-01-17-14-33-05-713.png!
> Object field = resultSet.getObject(pos + 1);
> this method for oracle jdbc produce bug. 
> expect:float value
> actual: bigdecimal value
>  
> Suggest this modification:
> Object field =
> resultSet.getObject(pos + 1, rowType.getTypeAt(pos).getDefaultConversion());
> Specify the type explicitly according to the schema.but mock test case is 
> error.Let's talk about it and see what we can do about it.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to