Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6775#discussion_r32379255
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
 ---
    @@ -315,4 +315,65 @@ case class StringLength(child: Expression) extends 
UnaryExpression with ExpectsI
       }
     }
     
    +/**
    + * Like ConcatWS below, but taking an array of strings.
    + */
    +case class ConcatWS(sep: Expression, child: Expression)
    +  extends Expression with ExpectsInputTypes {
    +  override def dataType: DataType = StringType
    +  override def nullable: Boolean = true
    +  override def foldable: Boolean = child.foldable && sep.foldable
    +  override def children: Seq[Expression] = sep :: child :: Nil
    +  override def expectedChildTypes: Seq[DataType] = StringType :: 
ArrayType(StringType) :: Nil
    --- End diff --
    
    This probably not right, we support both `StringType` and 
`ArrayType(StringType)`, and maybe we'd better not inherit from the trait 
`ExpectsInputTypes`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to