Skip to content

Commit 622ad03

Browse files
Remove the unnecessary code change in Generic UDF
1 parent 283263f commit 622ad03

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUdfs.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,6 @@ private[hive] case class HiveGenericUdf(funcWrapper: HiveFunctionWrapper, childr
158158
override def foldable =
159159
isUDFDeterministic && returnInspector.isInstanceOf[ConstantObjectInspector]
160160

161-
@transient
162-
protected def constantReturnValue = unwrap(
163-
returnInspector.asInstanceOf[ConstantObjectInspector].getWritableConstantValue(),
164-
returnInspector)
165-
166161
@transient
167162
protected lazy val deferedObjects =
168163
argumentInspectors.map(new DeferredObjectAdapter(_)).toArray[DeferredObject]
@@ -171,7 +166,6 @@ private[hive] case class HiveGenericUdf(funcWrapper: HiveFunctionWrapper, childr
171166

172167
override def eval(input: Row): Any = {
173168
returnInspector // Make sure initialized.
174-
if(foldable) return constantReturnValue
175169

176170
var i = 0
177171
while (i < children.length) {

0 commit comments

Comments
 (0)