Github user adrian-wang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6775#discussion_r32702637
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
 ---
    @@ -313,3 +312,78 @@ case class StringLength(child: Expression) extends 
UnaryExpression with ExpectsI
         defineCodeGen(ctx, ev, c => s"($c).length()")
       }
     }
    +
    +/**
    + * Like Concat below, but with custom separator SEP.
    + */
    +case class ConcatWS(children: Expression*) extends Expression {
    +  // return type is always String
    +  override def dataType: DataType = StringType
    +  override def nullable: Boolean = sep.nullable
    +  override def foldable: Boolean = children.forall(_.foldable)
    +  override def toString: String = s"""CONCAT_WS($children)"""
    +  private def sep = children.head
    +  private def exprs = children.tail
    +
    +  override def checkInputDataTypes(): TypeCheckResult = {
    +    def supportedType(dt: DataType): Boolean = dt match {
    +      case ArrayType(StringType, _) => true
    --- End diff --
    
    Yes, hive supports more than what's in the doc...


---
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]

Reply via email to