eolivelli commented on code in PR #15845:
URL: https://github.com/apache/pulsar/pull/15845#discussion_r885055797


##########
pulsar-io/jdbc/core/src/main/java/org/apache/pulsar/io/jdbc/BaseJdbcAutoSchemaSink.java:
##########
@@ -185,5 +187,35 @@ private void 
fillKeyValueSchemaData(org.apache.pulsar.client.api.Schema<GenericO
                         + " with KeyValueSchema");
         }
     }
+
+    private static Object convertAvroField(Object avroValue, Schema schema) {
+        switch (schema.getType()) {
+            case NULL:
+            case INT:
+            case LONG:
+            case DOUBLE:
+            case FLOAT:
+            case BOOLEAN:
+                return avroValue;
+            case BYTES:
+                // system default charset
+                return new String((byte[]) avroValue);

Review Comment:
   This looks wrong. In jdbc we have the array type. We should use that



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