codope commented on code in PR #7236:
URL: https://github.com/apache/hudi/pull/7236#discussion_r1042094739


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/AlterHoodieTableAddColumnsCommand.scala:
##########
@@ -112,7 +112,9 @@ object AlterHoodieTableAddColumnsCommand {
 
     val commitActionType = 
CommitUtils.getCommitActionType(WriteOperationType.ALTER_SCHEMA, 
hoodieCatalogTable.tableType)
     val instantTime = HoodieActiveTimeline.createNewInstantTime
+
     client.startCommitWithTime(instantTime, commitActionType)
+    client.preWrite(instantTime, WriteOperationType.ALTER_SCHEMA, 
hoodieCatalogTable.metaClient)

Review Comment:
   @scxwhite Thanks for the fix. Please consider adding a test in 
`TestAlterTable`



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

Reply via email to