Skip to content

Commit

Permalink
unset kyuubi.operation.plan.only.mode if mode is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
lsm1 committed Aug 10, 2022
1 parent a75de1b commit a1df52f
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -69,6 +69,11 @@ class SparkSQLOperationManager private (name: String) extends OperationManager(n
OperationLanguages.withName(lang.toUpperCase(Locale.ROOT)) match {
case OperationLanguages.SQL =>
val mode = spark.conf.get(OPERATION_PLAN_ONLY_MODE.key, operationModeDefault)
if (!OperationModes.values.exists(_.toString.equalsIgnoreCase(mode))) {
spark.conf.unset(OPERATION_PLAN_ONLY_MODE.key)
throw new NoSuchElementException(s"Unsupported operation mode: $mode," +
s" unset kyuubi.operation.plan.only.mode")
}
OperationModes.withName(mode.toUpperCase(Locale.ROOT)) match {
case NONE =>
val incrementalCollect = spark.conf.getOption(OPERATION_INCREMENTAL_COLLECT.key)
Expand Down

0 comments on commit a1df52f

Please sign in to comment.