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

    https://github.com/apache/spark/pull/17540#discussion_r112606701
  
    --- 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 --
    
    I don't think it is a good idea to come up with a way to exclude commands, 
since this is captured by a listener. Simply noting that onSuccess will issue a 
drop command is sufficient.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to