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

    https://github.com/apache/spark/pull/5189#discussion_r27252191
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
 ---
    @@ -196,14 +197,19 @@ abstract class LogicalPlan extends 
QueryPlan[LogicalPlan] with Logging {
     
           // One match, but we also need to extract the requested nested field.
           case Seq((a, nestedFields)) =>
    -        // The foldLeft adds UnresolvedGetField for every remaining parts 
of the name,
    -        // and aliased it with the last part of the name.
    -        // For example, consider name "a.b.c", where "a" is resolved to an 
existing attribute.
    -        // Then this will add UnresolvedGetField("b") and 
UnresolvedGetField("c"), and alias
    -        // the final expression as "c".
    -        val fieldExprs = nestedFields.foldLeft(a: 
Expression)(UnresolvedGetField)
    -        val aliasName = nestedFields.last
    -        Some(Alias(fieldExprs, aliasName)())
    +        try {
    +
    +          // The foldLeft adds UnresolvedGetField for every remaining 
parts of the name,
    +          // and aliased it with the last part of the name.
    +          // For example, consider name "a.b.c", where "a" is resolved to 
an existing attribute.
    +          // Then this will add UnresolvedGetField("b") and 
UnresolvedGetField("c"), and alias
    +          // the final expression as "c".
    --- End diff --
    
    Update comment? Seems we will not add `UnresolvedGetField` any more.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to