You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by dongjoon-hyun <gi...@git.apache.org> on 2018/09/25 21:52:53 UTC
[GitHub] spark pull request #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trai...
GitHub user dongjoon-hyun opened a pull request:
https://github.com/apache/spark/pull/22548
[SPARK-25534][SQL] Make `SupportWithSQLConf` trait
## What changes were proposed in this pull request?
Currently, Spark has 6 `withSQLConf` function. This PR aims to remove duplicated and inconsistent `withSQLConf` code and reduce them to the following three meaningful implementations.
- SupportWithSQLConf.scala: The one which was used in `PlanTest`.
- ExecutorSideSQLConfSuite.scala: The one which doesn't throw Exception on StaticConf changes.
- SQLTestUtils.scala: The one which changes the active session like the following.
```scala
protected override def withSQLConf(pairs: (String, String)*)(f: => Unit): Unit = {
SparkSession.setActiveSession(spark)
super.withSQLConf(pairs: _*)(f)
}
```
## How was this patch tested?
Pass the Jenkins with the existing tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dongjoon-hyun/spark SPARK-25534
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/22548.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 #22548
----
commit bc4d71dc739fde46be3dc4bf49ad71793d9e33fd
Author: Dongjoon Hyun <do...@...>
Date: 2018-09-25T21:31:03Z
[SPARK-25534][SQL] Make `SupportWithSQLConf` trait
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/22548
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/96586/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/22548
**[Test build #96579 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/96579/testReport)** for PR 22548 at commit [`bc4d71d`](https://github.com/apache/spark/commit/bc4d71dc739fde46be3dc4bf49ad71793d9e33fd).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `trait PlanTestBase extends PredicateHelper with SupportWithSQLConf `
* `trait SupportWithSQLConf `
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/22548
**[Test build #96586 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/96586/testReport)** for PR 22548 at commit [`0827ede`](https://github.com/apache/spark/commit/0827ede5ec5171c0818676a48dbeae41f78fb8f4).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/22548
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/96579/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trait
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/22548
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 #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/22548
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-unified/3456/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trait
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/22548
Could you review this PR, @cloud-fan , @gatorsmile , and @wangyum ?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trai...
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/22548#discussion_r220369718
--- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala ---
@@ -57,7 +57,7 @@ trait CodegenInterpretedPlanTest extends PlanTest {
* Provides helper methods for comparing plans, but without the overhead of
* mandating a FunSuite.
*/
-trait PlanTestBase extends PredicateHelper { self: Suite =>
+trait PlanTestBase extends PredicateHelper with SupportWithSQLConf { self: Suite =>
--- End diff --
I put `SupportWithSQLConf.scala` in the same package with `PlanTest`. We can move this to another better place.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/22548
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 #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trait
Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:
https://github.com/apache/spark/pull/22548
We have duplicated `withTempPath`, `withTempTable` too. Shall we pull them out as well? The trait name can be `SQLHelper`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trait
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/22548
+1, Sure, @cloud-fan !
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/22548
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/22548
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 #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trait
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/22548
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-unified/3453/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/22548
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 #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trait
Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:
https://github.com/apache/spark/pull/22548
sure
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/22548
Thank you! I'll merge this to the master.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trait
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/22548
**[Test build #96579 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/96579/testReport)** for PR 22548 at commit [`bc4d71d`](https://github.com/apache/spark/commit/bc4d71dc739fde46be3dc4bf49ad71793d9e33fd).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SupportWithSQLConf` trait
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/22548
It turns out that `withTempTable` cannot be here together because it requires `spark.catalog`.
```scala
def withTempTable(tableNames: String*)(f: => Unit): Unit = {
try f finally tableNames.foreach(spark.catalog.dropTempView)
}
```
Since it requires function signature changes, shall we postpone `withTempTable` as another PR?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/22548
**[Test build #96586 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/96586/testReport)** for PR 22548 at commit [`0827ede`](https://github.com/apache/spark/commit/0827ede5ec5171c0818676a48dbeae41f78fb8f4).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `trait PlanTestBase extends PredicateHelper with SQLHelper `
* `trait SQLHelper `
* `abstract class CheckpointFileManagerTests extends SparkFunSuite with SQLHelper `
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #22548: [SPARK-25534][SQL] Make `SQLHelper` trait
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/22548
It passed. Merged to `master`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org