Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/7486#discussion_r34945713
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
---
@@ -27,6 +27,40 @@ import
org.apache.spark.sql.catalyst.expressions.codegen._
import org.apache.spark.sql.types._
import org.apache.spark.unsafe.types.UTF8String
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// This file defines expressions for string operations.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/**
+ * An expression that concatenates multiple input strings into a single
string.
+ * Input expressions that are evaluated to nulls are skipped.
+ *
+ * For example, `concat("a", null, "b")` is evaluated to `"ab"`.
+ */
+case class Concat(children: Seq[Expression]) extends Expression with
ImplicitCastInputTypes {
+
+ override def inputTypes: Seq[AbstractDataType] =
Seq.fill(children.size)(StringType)
+ override def dataType: DataType = StringType
+
+ override def nullable: Boolean = children.exists(_.nullable)
--- End diff --
We never return null, so this should be `false`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]