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/23 02:47:26 UTC

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

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



##########
File path: pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
##########
@@ -560,6 +563,18 @@ public boolean advanceNextPosition() {
         return true;
     }
 
+    private SchemaInfo getBytesSchemaInfo(SchemaType schemaType, String schemaName) {
+        if (!schemaType.equals(SchemaType.BYTES) && !schemaType.equals(SchemaType.NONE)) {
+            return null;
+        }
+        if (schemaName.equals(Schema.BYTES.getSchemaInfo().getName())) {

Review comment:
       Because of the schema types of the `Schema.BYTES ` and `Schema.BYTEBUFFER` all are `SchemaType.BYTES`, so I use the schema name to make the comparison.

##########
File path: pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
##########
@@ -560,6 +563,18 @@ public boolean advanceNextPosition() {
         return true;
     }
 
+    private SchemaInfo getBytesSchemaInfo(SchemaType schemaType, String schemaName) {
+        if (!schemaType.equals(SchemaType.BYTES) && !schemaType.equals(SchemaType.NONE)) {
+            return null;
+        }
+        if (schemaName.equals(Schema.BYTES.getSchemaInfo().getName())) {

Review comment:
       The schema types of the `Schema.BYTES ` and `Schema.BYTEBUFFER` all are `SchemaType.BYTES`, so I use the schema name to make the comparison.




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