You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/21 23:04:01 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #9631: [Pulsar SQL] Fix Pulsar SQL query bytes schema data error

codelipenghui commented on a change in pull request #9631:
URL: https://github.com/apache/pulsar/pull/9631#discussion_r579880589



##########
File path: pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
##########
@@ -441,9 +442,11 @@ public boolean advanceNextPosition() {
         //start time for deseralizing record
         metricsTracker.start_RECORD_DESERIALIZE_TIME();
 
-        SchemaInfo schemaInfo;
+        SchemaInfo schemaInfo = getBytesSchemaInfo(pulsarSplit.getSchemaType(), pulsarSplit.getSchemaName());

Review comment:
       I noticed the current `getSchemaVersion` in the `RawMessageImpl` return null 
   
   ```
   @Override
       public byte[] getSchemaVersion() {
           if (msgMetadata != null && msgMetadata.getMetadata().hasSchemaVersion()) {
               return msgMetadata.getMetadata().getSchemaVersion();
           } else {
               return null;
           }
       }
   ```
   
   It should not throw `java.nio.BufferUnderflowException`. Could you please confirm here?




----------------------------------------------------------------
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:
users@infra.apache.org