Skip to content

Commit 1765ca4

Browse files
committed
Use .toBoolean.
1 parent 9d3f199 commit 1765ca4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ trait SQLConf {
8888
*
8989
* Defaults to false as this feature is currently experimental.
9090
*/
91-
private[spark] def codegenEnabled: Boolean =
92-
if (getConf(CODEGEN_ENABLED, "false") == "true") true else false
91+
private[spark] def codegenEnabled: Boolean = getConf(CODEGEN_ENABLED, "false").toBoolean
9392

9493
/**
9594
* Upper bound on the sizes (in bytes) of the tables qualified for the auto conversion to
@@ -113,7 +112,7 @@ trait SQLConf {
113112
* When set to true, we always treat byte arrays in Parquet files as strings.
114113
*/
115114
private[spark] def isParquetBinaryAsString: Boolean =
116-
if (getConf(PARQUET_BINARY_AS_STRING, "false") == "true") true else false
115+
getConf(PARQUET_BINARY_AS_STRING, "false").toBoolean
117116

118117
/** ********************** SQLConf functionality methods ************ */
119118

0 commit comments

Comments
 (0)