gaoran10 opened a new pull request #12809:
URL: https://github.com/apache/pulsar/pull/12809


   ### Motivation
   
   Currently, if the schema version of the message is null, the Pulsar SQL will 
encounter an NPE problem.
   
   ### Modifications
   
   Adjust logic for null schema version in `PulsarRecordCursor`.
   
   1. If the schema type of pulsarSplit is NONE or BYTES, use the BYTES schema.
   2. If the schema type of pulsarSplit is BYTEBUFFER, use the BYTEBUFFER 
schema.
   3. If the schema version of the message is null, use the latest schema of 
the topic.
   4. If the schema version of the message is not null, get the specific 
version schema by PulsarAdmin.
   5. If the final schema is null throw a runtime exception.
   
   ### Verifying this change
   
   Add a new test for the method `getSchemaInfo` to verify get the correct 
schema info.
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [x] `no-need-doc` 
     
     (Please explain why)
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


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


Reply via email to