dtenedor commented on code in PR #44302:
URL: https://github.com/apache/spark/pull/44302#discussion_r1424341068


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala:
##########
@@ -374,6 +374,7 @@ case class AlterTableChangeColumnCommand(
   // TODO: support change column name/dataType/metadata/position.
   override def run(sparkSession: SparkSession): Seq[Row] = {
     val catalog = sparkSession.sessionState.catalog
+    catalog.refreshTable(tableName)

Review Comment:
   Hi @beliefer thanks for your comment, I think we have to check it before 
calling `catalog.getTableRawMetadata` so that method performs a catalog lookup 
as expected rather than reading from the cache (which may be stale). There's 
only one call to `catalog.getTableRawMetadata` in this function so we should be 
OK here, but thanks for keeping this question in mind :) 



-- 
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]

Reply via email to