nastra commented on code in PR #15368:
URL: https://github.com/apache/iceberg/pull/15368#discussion_r2844992026


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/SparkPartitioningAwareScan.java:
##########
@@ -79,7 +80,13 @@ abstract class SparkPartitioningAwareScan<T extends 
PartitionScanTask> extends S
       Schema projection,
       List<Expression> filters,
       Supplier<ScanReport> scanReportSupplier) {
-    super(spark, table, readConf, projection, filters, scanReportSupplier);
+    super(
+        spark,
+        table instanceof BaseTable && null != scan ? new TableWithIO(table, 
scan::io) : table,

Review Comment:
   both `SparkBatchQueryScan` and `SparkCopyOnWriteScan` extend this class, so 
whenever a table's `FileIO` is being called, we'll be delegating to the actual 
`FileIO` of the `Scan`. The super class of `SparkPartitionAwareScan` is 
`SparkScan`, where `toBatch()` or `toMicroBatchStream()` exist, which would 
also get the correct `FileIO` instance



-- 
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: [email protected]

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