pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on a change in pull request #4028: Functions should make use of Schema Types that are available
Date Sat, 13 Apr 2019 03:15:28 GMT
sijie commented on a change in pull request #4028: Functions should make use of Schema Types
that are available 
URL: https://github.com/apache/pulsar/pull/4028#discussion_r274730112
 
 

 ##########
 File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/TopicSchema.java
 ##########
 @@ -104,20 +96,41 @@ private SchemaType getSchemaTypeOrDefault(String topic, Class<?>
clazz) {
     }
 
     private static SchemaType getDefaultSchemaType(Class<?> clazz) {
-        if (byte[].class.equals(clazz)
-            || ByteBuf.class.equals(clazz)
-            || ByteBuffer.class.equals(clazz)) {
-            return SchemaType.NONE;
+        if (byte[].class.equals(clazz)) {
+            return BytesSchema.SCHEMA_INFO.getType();
+        } else if (ByteBuf.class.equals(clazz)) {
+            return ByteBufSchema.SCHEMA_INFO.getType();
 
 Review comment:
   why not just return `SchemaType.BYTES`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message