RocMarshal commented on code in PR #182:
URL:
https://github.com/apache/flink-connector-jdbc/pull/182#discussion_r2596853307
##########
flink-connector-jdbc-postgres/src/main/java/org/apache/flink/connector/jdbc/postgres/database/dialect/PostgresDialectConverter.java:
##########
@@ -28,7 +28,7 @@
import org.apache.flink.table.types.logical.utils.LogicalTypeUtils;
import java.lang.reflect.Array;
-
+import java.util.UUID;
Review Comment:
It seems this import statement is redundant, as it is not used subsequently.
##########
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 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]