github-actions[bot] commented on code in PR #69171:
URL: https://github.com/apache/doris/pull/69171#discussion_r4291341811
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcOracleClient.java:
##########
@@ -208,6 +208,10 @@ protected Type jdbcTypeToDoris(JdbcFieldSchema
fieldSchema) {
precision = scale;
}
return createDecimalOrStringType(precision, scale);
+ // Oracle binary floating-point types retain IEEE precision
instead of becoming unsupported.
+ case "BINARY_FLOAT":
+ return Type.FLOAT;
+ case "BINARY_DOUBLE":
Review Comment:
[P2] Use Oracle binary bindings for the newly supported floats
These mappings also enable JDBC INSERT targets, but
`BaseJdbcExecutor.insertColumn` still uses `setFloat`/`setDouble`. [Oracle's
JDBC
contract](https://docs.oracle.com/en/database/oracle/oracle-database/19/jjdbc/Oracle-extensions.html#GUID-FC9510C6-8FF2-41A7-864A-890B85A316BC)
says those setters encode values as NUMBER unless `SetFloatAndDoubleUseBinary`
is enabled; `OracleJdbcExecutor` does not enable that option or use native
binary setters. For example, copying a `BINARY_DOUBLE` source row containing
`1e200` into another `BINARY_DOUBLE` column reaches `setDouble` and exceeds
[NUMBER's
range](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Data-Types.html#GUID-75209AF6-476D-4C44-A5DC-5FA70D701B78),
although the value is valid for both columns. Configure binary binding or use
Oracle's binary setters when enabling these types, and cover this with an
INSERT/round-trip test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]