congbobo184 commented on a change in pull request #9481:
URL: https://github.com/apache/pulsar/pull/9481#discussion_r572669296
##########
File path:
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/TopicSchema.java
##########
@@ -196,6 +197,9 @@ private static boolean isProtobufClass(Class<?> pojoClazz) {
String schemaTypeOrClassName = conf.getSchemaType();
if (StringUtils.isEmpty(schemaTypeOrClassName) ||
DEFAULT_SERDE.equals(schemaTypeOrClassName)) {
// No preferred schema was provided, auto-discover schema or
fallback to defaults
+ if (!input && clazz.equals(GenericRecord.class)) {
+ return new AutoProduceBytesSchema();
+ }
Review comment:
you start a source, but source don't getSchema by this method. I don't
understand where use this change?
----------------------------------------------------------------
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]