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

    https://github.com/apache/spark/pull/10884#discussion_r50627787
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/ErrorPositionSuite.scala ---
    @@ -19,20 +19,34 @@ package org.apache.spark.sql.hive
     
     import scala.util.Try
     
    -import org.scalatest.BeforeAndAfter
    +import org.scalatest.BeforeAndAfterEach
     
     import org.apache.spark.sql.{AnalysisException, QueryTest}
     import org.apache.spark.sql.catalyst.parser.ParseDriver
     import org.apache.spark.sql.catalyst.util.quietly
     import org.apache.spark.sql.hive.test.TestHiveSingleton
     
    -class ErrorPositionSuite extends QueryTest with TestHiveSingleton with 
BeforeAndAfter {
    +class ErrorPositionSuite extends QueryTest with TestHiveSingleton with 
BeforeAndAfterEach {
       import hiveContext.implicits._
     
    -  before {
    +  override protected def beforeEach(): Unit = {
    +    super.beforeEach()
    +    if (sqlContext.tableNames().contains("src")) {
    +      sqlContext.dropTempTable("src")
    +    }
    +    Seq((1, "")).toDF("key", "value").registerTempTable("src")
    --- End diff --
    
    When this suite was first added, I believe that `src` referred to a 
temporary table loaded in TestHive, which is why I used its schema here.
    
    Interestingly, all of the tests in this suite pass even if `src` doesn't 
exist, which suggests to me that the tests aren't strong enough to detect 
certain classes of bugs.


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