Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20696#discussion_r171462718
  
    --- 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 --
    
    Do we have a negative test case to cover that?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to