nastra commented on code in PR #15561:
URL: https://github.com/apache/iceberg/pull/15561#discussion_r2916325709
##########
core/src/main/java/org/apache/iceberg/rest/RESTTableScan.java:
##########
@@ -131,14 +131,16 @@ protected TableScan newRefinedScan(
tableIdentifier,
resourcePaths,
supportedEndpoints,
- io(),
+ null != fileIOForPlanId ? fileIOForPlanId : tableIo,
catalogProperties,
hadoopConf);
}
@Override
- protected FileIO io() {
- return null != fileIOForPlanId ? fileIOForPlanId : tableIo;
+ public FileIO io() {
+ Preconditions.checkState(
+ null != fileIOForPlanId, "Invalid FileIO: planFiles() must be called
first");
Review Comment:
I think we want to be explicit here and indicate that the FileIO isn't ready
to be used when you call it before actually calling `planFiles()`. Using the
FileIO before the server had a chance to provide the right credentials will
almost always cause permission issues
--
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]