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



##########
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:
       My initial thought was that filter expression binding depends on whether 
this is case sensitive or not. But since we get this value from Spark and don't 
expect it to change (let alone in a single query), it seems unnecessary. I'm 
also not able to think of a case where a difference would matter without 
causing an exception.
   
   I'll remove this.




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