Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17540#discussion_r112601511
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala 
---
    @@ -183,21 +183,22 @@ class DataFrameCallbackSuite extends QueryTest with 
SharedSQLContext {
         }
     
         withTable("tab") {
    -      sql("CREATE TABLE tab(i long) using parquet")
    +      sql("CREATE TABLE tab(i long) using parquet") // adds commands(1) 
via onSuccess
           spark.range(10).write.insertInto("tab")
    -      assert(commands.length == 2)
    -      assert(commands(1)._1 == "insertInto")
    -      assert(commands(1)._2.isInstanceOf[InsertIntoTable])
    -      assert(commands(1)._2.asInstanceOf[InsertIntoTable].table
    +      assert(commands.length == 3)
    +      assert(commands(2)._1 == "insertInto")
    +      assert(commands(2)._2.isInstanceOf[InsertIntoTable])
    +      assert(commands(2)._2.asInstanceOf[InsertIntoTable].table
             .asInstanceOf[UnresolvedRelation].tableIdentifier.table == "tab")
         }
    +    // exiting withTable adds commands(3) via onSuccess (drops tab)
    --- End diff --
    
    how about we update `onSuccess` to only collect commands we are interested?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to