gaoran10 opened a new pull request #6662: Fixed avro schema decode error in 
functions
URL: https://github.com/apache/pulsar/pull/6662
 
 
   Fixes #5503 
   From #6445 
   
   # Motivation
   In functions, it will encounter ```ClassCastException``` when using the Avro 
schema for topics.
   
   ```
   Exception in thread "main" java.lang.ClassCastException: 
org.apache.pulsar.shade.org.apache.avro.generic.GenericData$Record cannot be 
cast to io.streamnative.KeyValueSchemaTest$Foo2
        at 
io.streamnative.KeyValueSchemaTest.testConsumerByPythonProduce(KeyValueSchemaTest.java:412)
        at io.streamnative.KeyValueSchemaTest.main(KeyValueSchemaTest.java:305)
   ```
   
   # Modifications
   In functions, when using Avro schema specific the ClassLoader for 
ReflectDatumReader.

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


With regards,
Apache Git Services

Reply via email to