beliefer commented on a change in pull request #32513:
URL: https://github.com/apache/spark/pull/32513#discussion_r646489307



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala
##########
@@ -205,30 +204,32 @@ class DataFrameCallbackSuite extends QueryTest
       spark.range(10).write.insertInto("tab")
       sparkContext.listenerBus.waitUntilEmpty()
       assert(commands.length == 3)
-      assert(commands(2)._1 == "insertInto")
-      assert(commands(2)._2.isInstanceOf[InsertIntoStatement])
-      assert(commands(2)._2.asInstanceOf[InsertIntoStatement].table
-        .asInstanceOf[UnresolvedRelation].multipartIdentifier == Seq("tab"))
+      assert(commands(2)._1 == "command")
+      assert(commands(2)._2.isInstanceOf[InsertIntoHadoopFsRelationCommand])
+      assert(commands(2)._2.asInstanceOf[InsertIntoHadoopFsRelationCommand]
+        .catalogTable.get.identifier.identifier == "tab")
     }
     // exiting withTable adds commands(3) via onSuccess (drops tab)
 
     withTable("tab") {
       spark.range(10).select($"id", $"id" % 5 as 
"p").write.partitionBy("p").saveAsTable("tab")
       sparkContext.listenerBus.waitUntilEmpty()
-      assert(commands.length == 5)
-      assert(commands(4)._1 == "saveAsTable")
-      assert(commands(4)._2.isInstanceOf[CreateTable])
-      
assert(commands(4)._2.asInstanceOf[CreateTable].tableDesc.partitionColumnNames 
== Seq("p"))
+      assert(commands.length == 6)

Review comment:
       On master
   
![2100483895](https://user-images.githubusercontent.com/8486025/121006790-e3d6fe00-c7c3-11eb-8529-df9fefc6f0f5.jpg)
   After this PR
   
![2002126306](https://user-images.githubusercontent.com/8486025/121006879-fa7d5500-c7c3-11eb-869b-22fbb0f59dba.jpg)
   
   Because this PR will set the default execution name `command` and 
https://github.com/apache/spark/blob/7ce7aa47585f579a84dc6dd8f116a48174cba988/sql/core/src/main/scala/org/apache/spark/sql/execution/command/createDataSourceTables.scala#L195
 will execute `RepairTableCommand`.




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

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