danielcweeks commented on code in PR #15184:
URL: https://github.com/apache/iceberg/pull/15184#discussion_r2790321055


##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java:
##########
@@ -761,9 +760,9 @@ public StructType readSchema() {
   }
 
   private BatchScan newBatchScan() {
-    if (table instanceof RequiresRemoteScanPlanning) {
+    if (readConf.distributedPlanningDisallowed()) {
       return table.newBatchScan();
-    } else if (table instanceof BaseTable && 
readConf.distributedPlanningEnabled()) {
+    } else if (readConf.distributedPlanningEnabled()) {

Review Comment:
   I know this is a little inconsistent with how all the other `readConf` 
methods work, but we could make this more clear by passing in the table 
instance in to the check `distributedPlanningEnabled(table)`, which would 
prevent the confusing combination of "disallowed" and "enabled".  It would just 
be one question at that point.



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