Skip to content

Commit 3ae85f7

Browse files
committed
Write null better.
1 parent cdc7be6 commit 3ae85f7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,8 @@ case class ConcatWs(children: Seq[Expression])
110110
}.mkString(", ")
111111

112112
evals.map(_.code).mkString("\n") + s"""
113-
boolean ${ev.isNull} = false;
114113
UTF8String ${ev.primitive} = UTF8String.concatWs($inputs);
115-
if (${ev.primitive} == null) {
116-
${ev.isNull} = true;
117-
}
114+
boolean ${ev.isNull} = ${ev.primitive} == null;
118115
"""
119116
} else {
120117
// Contains a mix of strings and array<string>s. Fall back to interpreted mode for now.

0 commit comments

Comments
 (0)