RussellSpitzer commented on a change in pull request #1512:
URL: https://github.com/apache/iceberg/pull/1512#discussion_r495223533



##########
File path: 
spark3/src/main/java/org/apache/iceberg/spark/source/SparkBatchScan.java
##########
@@ -208,6 +209,38 @@ public Statistics estimateStatistics() {
     return new Stats(sizeInBytes, numRows);
   }
 
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) {
+      return true;
+    }
+
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+
+    SparkBatchScan that = (SparkBatchScan) o;
+    // compare Spark schemas to ignore field ids
+    StructType thisSchema = SparkSchemaUtil.convert(expectedSchema);
+    StructType thatSchema = SparkSchemaUtil.convert(that.expectedSchema);
+    return caseSensitive == that.caseSensitive &&

Review comment:
       if they aren't case sensitive aren't they equal if the lowercased names 
are equivelent?
   
   Ie 
   (insensitive) == (insenstive) && (TaBle).equals(table)?
   
   If we just want to check the fields being equal I understand that too




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to