315157973 commented on a change in pull request #6868:
URL: https://github.com/apache/pulsar/pull/6868#discussion_r436577000
##########
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.
Modify as follows:
1 Since the map generated by protobuf is immutable, a new Map is added to
TopicSchema line 161.
2 Since the parameters such as JSR310 in SchemaDefinitionBuilder are
underlined,the incoming parameters will be converted
@sijie
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/SchemaDefinitionBuilderImpl.java
##########
@@ -35,7 +35,9 @@
public class SchemaDefinitionBuilderImpl<T> implements
SchemaDefinitionBuilder<T> {
public static final String ALWAYS_ALLOW_NULL = "__alwaysAllowNull";
+ public static final String ALWAYS_ALLOW_NULL_NO_UNDERLINED =
"alwaysAllowNull";
Review comment:
Already use existing settings。This may cause some parameters to be
underscores, some not
@sijie
----------------------------------------------------------------
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:
[email protected]