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


##########
core/src/main/java/org/apache/iceberg/rest/RESTTableScan.java:
##########
@@ -190,8 +192,9 @@ private CloseableIterable<FileScanTask> 
planTableScan(PlanTableScanRequest planT
 
     this.planId = response.planId();
     PlanStatus planStatus = response.planStatus();
-    if (null != planId && !response.credentials().isEmpty()) {
-      this.fileIOForPlanId = fileIOForPlanId(response.credentials());
+    if (null != planId) {
+      this.fileIOForPlanId =
+          !response.credentials().isEmpty() ? 
fileIOForPlanId(response.credentials()) : tableIo;

Review Comment:
   > And why does it require a planId
   
   the PlanID is added as additional context to the FileIO so that the server 
knows that these are credentials for remote scan planning when it needs to 
refresh them
   
   > Why is this duplicated?
   
   we have two separate responses that can return storage credentials



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