rahil-c commented on code in PR #1862: URL: https://github.com/apache/polaris/pull/1862#discussion_r2224780071
########## plugins/spark/v3.5/spark/src/main/java/org/apache/polaris/spark/SparkCatalog.java: ########## @@ -156,15 +160,23 @@ public Table createTable( throw new UnsupportedOperationException( "Create table without location key is not supported by Polaris. Please provide location or path on table creation."); } - if (PolarisCatalogUtils.useDelta(provider)) { // For delta table, we load the delta catalog to help dealing with the // delta log creation. TableCatalog deltaCatalog = deltaHelper.loadDeltaCatalog(this.polarisSparkCatalog); return deltaCatalog.createTable(ident, schema, transforms, properties); - } else { - return this.polarisSparkCatalog.createTable(ident, schema, transforms, properties); } + if (PolarisCatalogUtils.useHudi(provider)) { + // First make a call via polaris's spark catalog + // to ensure an entity is created within the catalog and is authorized + polarisSparkCatalog.createTable(ident, schema, transforms, properties); + + // Then for actually creating the hudi table, we load HoodieCatalog + // to create the .hoodie folder in cloud storage + TableCatalog hudiCatalog = hudiHelper.loadHudiCatalog(this.polarisSparkCatalog); Review Comment: Will follow @gh-yzou suggestion -- 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...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org