Github user jiangxb1987 commented on a diff in the pull request:
https://github.com/apache/spark/pull/20696#discussion_r171439915
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala ---
@@ -314,8 +314,8 @@ case class AlterTableChangeColumnCommand(
val resolver = sparkSession.sessionState.conf.resolver
DDLUtils.verifyAlterTableType(catalog, table, isView = false)
- // Find the origin column from schema by column name.
- val originColumn = findColumnByName(table.schema, columnName, resolver)
+ // Find the origin column from dataSchema by column name.
+ val originColumn = findColumnByName(table.dataSchema, columnName,
resolver)
--- End diff --
As described in the comment, we only support altering non-partition columns:
```
A command to change the column for a table, only support changing the
comment of a non-partition
column for now.
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]