Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21745#discussion_r201900877
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ---
    @@ -1163,7 +1165,8 @@ class Analyzer(
               case p: Project =>
                 val maybeResolvedExprs = exprs.map(resolveExpression(_, p))
                 val (newExprs, newChild) = 
resolveExprsAndAddMissingAttrs(maybeResolvedExprs, p.child)
    -            val missingAttrs = AttributeSet(newExprs) -- 
AttributeSet(maybeResolvedExprs)
    +            // The resolved attributes might not come from `p.child`. Need 
to filter it.
    --- End diff --
    
    how can this happen? if the resolved attributes do not exist in child, then 
the plan is invalid, isn't it?


---

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

Reply via email to