MeihanLi commented on code in PR #9382:
URL: https://github.com/apache/pinot/pull/9382#discussion_r968867393


##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java:
##########
@@ -703,7 +705,23 @@ public boolean isBackwardCompatibleWith(Schema oldSchema) {
       }
       FieldSpec oldSchemaFieldSpec = entry.getValue();
       FieldSpec fieldSpec = getFieldSpecFor(oldSchemaColumnName);
-      if (!fieldSpec.equals(oldSchemaFieldSpec)) {
+
+      if (EqualityUtils.isSameReference(fieldSpec, oldSchemaFieldSpec)) {
+        continue;
+      }
+
+      if ((fieldSpec == null && oldSchemaFieldSpec != null) || (fieldSpec != 
null && oldSchemaFieldSpec == null)) {
+        return false;
+      }
+
+      boolean isBackward = EqualityUtils.isEqual(fieldSpec.getName(), 
oldSchemaFieldSpec.getName())

Review Comment:
   Thanks @Jackie-Jiang , this is a good point, I addressed it in the second 
commit.



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

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to