Skip to content
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
maropu committed Dec 23, 2017
commit b87e61e3d61d9c6ad30f2ec331481756dc4a4ed9
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import org.apache.spark.unsafe.types.{ByteArray, UTF8String}
""")
case class Concat(children: Seq[Expression]) extends Expression with ImplicitCastInputTypes {

private lazy val isBinaryMode = children.forall(_.dataType == BinaryType)
private lazy val isBinaryMode = children.nonEmpty && children.forall(_.dataType == BinaryType)

override def inputTypes: Seq[AbstractDataType] =
Seq.fill(children.size)(if (isBinaryMode) BinaryType else StringType)
Expand Down