You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2018/01/21 13:26:48 UTC

[GitHub] spark pull request #20341: [MINOR] [SQL] Test case cleanups by recent PRs

GitHub user gatorsmile opened a pull request:

    https://github.com/apache/spark/pull/20341

    [MINOR] [SQL] Test case cleanups by recent PRs

    ## What changes were proposed in this pull request?
    Revert the unneeded test case changes we made in SPARK-23000
    
    Also fixes the test suites that do not call `super.afterAll()` in the local `afterAll`. The `afterAll()` of `TestHiveSingleton` actually reset the environments.
    
    ## How was this patch tested?
    N/A

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gatorsmile/spark testRelated

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/20341.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20341
    
----
commit 563e499442011338f3be219f0e7642fea160bbcf
Author: gatorsmile <ga...@...>
Date:   2018-01-21T12:55:22Z

    Revert "[SPARK-23000] Use fully qualified table names in HiveMetastoreCatalogSuite"
    
    This reverts commit c7572b79da0a29e502890d7618eaf805a1c9f474.

commit e0390567c4b46108b6c3bf7144e547c095fb705f
Author: gatorsmile <ga...@...>
Date:   2018-01-21T13:01:09Z

    fix

commit 0e0cdb269ea88d1233babb898a6aee0981132c75
Author: gatorsmile <ga...@...>
Date:   2018-01-21T13:20:53Z

    fix

----


---

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


[GitHub] spark pull request #20341: [MINOR] [SQL] [TEST] Test case cleanups for recen...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/20341


---

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


[GitHub] spark pull request #20341: [MINOR] [SQL] Test case cleanups by recent PRs

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20341#discussion_r162812178
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDAFSuite.scala ---
    @@ -49,8 +49,12 @@ class HiveUDAFSuite extends QueryTest with TestHiveSingleton with SQLTestUtils {
       }
     
       protected override def afterAll(): Unit = {
    -    sql(s"DROP TEMPORARY FUNCTION IF EXISTS mock")
    -    sql(s"DROP TEMPORARY FUNCTION IF EXISTS hive_max")
    +    try {
    +      sql(s"DROP TEMPORARY FUNCTION IF EXISTS mock")
    +      sql(s"DROP TEMPORARY FUNCTION IF EXISTS hive_max")
    --- End diff --
    
    Actually, these drop functions are unnecessary. However, it sounds also fine to keep them because we should clean up the local objects after usage.


---

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


[GitHub] spark pull request #20341: [MINOR] [SQL] Test case cleanups by recent PRs

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20341#discussion_r162812208
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameJoinSuite.scala ---
    @@ -276,16 +277,14 @@ class DataFrameJoinSuite extends QueryTest with SharedSQLContext {
     
       test("SPARK-23087: don't throw Analysis Exception in CheckCartesianProduct when join condition " +
         "is false or null") {
    -    val df = spark.range(10)
    -    val dfNull = spark.range(10).select(lit(null).as("b"))
    -    val planNull = df.join(dfNull, $"id" === $"b", "left").queryExecution.analyzed
    -
    -    spark.sessionState.executePlan(planNull).optimizedPlan
    -
    -    val dfOne = df.select(lit(1).as("a"))
    -    val dfTwo = spark.range(10).select(lit(2).as("b"))
    -    val planFalse = dfOne.join(dfTwo, $"a" === $"b", "left").queryExecution.analyzed
    -
    -    spark.sessionState.executePlan(planFalse).optimizedPlan
    +    withSQLConf(SQLConf.CROSS_JOINS_ENABLED.key -> "false") {
    +      val df = spark.range(10)
    +      val dfNull = spark.range(10).select(lit(null).as("b"))
    +      df.join(dfNull, $"id" === $"b", "left").queryExecution.optimizedPlan
    +
    +      val dfOne = df.select(lit(1).as("a"))
    +      val dfTwo = spark.range(10).select(lit(2).as("b"))
    +      dfOne.join(dfTwo, $"a" === $"b", "left").queryExecution.optimizedPlan
    +    }
    --- End diff --
    
    cc @mariobriggs 


---

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


[GitHub] spark pull request #20341: [MINOR] [SQL] Test case cleanups by recent PRs

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20341#discussion_r162812196
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala ---
    @@ -492,8 +492,7 @@ private[hive] class TestHiveSparkSession(
       protected val originalUDFs: JavaSet[String] = FunctionRegistry.getFunctionNames
     
       /**
    -   * Resets the test instance by deleting any tables that have been created.
    -   * TODO: also clear out UDFs, views, etc.
    --- End diff --
    
    These TODO has been addressed.


---

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


[GitHub] spark issue #20341: [MINOR] [SQL] Test case cleanups for recent PRs

Posted by mgaido91 <gi...@git.apache.org>.
Github user mgaido91 commented on the issue:

    https://github.com/apache/spark/pull/20341
  
    LGTM


---

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


[GitHub] spark issue #20341: [MINOR] [SQL] Test case cleanups for recent PRs

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20341
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/86440/
    Test PASSed.


---

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


[GitHub] spark issue #20341: [MINOR] [SQL] Test case cleanups for recent PRs

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20341
  
    **[Test build #86440 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86440/testReport)** for PR 20341 at commit [`0e0cdb2`](https://github.com/apache/spark/commit/0e0cdb269ea88d1233babb898a6aee0981132c75).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #20341: [MINOR] [SQL] Test case cleanups for recent PRs

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20341
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #20341: [MINOR] [SQL] Test case cleanups by recent PRs

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/20341
  
    cc @cloud-fan 


---

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


[GitHub] spark issue #20341: [MINOR] [SQL] Test case cleanups by recent PRs

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20341
  
    **[Test build #86440 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86440/testReport)** for PR 20341 at commit [`0e0cdb2`](https://github.com/apache/spark/commit/0e0cdb269ea88d1233babb898a6aee0981132c75).


---

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


[GitHub] spark issue #20341: [MINOR] [SQL] Test case cleanups by recent PRs

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20341
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/71/
    Test PASSed.


---

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


[GitHub] spark issue #20341: [MINOR] [SQL] Test case cleanups by recent PRs

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20341
  
    Merged build finished. Test PASSed.


---

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