Github user chenghao-intel commented on a diff in the pull request:
https://github.com/apache/spark/pull/6775#discussion_r32400743
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
@@ -914,6 +914,42 @@ object functions {
def ceil(columnName: String): Column = ceil(Column(columnName))
/**
+ * Computes the concat of the given values.
+ *
+ * @group normal_funcs
+ * @since 1.5.0
+ */
+ @scala.annotation.varargs
+ def concat(exprs: Column*): Column = Concat(exprs.map(_.expr): _*)
+
+ /**
+ * Computes the concat of the given column names.
+ *
+ * @group normal_funcs
+ * @since 1.5.0
+ */
+ @scala.annotation.varargs
+ def concat(columnName: String, columnNames: String*): Column =
+ concat((columnName +: columnNames).map(Column.apply): _*)
+
+ /**
+ * Computes the concat_ws of the given columns with given separator.
+ *
+ * @group normal_funcs
+ * @since 1.5.0
+ */
+ @scala.annotation.varargs
+ def concat_ws(sep: Column, exprs: Column*): Column = concat_ws(sep,
array(exprs: _*))
+
+ /**
+ * Computes the concat_ws of the given columns with given separator.
+ *
+ * @group normal_funcs
+ * @since 1.5.0
+ */
+ def concat_ws(sep: Column, exprs: Column): Column = ConcatWS(sep.expr,
exprs.expr)
--- End diff --
I don't think that's necessary, the `ConcatWS` can handle the `array` stuff
internally.
---
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]