Skip to content

Commit

Permalink
[SPARK-25415][SQL][FOLLOW-UP] Add Locale.ROOT when toUpperCase
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

Add `Locale.ROOT` when `toUpperCase`.

## How was this patch tested?

manual tests

Closes #22531 from wangyum/SPARK-25415.

Authored-by: Yuming Wang <[email protected]>
Signed-off-by: hyukjinkwon <[email protected]>
  • Loading branch information
wangyum authored and HyukjinKwon committed Sep 24, 2018
1 parent 9bf04d8 commit d522a56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {

private class PlanChangeLogger {

private val logLevel = SQLConf.get.optimizerPlanChangeLogLevel.toUpperCase
private val logLevel = SQLConf.get.optimizerPlanChangeLogLevel

private val logRules = SQLConf.get.optimizerPlanChangeRules.map(Utils.stringToSeq)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ object SQLConf {
"plan after a rule is applied. The value can be 'trace', 'debug', 'info', 'warn', or " +
"'error'. The default log level is 'trace'.")
.stringConf
.checkValue(
str => Set("TRACE", "DEBUG", "INFO", "WARN", "ERROR").contains(str.toUpperCase),
.transform(_.toUpperCase(Locale.ROOT))
.checkValue(logLevel => Set("TRACE", "DEBUG", "INFO", "WARN", "ERROR").contains(logLevel),
"Invalid value for 'spark.sql.optimizer.planChangeLog.level'. Valid values are " +
"'trace', 'debug', 'info', 'warn' and 'error'.")
.createWithDefault("trace")
Expand Down

0 comments on commit d522a56

Please sign in to comment.