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

    https://github.com/apache/spark/pull/22318#discussion_r214817510
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ---
    @@ -754,11 +754,16 @@ class Analyzer(
        * a logical plan node's children.
        */
       object ResolveReferences extends Rule[LogicalPlan] {
    +
    +    private val emptyAttrMap = new AttributeMap[Attribute](Map.empty)
    --- End diff --
    
    I'd prefer to do [what I suggested 
previously](https://github.com/apache/spark/pull/22318#discussion_r214678100) 
as it would be easier to reuse if it will be needed. In this way, next time we 
need again an empty AttributeMap we need to create a new one and we'd end up 
with several of them.
    
    cc @cloud-fan @maropu WDYT?


---

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

Reply via email to