Because there are a large amount of these types of codes in our production environment, we hope that they can be compatible in this situation in the pulsar-sql module.
When parsing the Schema encounters exceptions, use defaultSchema to regenerate, like this:
Search before asking
Version
master
Minimal reproduce step
Create producer
Producer p = pulsarClient.newProducer(Schema.JSON(String.class)).create()
It would generate the following schema:
And query from
Trino
:Trino
service did not report any exception.What did you expect to see?
Query success.
What did you see instead?
Query 20230807_075157_00000_b7hfa failed: Not a record: "string"
Anything else?
This exception was thrown from there:
https://github.com/apache/pulsar/blob/2ab184e49a036a1dd10dc537bef4ab034a5ad5e0/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericSchemaImpl.java#L43-L46
Because there are a large amount of these types of codes in our production environment, we hope that they can be compatible in this situation in the
pulsar-sql
module.When parsing the Schema encounters exceptions, use defaultSchema to regenerate, like this:
Are you willing to submit a PR?