@@ -290,12 +290,6 @@ public CreateNamespaceResponse createNamespace(CreateNamespaceRequest request) {
290
290
}
291
291
}
292
292
293
- private static boolean isStaticFacade (CatalogEntity catalog ) {
294
- return org .apache .polaris .core .admin .model .Catalog .TypeEnum .EXTERNAL .equals (
295
- catalog .getCatalogType ())
296
- && !catalog .isPassthroughFacade ();
297
- }
298
-
299
293
public GetNamespaceResponse loadNamespaceMetadata (Namespace namespace ) {
300
294
PolarisAuthorizableOperation op = PolarisAuthorizableOperation .LOAD_NAMESPACE_METADATA ;
301
295
authorizeBasicNamespaceOperationOrThrow (op , namespace );
@@ -369,7 +363,7 @@ public LoadTableResponse createTableDirect(Namespace namespace, CreateTableReque
369
363
authorizeCreateTableLikeUnderNamespaceOperationOrThrow (op , identifier );
370
364
371
365
CatalogEntity catalog = getResolvedCatalogEntity ();
372
- if (isStaticFacade (catalog )) {
366
+ if (catalog . isStaticFacade ()) {
373
367
throw new BadRequestException ("Cannot create table on static-facade external catalogs." );
374
368
}
375
369
CreateTableRequest requestWithoutReservedProperties =
@@ -400,7 +394,7 @@ public LoadTableResponse createTableDirectWithWriteDelegation(
400
394
op , TableIdentifier .of (namespace , request .name ()));
401
395
402
396
CatalogEntity catalog = getResolvedCatalogEntity ();
403
- if (isStaticFacade (catalog )) {
397
+ if (catalog . isStaticFacade ()) {
404
398
throw new BadRequestException ("Cannot create table on static-facade external catalogs." );
405
399
}
406
400
request .validate ();
@@ -492,7 +486,7 @@ public LoadTableResponse createTableStaged(Namespace namespace, CreateTableReque
492
486
op , TableIdentifier .of (namespace , request .name ()));
493
487
494
488
CatalogEntity catalog = getResolvedCatalogEntity ();
495
- if (isStaticFacade (catalog )) {
489
+ if (catalog . isStaticFacade ()) {
496
490
throw new BadRequestException ("Cannot create table on static-facade external catalogs." );
497
491
}
498
492
TableMetadata metadata = stageTableCreateHelper (namespace , request );
@@ -507,7 +501,7 @@ public LoadTableResponse createTableStagedWithWriteDelegation(
507
501
op , TableIdentifier .of (namespace , request .name ()));
508
502
509
503
CatalogEntity catalog = getResolvedCatalogEntity ();
510
- if (isStaticFacade (catalog )) {
504
+ if (catalog . isStaticFacade ()) {
511
505
throw new BadRequestException ("Cannot create table on static-facade external catalogs." );
512
506
}
513
507
TableIdentifier ident = TableIdentifier .of (namespace , request .name ());
@@ -778,7 +772,7 @@ public LoadTableResponse updateTable(
778
772
op , PolarisEntitySubType .ICEBERG_TABLE , tableIdentifier );
779
773
780
774
CatalogEntity catalog = getResolvedCatalogEntity ();
781
- if (isStaticFacade (catalog )) {
775
+ if (catalog . isStaticFacade ()) {
782
776
throw new BadRequestException ("Cannot update table on static-facade external catalogs." );
783
777
}
784
778
return catalogHandlerUtils .updateTable (
@@ -791,7 +785,7 @@ public LoadTableResponse updateTableForStagedCreate(
791
785
authorizeCreateTableLikeUnderNamespaceOperationOrThrow (op , tableIdentifier );
792
786
793
787
CatalogEntity catalog = getResolvedCatalogEntity ();
794
- if (isStaticFacade (catalog )) {
788
+ if (catalog . isStaticFacade ()) {
795
789
throw new BadRequestException ("Cannot update table on static-facade external catalogs." );
796
790
}
797
791
return catalogHandlerUtils .updateTable (
@@ -812,7 +806,7 @@ public void dropTableWithPurge(TableIdentifier tableIdentifier) {
812
806
op , PolarisEntitySubType .ICEBERG_TABLE , tableIdentifier );
813
807
814
808
CatalogEntity catalog = getResolvedCatalogEntity ();
815
- if (isStaticFacade (catalog )) {
809
+ if (catalog . isStaticFacade ()) {
816
810
throw new BadRequestException ("Cannot drop table on static-facade external catalogs." );
817
811
}
818
812
catalogHandlerUtils .purgeTable (baseCatalog , tableIdentifier );
@@ -833,7 +827,7 @@ public void renameTable(RenameTableRequest request) {
833
827
op , PolarisEntitySubType .ICEBERG_TABLE , request .source (), request .destination ());
834
828
835
829
CatalogEntity catalog = getResolvedCatalogEntity ();
836
- if (isStaticFacade (catalog )) {
830
+ if (catalog . isStaticFacade ()) {
837
831
throw new BadRequestException ("Cannot rename table on static-facade external catalogs." );
838
832
}
839
833
catalogHandlerUtils .renameTable (baseCatalog , request );
@@ -852,7 +846,7 @@ public void commitTransaction(CommitTransactionRequest commitTransactionRequest)
852
846
.map (UpdateTableRequest ::identifier )
853
847
.toList ());
854
848
CatalogEntity catalog = getResolvedCatalogEntity ();
855
- if (isStaticFacade (catalog )) {
849
+ if (catalog . isStaticFacade ()) {
856
850
throw new BadRequestException ("Cannot update table on static-facade external catalogs." );
857
851
}
858
852
@@ -969,7 +963,7 @@ public LoadViewResponse createView(Namespace namespace, CreateViewRequest reques
969
963
op , TableIdentifier .of (namespace , request .name ()));
970
964
971
965
CatalogEntity catalog = getResolvedCatalogEntity ();
972
- if (isStaticFacade (catalog )) {
966
+ if (catalog . isStaticFacade ()) {
973
967
throw new BadRequestException ("Cannot create view on static-facade external catalogs." );
974
968
}
975
969
return catalogHandlerUtils .createView (viewCatalog , namespace , request );
@@ -987,7 +981,7 @@ public LoadViewResponse replaceView(TableIdentifier viewIdentifier, UpdateTableR
987
981
authorizeBasicTableLikeOperationOrThrow (op , PolarisEntitySubType .ICEBERG_VIEW , viewIdentifier );
988
982
989
983
CatalogEntity catalog = getResolvedCatalogEntity ();
990
- if (isStaticFacade (catalog )) {
984
+ if (catalog . isStaticFacade ()) {
991
985
throw new BadRequestException ("Cannot replace view on static-facade external catalogs." );
992
986
}
993
987
return catalogHandlerUtils .updateView (viewCatalog , viewIdentifier , applyUpdateFilters (request ));
@@ -1014,7 +1008,7 @@ public void renameView(RenameTableRequest request) {
1014
1008
op , PolarisEntitySubType .ICEBERG_VIEW , request .source (), request .destination ());
1015
1009
1016
1010
CatalogEntity catalog = getResolvedCatalogEntity ();
1017
- if (isStaticFacade (catalog )) {
1011
+ if (catalog . isStaticFacade ()) {
1018
1012
throw new BadRequestException ("Cannot rename view on static-facade external catalogs." );
1019
1013
}
1020
1014
catalogHandlerUtils .renameView (viewCatalog , request );
0 commit comments