kbendick commented on a change in pull request #2577:
URL: https://github.com/apache/iceberg/pull/2577#discussion_r637332216
##########
File path: spark/src/main/java/org/apache/iceberg/spark/SparkUtil.java
##########
@@ -100,4 +107,11 @@ public static void
validatePartitionTransforms(PartitionSpec spec) {
}
}
}
+
+ public static boolean isLocalityEnabledDefault(Map<String, String>
tableProperties, String fsScheme) {
+ String tableLocalityProp = PropertyUtil.propertyAsString(tableProperties,
TableProperties.LOCALITY_ENABLED,
+ TableProperties.LOCALITY_ENABLED_DEFAULT);
+ return tableLocalityProp == null ?
LOCALITY_WHITELIST_FS.contains(fsScheme) :
+ Boolean.parseBoolean(tableLocalityProp);
Review comment:
Lastly, I think hints are much easier to explain to end users and have
them remember, as there are A LOT of spark configurations (by necessity - not
even including iceberg spark properties which are much fewer) and even people
who are very well acquainted with spark can get them mixed up.... which leads
to support requests etc.
If the hint gets placed in the query (SQL file, notebook), developers are
much more likely to remember what needs to be updated to change it to suit
their current needs.
--
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]