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

    https://github.com/apache/spark/pull/11416#discussion_r54345163
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ---
    @@ -687,7 +687,8 @@ class Analyzer(
             resolved
           } else {
             plan match {
    -          case u: UnaryNode if !u.isInstanceOf[SubqueryAlias] =>
    +          case u: UnaryNode
    --- End diff --
    
    There are 31 `UnaryNode` types. Actually, I did check most of `UnaryNode`. 
    
    `ResolveSortReferences` resolving missing attributes if and only if their 
child nodes have been resolved, as shown below. 
    ```scala
    case s @ Sort(order, _, child) if !s.resolved && child.resolved 
    ```
    
    Thus, most of ineligible `UnaryNode` have been replaced. For example, 
`GroupingSets` and `Pivot` will not be seen in this resolution. Thus, ignoring 
them is fine. Besides `Subquery`, I think `ScriptTransformation`, 
`MapPartitions`, `AppendColumns` and `MapGroups` need to be excluded. 
    
    Or should we use a white list here? 


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