singhpk234 commented on code in PR #13979: URL: https://github.com/apache/iceberg/pull/13979#discussion_r2328909948
########## api/src/main/java/org/apache/iceberg/catalog/ContextAwareTableCatalog.java: ########## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iceberg.catalog; + +import java.util.Map; +import org.apache.iceberg.Table; +import org.apache.iceberg.exceptions.NoSuchTableException; + +/** + * Extension interface for Catalog that supports context-aware table loading. This enables passing + * additional context (such as view information) when loading tables. + */ +public interface ContextAwareTableCatalog { + + /** Context key for the view identifier that references a table */ + String VIEW_IDENTIFIER_KEY = "view.identifier"; + + /** + * Load a table with additional context information. + * + * <p>Common context keys: + * + * <ul> + * <li>{@link #VIEW_IDENTIFIER_KEY}: The fully qualified identifier of the view referencing this + * table + * </ul> + * + * @param identifier the table identifier to load + * @param context additional context information as key-value pairs + * @return the loaded table + * @throws NoSuchTableException if the table does not exist + */ + Table loadTableViaView(TableIdentifier identifier, Map<String, Object> context) Review Comment: > Can we expect more context params to this function That was the intention, to leave door open to pass more runtime context to the catalog, i was trying to model this as something like we already do i.e SessionContext this is a more runtime context so that engines can plumb their context back to the catalog and then catalog client can use this to make subsequent calls to the server. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org