eaba commented on a change in pull request #10604:
URL: https://github.com/apache/pulsar/pull/10604#discussion_r633587766



##########
File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaHash.java
##########
@@ -36,22 +37,25 @@
 
     private final HashCode hash;
 
-    private SchemaHash(HashCode hash) {
+    private final SchemaType schemaType;
+
+    private SchemaHash(HashCode hash, SchemaType schemaType) {
         this.hash = hash;
+        this.schemaType = schemaType;
     }
 
     public static SchemaHash of(Schema schema) {
         return of(Optional.ofNullable(schema)
                           .map(Schema::getSchemaInfo)
-                          .map(SchemaInfo::getSchema).orElse(new byte[0]));
+                          .map(SchemaInfo::getSchema).orElse(new byte[0]), 
schema.getSchemaInfo().getType());
     }
 
     public static SchemaHash of(SchemaData schemaData) {
-        return of(schemaData.getData());
+        return of(schemaData.getData(), schemaData.getType());
     }
 
-    private static SchemaHash of(byte[] schemaBytes) {

Review comment:
       u




-- 
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:
[email protected]


Reply via email to