rdblue commented on code in PR #15561:
URL: https://github.com/apache/iceberg/pull/15561#discussion_r2921325512
##########
core/src/main/java/org/apache/iceberg/rest/RESTTableScan.java:
##########
@@ -212,14 +213,17 @@ private CloseableIterable<FileScanTask>
planTableScan(PlanTableScanRequest planT
}
}
- private FileIO fileIOForPlanId(List<Credential> storageCredentials) {
+ private FileIO scanFileIO(List<Credential> storageCredentials) {
+ ImmutableMap.Builder<String, String> builder =
+ ImmutableMap.<String, String>builder().putAll(catalogProperties);
+ if (null != planId) {
+ builder.put(RESTCatalogProperties.REST_SCAN_PLAN_ID, planId);
+ }
+
FileIO ioForScan =
CatalogUtil.loadFileIO(
catalogProperties.getOrDefault(CatalogProperties.FILE_IO_IMPL,
DEFAULT_FILE_IO_IMPL),
- ImmutableMap.<String, String>builder()
- .putAll(catalogProperties)
- .put(RESTCatalogProperties.REST_SCAN_PLAN_ID, planId)
- .buildKeepingLast(),
+ builder.buildKeepingLast(),
Review Comment:
As a style point, I don't see why the builder is finalized here rather than
above after this is done adding to it. Separating this from building the
properties just makes this expression longer and harder to understand.
--
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]