rdblue commented on a change in pull request #1512:
URL: https://github.com/apache/iceberg/pull/1512#discussion_r495277598
##########
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);
Review comment:
Oops, I'm also missing an update that uses `readSchema()` and a lazy
variable to avoid converting multiple times.
----------------------------------------------------------------
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]