@@ -198,7 +198,7 @@ private[hive] case class HiveGenericUdaf(
198198
199199 @ transient
200200 protected lazy val objectInspector = {
201- val parameterInfo = new SimpleGenericUDAFParameterInfo (inspectors.toArray,false ,false )
201+ val parameterInfo = new SimpleGenericUDAFParameterInfo (inspectors.toArray, false , false )
202202 resolver.getEvaluator(parameterInfo)
203203 .init(GenericUDAFEvaluator .Mode .COMPLETE , inspectors.toArray)
204204 }
@@ -229,12 +229,13 @@ private[hive] case class HiveUdaf(
229229
230230 @ transient
231231 protected lazy val objectInspector = {
232- resolver.getEvaluator(children.map(_.dataType.toTypeInfo).toArray)
232+ val parameterInfo = new SimpleGenericUDAFParameterInfo (inspectors.toArray, false , false )
233+ resolver.getEvaluator(parameterInfo)
233234 .init(GenericUDAFEvaluator .Mode .COMPLETE , inspectors.toArray)
234235 }
235236
236237 @ transient
237- protected lazy val inspectors = children.map(ex => toInspector(ex.dataType) )
238+ protected lazy val inspectors = children.map(toInspector)
238239
239240 def dataType : DataType = inspectorToDataType(objectInspector)
240241
@@ -267,7 +268,7 @@ private[hive] case class HiveGenericUdtf(
267268 protected lazy val function : GenericUDTF = createFunction()
268269
269270 @ transient
270- protected lazy val inputInspectors = children.map( ex => toInspector(ex.dataType) )
271+ protected lazy val inputInspectors = children.map(toInspector)
271272
272273 @ transient
273274 protected lazy val outputInspector = function.initialize(inputInspectors.toArray)
@@ -345,7 +346,7 @@ private[hive] case class HiveUdafFunction(
345346 private val inspectors = exprs.map(toInspector).toArray
346347
347348 private val function = {
348- val parameterInfo = new SimpleGenericUDAFParameterInfo (inspectors,false ,false )
349+ val parameterInfo = new SimpleGenericUDAFParameterInfo (inspectors, false , false )
349350 resolver.getEvaluator(parameterInfo)
350351 }
351352
0 commit comments