Skip to content
Prev Previous commit
Next Next commit
review comments
  • Loading branch information
mgaido91 committed Apr 13, 2018
commit dd9482e230c9efdab66609639d633a207e47f736
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ case class ArrayJoin(
val nullReplacementEval = nullReplacement.map(_.eval(input))
if (nullReplacementEval.contains(null)) return null

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove an extra line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the other one.... :)


val buffer = new UTF8StringBuilder()
var firstItem = true
val nullHandling = nullReplacementEval match {
Expand Down Expand Up @@ -380,7 +379,7 @@ case class ArrayJoin(
|}
|$buffer.append(${replacementGen.value});
|$firstItem = false;
""".stripMargin
""".stripMargin
}
val execCode = if (replacement.nullable) {
ctx.nullSafeExec(replacement.nullable, replacementGen.isNull) {
Expand All @@ -392,7 +391,7 @@ case class ArrayJoin(
s"""
|${replacementGen.code}
|$execCode
""".stripMargin
""".stripMargin
case None => genCodeForArrayAndDelimiter(ctx, ev,
(_: String, _: String, _: String) => "// nulls are ignored")
}
Expand All @@ -404,8 +403,8 @@ case class ArrayJoin(
|$code
""".stripMargin)
} else {
ev.copy(s"""
|boolean ${ev.isNull} = false;
ev.copy(
s"""
|UTF8String ${ev.value} = null;
|$code
""".stripMargin, FalseLiteral)
Expand Down