dennishuo commented on code in PR #1305:
URL: https://github.com/apache/polaris/pull/1305#discussion_r2041556079


##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -270,8 +319,8 @@ public LoadTableResponse createTableDirect(Namespace 
namespace, CreateTableReque
                 .getResolvedReferenceCatalogEntity()
                 .getResolvedLeafEntity()
                 .getEntity());
-    if (isExternal(catalog)) {
-      throw new BadRequestException("Cannot create table on external 
catalogs.");
+    if (isStaticFacade(catalog)) {

Review Comment:
   Not necessarily. Ultimately, the check here before wasn't too clear in 
defining *why* `isExternal` might mean disallowing DMLs/DDLs. I'd refine the 
definitions as follows:
   
   - isExternal => "has an external source of truth"
   - isStaticFacade => "this catalog which possesses an external source of 
truth is static, meaning we do not forward requests to the source of truth, 
and/or the source of truth is 'abstract' in that we *may* not have a concrete 
locator for the external source of truth. As a corollary, we cannot allow 
mutations on this catalog."
   - isPassthroughFacade => "this catalog which possesses an external source of 
truth is capable of, and will, forward requests as needed to the source of 
truth; the source of truth is well-defined in the form of a 
ConnectionConfigInfo"
   
   In migration scenarios we might turn a passthrough facade into a static 
facade at some point, so we might further refine the conditionals in the future 
based on the migration state. But ultimately, the *choice* to act as a "static 
facade" is the correct condition-check here to block mutations, even if we have 
such a scenario where a ConnectionConfigInfo is available in the static facade 
(it could be in a "verification mode", for example without truly performing 
passthrough *behaviors*).



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

Reply via email to