Skip to content

Commit

Permalink
Make HiveUDAF fields transient since object inspectors are not serial…
Browse files Browse the repository at this point in the history
…izable.
  • Loading branch information
marmbrus committed Apr 3, 2014
1 parent 6a4b671 commit 5096f99
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,16 @@ case class HiveGenericUdaf(

type UDFType = AbstractGenericUDAFResolver

@transient
protected lazy val resolver: AbstractGenericUDAFResolver = createFunction(name)

@transient
protected lazy val objectInspector = {
resolver.getEvaluator(children.map(_.dataType.toTypeInfo).toArray)
.init(GenericUDAFEvaluator.Mode.COMPLETE, inspectors.toArray)
}

@transient
protected lazy val inspectors = children.map(_.dataType).map(toInspector)

def dataType: DataType = inspectorToDataType(objectInspector)
Expand Down

0 comments on commit 5096f99

Please sign in to comment.