Skip to content

Commit

Permalink
[SPARK-30401][SQL] Call requireNonStaticConf() only once in set()
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Calls of `requireNonStaticConf()` are removed from the `set()` methods in RuntimeConfig because those methods invoke `def set(key: String, value: String): Unit` where `requireNonStaticConf()` is called as well.

### Why are the changes needed?
To avoid unnecessary calls of `requireNonStaticConf()`.

### Does this PR introduce any user-facing change?
No

### How was this patch tested?
By existing tests from `SQLConfSuite`

Closes #27062 from MaxGekk/call-requireNonStaticConf-once.

Authored-by: Maxim Gekk <max.gekk@gmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
  • Loading branch information
MaxGekk authored and HyukjinKwon committed Jan 2, 2020
1 parent ce7a49f commit b316d37
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class RuntimeConfig private[sql](sqlConf: SQLConf = new SQLConf) {
* @since 2.0.0
*/
def set(key: String, value: Boolean): Unit = {
requireNonStaticConf(key)
set(key, value.toString)
}

Expand All @@ -57,7 +56,6 @@ class RuntimeConfig private[sql](sqlConf: SQLConf = new SQLConf) {
* @since 2.0.0
*/
def set(key: String, value: Long): Unit = {
requireNonStaticConf(key)
set(key, value.toString)
}

Expand Down

0 comments on commit b316d37

Please sign in to comment.