RussellSpitzer commented on code in PR #15895:
URL: https://github.com/apache/iceberg/pull/15895#discussion_r3925811909


##########
api/src/main/java/org/apache/iceberg/catalog/SessionCatalog.java:
##########
@@ -222,6 +222,19 @@ default boolean tableExists(SessionContext context, 
TableIdentifier ident) {
    */
   Table loadTable(SessionContext context, TableIdentifier ident);
 
+  /**
+   * Load a table, passing the context it is being loaded with.
+   *
+   * @param context session context
+   * @param ident a table identifier
+   * @param loadContext context for this load
+   * @return instance of {@link Table} implementation referred by {@code ident}
+   * @throws NoSuchTableException if the table does not exist
+   */
+  default Table loadTable(SessionContext context, TableIdentifier ident, 
LoadContext loadContext) {
+    throw new UnsupportedOperationException("Loading a table with context is 
not supported");

Review Comment:
   I still think the default here should just be to call loadTable. No reason 
to break if this method isn't overridden. 
   
   My rational here is that since the load context is owned and controlled by 
the client, the catalog can never use it in isolation to increase access. This 
means a catalog is always free to just ignore the context package although it 
may mean a user cannot access the table. 



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