nastra commented on a change in pull request #3230:
URL: https://github.com/apache/iceberg/pull/3230#discussion_r723364401



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
##########
@@ -384,8 +384,9 @@ public boolean dropNamespace(String[] namespace) throws 
NoSuchNamespaceException
 
   @Override
   public final void initialize(String name, CaseInsensitiveStringMap options) {
-    this.cacheEnabled = 
Boolean.parseBoolean(options.getOrDefault("cache-enabled", "true"));
     Catalog catalog = buildIcebergCatalog(name, options);
+    this.cacheEnabled = 
Boolean.parseBoolean(options.getOrDefault("cache-enabled",
+        Boolean.toString(catalog.cachingEnabled())));

Review comment:
       > From my POV the catalog value needs to have precedence of the config 
property because if the catalog does not work well with caching, overriding 
that via config will still lead to unexpected behaviours.
   
   I was thinking about this, but figured that if a user really wants to 
override the caching behavior, then whatever the user configures should take 
precedence.




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