RocMarshal commented on code in PR #182:
URL:
https://github.com/apache/flink-connector-jdbc/pull/182#discussion_r2596852007
##########
flink-connector-jdbc-core/src/main/java/org/apache/flink/connector/jdbc/core/database/dialect/AbstractDialectConverter.java:
##########
@@ -173,7 +173,7 @@ protected JdbcDeserializationConverter
createInternalConverter(LogicalType type)
: TimestampData.fromTimestamp((Timestamp) val);
case CHAR:
case VARCHAR:
- return val -> StringData.fromString((String) val);
+ return val -> StringData.fromString(val.toString());
Review Comment:
Could we do it as follows due to the column with UUID type(or other types
are mapping to varchar(x)) may be nullable ?
```
return val -> StringData.fromString(val == null ? null:
val.toString());
```
And if the comment is acceptable, we'd better add the corresponding test
lines for testing the null value in the column.
Pls correct me if I'm wrong in the understood.
--
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]