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 <dongjoon@...>
Date: 2018-09-25T21:31:03Z
[SPARK-25534][SQL] Make `SupportWithSQLConf` trait
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]