rdblue commented on a change in pull request #1350:
URL: https://github.com/apache/iceberg/pull/1350#discussion_r474292121



##########
File path: spark2/src/main/java/org/apache/iceberg/spark/source/Reader.java
##########
@@ -143,8 +143,9 @@
       } catch (IOException ioe) {
         LOG.warn("Failed to get Hadoop Filesystem", ioe);
       }
+      Boolean localityFallback = LOCALITY_WHITELIST_FS.contains(scheme);
       this.localityPreferred = 
options.get("locality").map(Boolean::parseBoolean)
-          .orElse(LOCALITY_WHITELIST_FS.contains(scheme));
+          .orElse(localityFallback);

Review comment:
       We could refactor scheme detection into a method to make scheme 
effectively final here.




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

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