JacekWislicki commented on issue #18501: URL: https://github.com/apache/pulsar/issues/18501#issuecomment-1340565703
Just a couple of words of what we noticed: When defining the schema for a Pulsar client, this code makes a schema with everything nullable: `Schema.AVRO(MyClass.class)` However, the Avro API supports non-nullable fields and the above can be written as: `DefaultImplementation.getDefaultImplementation().newAvroSchema(SchemaDefinition.builder().withAlwaysAllowNull(false).withPojo(MyClass.class).build())` Though, there does not seem to be any configuration to enforce "alwaysAllowNull=false" in Pulsar functions/sinks. Additionally, "pulsar-admin schemas extract" has the --always-allow-null flag allowing toggling generation of a schema with non-nullable fields. -- 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]
