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

    https://github.com/apache/spark/pull/12945#discussion_r62973062
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala 
---
    @@ -674,6 +676,23 @@ class DatasetSuite extends QueryTest with 
SharedSQLContext {
         }.getMessage
         assert(message.contains("The 0th field of input row cannot be null"))
       }
    +
    +  test("createTempView") {
    +    val dataset = Seq(1, 2, 3).toDS()
    +    dataset.createOrReplaceTempView("tempView")
    +
    +    noException should be thrownBy {
    +      // Overrrides the existing temporary view with same name
    +      dataset.createOrReplaceTempView("tempView")
    +    }
    --- End diff --
    
    In general, we try to avoid using fancy ScalaTest assertion facilities like 
this one. In this case, a simple call to `createOrReplaceTempView` and a 
comment saying that no exception should be thrown is enough.


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