Skip to content

Commit 528b0fd

Browse files
committed
Use Option.
1 parent 0214fad commit 528b0fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ case class SetCommand(kv: Option[(String, Option[String])]) extends RunnableComm
8989
val runFunc = (sparkSession: SparkSession) => {
9090
sparkSession.sessionState.conf.getAllDefinedConfs.sorted.map {
9191
case (key, defaultValue, doc) =>
92-
Row(key, if (defaultValue == null) "<undefined>" else defaultValue, doc)
92+
Row(key, Option(defaultValue).getOrElse("<undefined>"), doc)
9393
}
9494
}
9595
val schema = StructType(

0 commit comments

Comments
 (0)