aboutsummaryrefslogtreecommitdiff
path: root/sql/core
diff options
context:
space:
mode:
authorCheng Hao <hao.cheng@intel.com>2015-02-03 12:12:26 -0800
committerMichael Armbrust <michael@databricks.com>2015-02-03 12:12:26 -0800
commitca7a6cdff004eb4605fd223e127b4a46a0a214e7 (patch)
tree31e7c93b147b264557e45eea777dce63e9343ff7 /sql/core
parent0c20ce69fb4bcb1cec5313a9d072826c5588cbbc (diff)
downloadspark-ca7a6cdff004eb4605fd223e127b4a46a0a214e7.tar.gz
spark-ca7a6cdff004eb4605fd223e127b4a46a0a214e7.tar.bz2
spark-ca7a6cdff004eb4605fd223e127b4a46a0a214e7.zip
[SPARK-5550] [SQL] Support the case insensitive for UDF
SQL in HiveContext, should be case insensitive, however, the following query will fail. ```scala udf.register("random0", () => { Math.random()}) assert(sql("SELECT RANDOM0() FROM src LIMIT 1").head().getDouble(0) >= 0.0) ``` Author: Cheng Hao <hao.cheng@intel.com> Closes #4326 from chenghao-intel/udf_case_sensitive and squashes the following commits: 485cf66 [Cheng Hao] Support the case insensitive for UDF
Diffstat (limited to 'sql/core')
-rw-r--r--sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
index a741d0031d..2697e780c0 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
@@ -87,7 +87,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
protected[sql] lazy val catalog: Catalog = new SimpleCatalog(true)
@transient
- protected[sql] lazy val functionRegistry: FunctionRegistry = new SimpleFunctionRegistry
+ protected[sql] lazy val functionRegistry: FunctionRegistry = new SimpleFunctionRegistry(true)
@transient
protected[sql] lazy val analyzer: Analyzer =