flyrain commented on code in PR #1500:
URL: https://github.com/apache/polaris/pull/1500#discussion_r2074151417
##########
plugins/spark/v3.5/spark/src/main/java/org/apache/polaris/spark/SparkCatalog.java:
##########
@@ -151,13 +151,20 @@ 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.");
Review Comment:
What would be the key in case users provide location or path to the table?
Should we enforce that key instead of excluding certain keys in the method
`isTableWithSparkManagedLocation()`? The approach of exclusion may fail in case
of any other situation.
--
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]