szehon-ho commented on code in PR #51007: URL: https://github.com/apache/spark/pull/51007#discussion_r2105707961
########## sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala: ########## @@ -302,10 +302,22 @@ class V2SessionCatalog(catalog: SessionCatalog) val finalProperties = CatalogV2Util.applyClusterByChanges(properties, schema, changes) try { - catalog.alterTable( - catalogTable.copy( - properties = finalProperties, schema = schema, owner = owner, comment = comment, - collation = collation, storage = storage)) + if (SQLConf.get.getConf(StaticSQLConf.CATALOG_IMPLEMENTATION).equals("hive")) { Review Comment: Note: SessionCatalog (V1) alterTableDataSchema explicitly does not support 'drop column'. https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala#L499 So to avoid regression in InMemoryCatalog, in which alterTable can alter the schema, I make the change only for "hive". Following the config check for CATALOG_IMPLEMENTATION in other parts of the code. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org