bryanck commented on code in PR #13979:
URL: https://github.com/apache/iceberg/pull/13979#discussion_r2927069873


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java:
##########
@@ -143,7 +146,22 @@ public Identifier[] listTables(String[] namespace) throws 
NoSuchNamespaceExcepti
 
   @Override
   public Table loadTable(Identifier ident) throws NoSuchTableException {
+    return loadTable(ident, Map.of());
+  }
+
+  @Override
+  public Table loadTable(Identifier ident, Map<String, Object> context)
+      throws NoSuchTableException {
     try {
+      if (!context.isEmpty() && icebergCatalog instanceof ContextAwareCatalog) 
{

Review Comment:
   When `SparkCatalog` is initialized, it will wrap the Iceberg catalog in a 
`CachingCatalog` by default, unless caching is disabled, so context won't get 
passed in that case. Does it make sense to implement `ContextAwareCatalog` in 
`CachingCatalog` also?



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