planga82 commented on code in PR #39826:
URL: https://github.com/apache/spark/pull/39826#discussion_r1093382607
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala:
##########
@@ -149,26 +150,42 @@ class V2SessionCatalog(catalog: SessionCatalog)
throw QueryCompilationErrors.noSuchTableError(ident)
}
- val properties =
CatalogV2Util.applyPropertiesChanges(catalogTable.properties, changes)
- val schema = CatalogV2Util.applySchemaChanges(
- catalogTable.schema, changes, catalogTable.provider, "ALTER TABLE")
- val comment = properties.get(TableCatalog.PROP_COMMENT)
- val owner = properties.getOrElse(TableCatalog.PROP_OWNER,
catalogTable.owner)
- val location =
properties.get(TableCatalog.PROP_LOCATION).map(CatalogUtils.stringToURI)
- val storage = if (location.isDefined) {
- catalogTable.storage.copy(locationUri = location)
- } else {
- catalogTable.storage
+
+ val (columnChanges, otherChanges) = changes.toSeq.partition(change =>
+ change.isInstanceOf[ColumnChange] &&
+ // Not supported changes in alterTableDataSchema
+ !change.isInstanceOf[RenameColumn] &&
!change.isInstanceOf[DeleteColumn]
Review Comment:
I understand what you say about RenameColumn and DeleteColumn, I am not
clear which is the best option, in this case as it is not supported I
considered that it was better to keep the current behavior.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]