fapaul commented on code in PR #18604:
URL: https://github.com/apache/flink/pull/18604#discussion_r843584845


##########
flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/dialect/psql/PostgresTypeMapper.java:
##########
@@ -49,6 +49,8 @@
     // float <=> float8
     // boolean <=> bool
     // decimal <=> numeric
+    private static final String PG_SMALLSERIAL = "smallserial";

Review Comment:
   WDYT about adding new test cases for the two new types?



##########
flink-connectors/flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/catalog/PostgresCatalogITCase.java:
##########
@@ -154,7 +154,7 @@ public void testArrayTypes() {
         assertEquals(
                 "[+I["
                         + "[1, 2, 3], "
-                        + "[[92, 120, 51, 50], [92, 120, 51, 51], [92, 120, 
51, 52]], "
+                        + "[[50], [51], [52]], "

Review Comment:
   Why is this change necessary?



##########
flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/internal/converter/PostgresRowConverter.java:
##########
@@ -91,7 +91,10 @@ private JdbcDeserializationConverter 
createPostgresArrayConverter(ArrayType arra
                 final Object[] array = (Object[]) 
Array.newInstance(elementClass, in.length);
                 for (int i = 0; i < in.length; i++) {
                     array[i] =
-                            elementConverter.deserialize(((PGobject) 
in[i]).getValue().getBytes());
+                            elementConverter.deserialize(
+                                    in[i] instanceof byte[]
+                                            ? in[i]
+                                            : ((PGobject) 
in[i]).getValue().getBytes());

Review Comment:
   It would be good to add a comment on why the conditional logic is now needed.



-- 
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]

Reply via email to