diff options
author | Cheng Hao <hao.cheng@intel.com> | 2015-07-08 00:10:24 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-07-08 00:10:24 -0700 |
commit | 351a36d0c54d2f995df956ffb0a4236e12f89aad (patch) | |
tree | e47f7be97705d0270d1e1eaf37af92862240cf4d /sql/hive | |
parent | 08192a1b8a375f29fbd852bbaed3a50021737475 (diff) | |
download | spark-351a36d0c54d2f995df956ffb0a4236e12f89aad.tar.gz spark-351a36d0c54d2f995df956ffb0a4236e12f89aad.tar.bz2 spark-351a36d0c54d2f995df956ffb0a4236e12f89aad.zip |
[SPARK-8883][SQL]Remove the OverrideFunctionRegistry
Remove the `OverrideFunctionRegistry` from the Spark SQL, as the subclasses of `FunctionRegistry` have their own way to the delegate to the right underlying `FunctionRegistry`.
Author: Cheng Hao <hao.cheng@intel.com>
Closes #7260 from chenghao-intel/override and squashes the following commits:
164d093 [Cheng Hao] enable the function registry
2ca8459 [Cheng Hao] remove the OverrideFunctionRegistry
Diffstat (limited to 'sql/hive')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala | 2 | ||||
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUDFs.scala | 2 |
2 files changed, 2 insertions, 2 deletions
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 b91242af2d..439d8cab5f 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 @@ -371,7 +371,7 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) { // Note that HiveUDFs will be overridden by functions registered in this context. @transient override protected[sql] lazy val functionRegistry: FunctionRegistry = - new OverrideFunctionRegistry(new HiveFunctionRegistry(FunctionRegistry.builtin)) + new HiveFunctionRegistry(FunctionRegistry.builtin) /* An analyzer that uses the Hive metastore. */ @transient diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUDFs.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUDFs.scala index 1deef6b37e..0bc8adb16a 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUDFs.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUDFs.scala @@ -77,7 +77,7 @@ private[hive] class HiveFunctionRegistry(underlying: analysis.FunctionRegistry) } override def registerFunction(name: String, builder: FunctionBuilder): Unit = - throw new UnsupportedOperationException + underlying.registerFunction(name, builder) } private[hive] case class HiveSimpleUDF(funcWrapper: HiveFunctionWrapper, children: Seq[Expression]) |