This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.11 by this push:
     new 490416020c8 [fix][sql] Fix message without schema issue. (#18745)
490416020c8 is described below

commit 490416020c83f9365eff5d132e8c1b3fbc6cd182
Author: Jiwei Guo <[email protected]>
AuthorDate: Tue Dec 6 12:38:26 2022 +0800

    [fix][sql] Fix message without schema issue. (#18745)
---
 .../src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
 
b/pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
index 558f6b47e9d..827612f48be 100644
--- 
a/pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
+++ 
b/pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
@@ -655,7 +655,7 @@ public class PulsarRecordCursor implements RecordCursor {
             return schemaInfo;
         }
         try {
-            if (this.currentMessage.getSchemaVersion() == null) {
+            if (this.currentMessage.getSchemaVersion() == null || 
this.currentMessage.getSchemaVersion().length == 0) {
                 schemaInfo = pulsarSplit.getSchemaInfo();
             } else {
                 schemaInfo =  
schemaInfoProvider.getSchemaByVersion(this.currentMessage.getSchemaVersion()).get();

Reply via email to