diff options
author | Cheng Hao <hao.cheng@intel.com> | 2014-12-30 11:47:08 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-12-30 11:47:08 -0800 |
commit | 63b84b7d6785a687dd7f4c0e2bb1e348800d30d8 (patch) | |
tree | 98b8f5f87de3b8e1825605c66c4a8b0752e0d07e /sql | |
parent | 5595eaa74f139fdb6fd8a7bb0ca6ed421ef00ac8 (diff) | |
download | spark-63b84b7d6785a687dd7f4c0e2bb1e348800d30d8.tar.gz spark-63b84b7d6785a687dd7f4c0e2bb1e348800d30d8.tar.bz2 spark-63b84b7d6785a687dd7f4c0e2bb1e348800d30d8.zip |
[SPARK-4904] [SQL] Remove the unnecessary code change in Generic UDF
Since #3429 has been merged, the bug of wrapping to Writable for HiveGenericUDF is resolved, we can safely remove the foldable checking in `HiveGenericUdf.eval`, which discussed in #2802.
Author: Cheng Hao <hao.cheng@intel.com>
Closes #3745 from chenghao-intel/generic_udf and squashes the following commits:
622ad03 [Cheng Hao] Remove the unnecessary code change in Generic UDF
Diffstat (limited to 'sql')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUdfs.scala | 6 |
1 files changed, 0 insertions, 6 deletions
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 93b6ef9fbc..7d863f9d89 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 @@ -159,11 +159,6 @@ private[hive] case class HiveGenericUdf(funcWrapper: HiveFunctionWrapper, childr isUDFDeterministic && returnInspector.isInstanceOf[ConstantObjectInspector] @transient - protected def constantReturnValue = unwrap( - returnInspector.asInstanceOf[ConstantObjectInspector].getWritableConstantValue(), - returnInspector) - - @transient protected lazy val deferedObjects = argumentInspectors.map(new DeferredObjectAdapter(_)).toArray[DeferredObject] @@ -171,7 +166,6 @@ private[hive] case class HiveGenericUdf(funcWrapper: HiveFunctionWrapper, childr override def eval(input: Row): Any = { returnInspector // Make sure initialized. - if(foldable) return constantReturnValue var i = 0 while (i < children.length) { |