From 966e719b77e3e8e3e715e58f3a0aeed3b4aba009 Mon Sep 17 00:00:00 2001 From: wangfei Date: Thu, 30 Apr 2015 16:41:13 +0800 Subject: [PATCH] set CASE_SENSITIVE false in hivecontext --- sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala | 5 +++-- .../main/scala/org/apache/spark/sql/hive/HiveContext.scala | 5 +---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala b/sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala index 9331916da41fa..aae1e26f369e3 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala @@ -17,12 +17,12 @@ package org.apache.spark.sql -import org.apache.spark.sql.catalyst.CatalystConf +import java.util.Properties import scala.collection.immutable import scala.collection.JavaConversions._ -import java.util.Properties +import org.apache.spark.sql.catalyst.CatalystConf private[spark] object SQLConf { val COMPRESS_CACHED = "spark.sql.inMemoryColumnarStorage.compressed" @@ -266,3 +266,4 @@ private[sql] class SQLConf extends Serializable with CatalystConf { settings.clear() } } + diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala index 174ed204e8fe2..e243c60dad282 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala @@ -50,10 +50,6 @@ import org.apache.spark.sql.types._ class HiveContext(sc: SparkContext) extends SQLContext(sc) { self => - protected[sql] override lazy val conf: SQLConf = new SQLConf { - override def dialect: String = getConf(SQLConf.DIALECT, "hiveql") - } - /** * When true, enables an experimental feature where metastore tables that use the parquet SerDe * are automatically converted to use the Spark SQL parquet table scan, instead of the Hive @@ -266,6 +262,7 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) { protected[hive] class SQLSession extends super.SQLSession { protected[sql] override lazy val conf: SQLConf = new SQLConf { override def dialect: String = getConf(SQLConf.DIALECT, "hiveql") + setConf(CatalystConf.CASE_SENSITIVE, "false") } protected[hive] lazy val hiveconf: HiveConf = {