Skip to content
Closed
Prev Previous commit
Next Next commit
Unifying code for legacy and new path
  • Loading branch information
MaxGekk committed Jun 26, 2018
commit cf9364d2e5aa1e6710bcc4d37c6e35d16b5343e7
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,7 @@ case class Size(
${CodeGenerator.javaType(dataType)} ${ev.value} = ${childGen.isNull} ? -1 :
(${childGen.value}).numElements();""", isNull = FalseLiteral)
} else {
child.dataType match {
case _: ArrayType | _: MapType => defineCodeGen(ctx, ev, c => s"($c).numElements()")
case other => throw new UnsupportedOperationException(
s"The size function doesn't support the operand type ${other.getClass.getCanonicalName}")
}
defineCodeGen(ctx, ev, c => s"($c).numElements()")
}
}
}
Expand Down