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 2019/04/26 23:40:34 UTC

[GitHub] [pulsar] srkukarni commented on a change in pull request #4147: Added schema information and unittests for primitive schema types

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

 ##########
 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:
   @jerrypeng fixed

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


With regards,
Apache Git Services