@@ -512,21 +512,18 @@ case class ArrayAggregate(
512512 """ ,
513513 since = " 2.4.0" )
514514case class TransformKeys (
515- input : Expression ,
515+ argument : Expression ,
516516 function : Expression )
517517 extends MapBasedSimpleHigherOrderFunction with CodegenFallback {
518518
519- override def nullable : Boolean = input .nullable
519+ override def nullable : Boolean = argument .nullable
520520
521521 override def dataType : DataType = {
522- val map = input .dataType.asInstanceOf [MapType ]
522+ val map = argument .dataType.asInstanceOf [MapType ]
523523 MapType (function.dataType, map.valueType, map.valueContainsNull)
524524 }
525525
526- override def inputTypes : Seq [AbstractDataType ] = Seq (MapType , expectingFunctionType)
527-
528- @ transient val (keyType, valueType, valueContainsNull) =
529- HigherOrderFunction .mapKeyValueArgumentType(input.dataType)
526+ @ transient val MapType (keyType, valueType, valueContainsNull) = argument.dataType
530527
531528 override def bind (f : (Expression , Seq [(DataType , Boolean )]) => LambdaFunction ): TransformKeys = {
532529 copy(function = f(function, (keyType, false ) :: (valueType, valueContainsNull) :: Nil ))
@@ -538,8 +535,8 @@ case class TransformKeys(
538535 (keyVar, valueVar)
539536 }
540537
541- override def nullSafeEval (inputRow : InternalRow , value : Any ): Any = {
542- val map = value .asInstanceOf [MapData ]
538+ override def nullSafeEval (inputRow : InternalRow , argumentValue : Any ): Any = {
539+ val map = argumentValue .asInstanceOf [MapData ]
543540 val f = functionForEval
544541 val resultKeys = new GenericArrayData (new Array [Any ](map.numElements))
545542 var i = 0
0 commit comments