Skip to content

Commit 68b5823

Browse files
committed
address comments
1 parent 9a3aea6 commit 68b5823

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/api/r/SQLUtils.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ private[sql] object SQLUtils extends Logging {
4848
sparkConfigMap: JMap[Object, Object],
4949
enableHiveSupport: Boolean): SparkSession = {
5050
val spark = if (SparkSession.hiveClassesArePresent && enableHiveSupport
51-
&& jsc.sc.conf.get(CATALOG_IMPLEMENTATION.key, "hive") == "hive") {
51+
&& jsc.sc.conf.get(CATALOG_IMPLEMENTATION.key, "hive").toLowerCase == "hive") {
5252
SparkSession.builder().sparkContext(withHiveExternalCatalog(jsc.sc)).getOrCreate()
5353
} else {
5454
if (enableHiveSupport
55-
&& jsc.sc.conf.get(CATALOG_IMPLEMENTATION.key, "hive") == "hive") {
55+
&& jsc.sc.conf.get(CATALOG_IMPLEMENTATION.key, "hive").toLowerCase == "hive") {
5656
logWarning("SparkR: enableHiveSupport is requested for SparkSession but " +
57-
"Spark is not built with Hive; falling back to without Hive support.")
57+
s"Spark is not built with Hive or ${CATALOG_IMPLEMENTATION.key} is not set to 'hive', " +
58+
"falling back to without Hive support.")
5859
}
5960
SparkSession.builder().sparkContext(jsc.sc).getOrCreate()
6061
}

0 commit comments

Comments
 (0)