Skip to content

Commit

Permalink
Simplify scope of varibles as needed
Browse files Browse the repository at this point in the history
  • Loading branch information
kiszk committed Mar 6, 2017
1 parent a885907 commit 65fa05a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,11 @@ case class MapElementsExec(
}

override def doConsume(ctx: CodegenContext, input: Seq[ExprCode], row: ExprCode): String = {
val inType = if (child.output.length == 1) child.output(0).dataType else NullType
val outType = outputObjAttr.dataType
val (funcClass, methodName) = func match {
case m: MapFunction[_, _] => classOf[MapFunction[_, _]] -> "call"
case _ =>
(inType, outType) match {
(if (child.output.length == 1) child.output(0).dataType else NullType,
outputObjAttr.dataType) match {
// if a pair of an argument and return types is one of specific types
// whose specialized method (apply$mc..$sp) is generated by scalac,
// Catalyst generated a direct method call to the specialized method.
Expand Down

0 comments on commit 65fa05a

Please sign in to comment.