You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/08 00:50:35 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #6868: [issue #6765] Expose definition flags to function

sijie commented on a change in pull request #6868:
URL: https://github.com/apache/pulsar/pull/6868#discussion_r436418652



##########
File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/TopicSchema.java
##########
@@ -158,6 +173,20 @@ private static SchemaType getDefaultSchemaType(Class<?> clazz) {
         }
     }
 
+    private static <T> AvroSchema<T> buildAvroSchema(Class<T> clazz, ConsumerConfig conf) {
+        String jsr310ConversionEnabled = null;
+        String alwaysAllowNull = null;
+        if (conf.getSchemaProperties() != null) {

Review comment:
       Please use `SchemaDefinitionBuilder#withProperties` to construct the schema definition and avoid adding this kind of customization code. Also, the schema properties should be passed to other schemas as well.




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