blackpighe created FLINK-34128: ---------------------------------- Summary: 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.1.0, jdbc-3.0.0 Environment: All current versions of flinks-jdbc-connector Reporter: blackpighe Fix For: jdbc-3.1.1, jdbc-3.0.0 Attachments: image-2024-01-17-14-33-05-713.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)