eric-maynard commented on code in PR #1368:
URL: https://github.com/apache/polaris/pull/1368#discussion_r2045059803
##########
plugins/spark/v3.5/src/main/java/org/apache/polaris/spark/SparkCatalog.java:
##########
@@ -161,33 +163,59 @@ public Table createTable(
@Override
public Table alterTable(Identifier ident, TableChange... changes) throws
NoSuchTableException {
- throw new UnsupportedOperationException("alterTable");
+ try {
+ return this.icebergsSparkCatalog.alterTable(ident, changes);
+ } catch (NoSuchTableException e) {
+ Table table = this.polarisSparkCatalog.loadTable(ident);
+ String provider =
table.properties().get(PolarisCatalogUtils.TABLE_PROVIDER_KEY);
+ if (PolarisCatalogUtils.useDelta(provider)) {
+ // For delta table, most of the alter operations is a delta log
manipulation,
+ // we load the delta catalog to help handling the alter table
operation.
+ // NOTE: This currently doesn't work for changing file location and
file format
Review Comment:
Sounds good! As long as the error surfaces to the user some way, I think
it's fine
--
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]