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

    https://github.com/apache/spark/pull/16233#discussion_r94202769
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ---
    @@ -658,6 +719,21 @@ class Analyzer(
               Generate(newG.asInstanceOf[Generator], join, outer, qualifier, 
output, child)
             }
     
    +      // A special case for View, replace the output attributes with the 
attributes that have the
    +      // same names from the child. If the corresponding attribute is not 
found, throw an
    +      // AnalysisException.
    +      // On the resolution of the view, the output attributes are 
generated from the view schema,
    +      // and the view query is resolved later. After the view query has 
been resolved, we should
    +      // map the output of the logical plan to the output of the view, 
here we simply replace the
    +      // output attributes of the view with the attributes that have the 
same names from the child.
    +      // TODO: Also check the dataTypes and nullabilites of the output.
    +      case v @ View(_, output, child) if child.isDefined =>
    --- End diff --
    
    The same here. `case v @ View(_, output, Some(child))`


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