Github user maropu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22364#discussion_r216199910
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/AttributeSet.scala
 ---
    @@ -39,10 +41,15 @@ object AttributeSet {
     
       /** Constructs a new [[AttributeSet]] given a sequence of [[Expression 
Expressions]]. */
       def apply(baseSet: Iterable[Expression]): AttributeSet = {
    -    new AttributeSet(
    -      baseSet
    -        .flatMap(_.references)
    -        .map(new AttributeEquals(_)).toSet)
    --- End diff --
    
    hi, good catch. one question here; is it bad to just simply write `new 
AttributeSet(baseSet.map(_.references.baseSet).foldLeft(Set.empty[AttributeEquals])(_
 ++ _)))`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to