You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/06 09:46:06 UTC

[GitHub] [flink] MartijnVisser commented on a diff in pull request #18604: [FLINK-25926][Connectors][JDBC] Update org.postgresql:postgresql to 42.3.3

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


##########
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:
   @snuyanzin WDYT?



##########
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:
   @snuyanzin Could you elaborate? 



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org