rdblue commented on code in PR #15561:
URL: https://github.com/apache/iceberg/pull/15561#discussion_r2921320724


##########
core/src/main/java/org/apache/iceberg/rest/RESTTableScan.java:
##########
@@ -131,14 +131,16 @@ protected TableScan newRefinedScan(
         tableIdentifier,
         resourcePaths,
         supportedEndpoints,
-        io(),
+        null != scanFileIO ? scanFileIO : tableIO,

Review Comment:
   The `io()` method checks whether `scanFileIO` is null and throws an 
exception, assuming that `scanFileIO` is only set from a call to `planFiles()`. 
This breaks that assumption because it will pass `tableIO` in its place, which 
is non-null.
   
   The solution is to remove the constructor argument for `scanFileIO`. When a 
scan is further refined, its `scanFileIO` should not be passed on because the 
refined scan is a different scan.



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