gh-yzou commented on code in PR #1427: URL: https://github.com/apache/polaris/pull/1427#discussion_r2059541872
########## plugins/spark/v3.5/integration/src/intTest/java/org/apache/polaris/spark/quarkus/it/SparkIntegrationBase.java: ########## @@ -108,4 +92,29 @@ private Object[] toJava(Row row) { }) .toArray(Object[]::new); } + + /** Delete the file directory recursively. */ + protected void deleteDirectory(File directory) { + if (directory.exists()) { + File[] files = directory.listFiles(); + if (files != null) { + for (File file : files) { + if (file.isDirectory()) { + deleteDirectory(file); + } else { + file.delete(); + } + } + } + directory.delete(); + } + } + + protected List<String> listDirectory(String directoryPath) { Review Comment: i don't mean to recursively look into the path, and only list the directories under the given path. I updated the utility function and added comment to make it more clear ########## plugins/spark/v3.5/spark/src/main/java/org/apache/polaris/spark/SparkCatalog.java: ########## @@ -151,13 +151,19 @@ public Table createTable( String provider = properties.get(PolarisCatalogUtils.TABLE_PROVIDER_KEY); if (PolarisCatalogUtils.useIceberg(provider)) { return this.icebergsSparkCatalog.createTable(ident, schema, transforms, properties); - } else 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.isTableWithSparkManagedLocation(properties)) { + throw new UnsupportedOperationException( + "Table with spark managed location is currently not supported by Polaris. Please provide location or path to the table."); + } + if (PolarisCatalogUtils.useDelta(provider)) { + // For delta table, we load the delta catalog to help dealing with the Review Comment: updated -- 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