jerrypeng commented on a change in pull request #4147: Added schema information 
and unittests for primitive schema types
URL: https://github.com/apache/pulsar/pull/4147#discussion_r279130950
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java
 ##########
 @@ -146,6 +146,10 @@ public void close() throws Exception {
 
     private boolean isCompatible(SchemaAndMetadata existingSchema, SchemaData 
newSchema,
                                  SchemaCompatibilityStrategy strategy) {
+        if (SchemaType.isPrimitiveSchemaType(existingSchema.schema.getType())) 
{
+            // for primitive data types, only schema type check is needed
+            return existingSchema.schema.getType() == newSchema.getType();
 
 Review comment:
   @srkukarni even from primitive types you still should check this condition:
   ```
   compatibilityChecks.getOrDefault(newSchema.getType(), 
SchemaCompatibilityCheck.DEFAULT)
               .isCompatible(existingSchema.schema, newSchema, strategy);       
            
   ```

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


With regards,
Apache Git Services

Reply via email to