@@ -198,7 +198,7 @@ private[hive] case class HiveGenericUdaf(
198
198
199
199
@ transient
200
200
protected lazy val objectInspector = {
201
- val parameterInfo = new SimpleGenericUDAFParameterInfo (inspectors.toArray,false ,false )
201
+ val parameterInfo = new SimpleGenericUDAFParameterInfo (inspectors.toArray, false , false )
202
202
resolver.getEvaluator(parameterInfo)
203
203
.init(GenericUDAFEvaluator .Mode .COMPLETE , inspectors.toArray)
204
204
}
@@ -229,12 +229,13 @@ private[hive] case class HiveUdaf(
229
229
230
230
@ transient
231
231
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)
233
234
.init(GenericUDAFEvaluator .Mode .COMPLETE , inspectors.toArray)
234
235
}
235
236
236
237
@ transient
237
- protected lazy val inspectors = children.map(ex => toInspector(ex.dataType) )
238
+ protected lazy val inspectors = children.map(toInspector)
238
239
239
240
def dataType : DataType = inspectorToDataType(objectInspector)
240
241
@@ -267,7 +268,7 @@ private[hive] case class HiveGenericUdtf(
267
268
protected lazy val function : GenericUDTF = createFunction()
268
269
269
270
@ transient
270
- protected lazy val inputInspectors = children.map( ex => toInspector(ex.dataType) )
271
+ protected lazy val inputInspectors = children.map(toInspector)
271
272
272
273
@ transient
273
274
protected lazy val outputInspector = function.initialize(inputInspectors.toArray)
@@ -345,7 +346,7 @@ private[hive] case class HiveUdafFunction(
345
346
private val inspectors = exprs.map(toInspector).toArray
346
347
347
348
private val function = {
348
- val parameterInfo = new SimpleGenericUDAFParameterInfo (inspectors,false ,false )
349
+ val parameterInfo = new SimpleGenericUDAFParameterInfo (inspectors, false , false )
349
350
resolver.getEvaluator(parameterInfo)
350
351
}
351
352
0 commit comments