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

    https://github.com/apache/spark/pull/17858#discussion_r116039639
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertIntoHiveTableSuite.scala
 ---
    @@ -494,4 +494,34 @@ class InsertIntoHiveTableSuite extends QueryTest with 
TestHiveSingleton with Bef
             spark.table("t").write.insertInto(tableName)
           }
       }
    +
    +  test(
    +    """SPARK-20594: This is a walk-around fix to resolve a Hive bug. Hive 
requires that the
    +      |staging directory needs to avoid being deleted when users set 
hive.exec.stagingdir
    +      |under the table directory.""".stripMargin) {
    --- End diff --
    
    uh, because that is not to create a Hive table. How about simplifying the 
test case to?
    ```Scala
      test("SPARK-20594: hive.exec.stagingdir was deleted by Hive") {
        // Set hive.exec.stagingdir under the table directory without start 
with ".".
        withSQLConf("hive.exec.stagingdir" -> "./test") {
          withTable("test_table") {
            sql("CREATE TABLE test_table (key int)")
            sql("INSERT OVERWRITE TABLE test_table SELECT 1")
            checkAnswer(sql("SELECT * FROM test_table"), Row(1))
          }
        }
      }
    ```



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