Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/18968
  
    We could. resolveSubquery will do at least one time analysis to resolve the
    subquery. It might be a waste for already resolved subquery.
    
    Let me try if I can remove the case with little changes.
    
    
    On Aug 24, 2017 2:10 PM, "Dilip Biswal" <notificati...@github.com> wrote:
    
    *@dilipbiswal* commented on this pull request.
    ------------------------------
    
    In sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/an
    alysis/Analyzer.scala
    <https://github.com/apache/spark/pull/18968#discussion_r134933318>:
    
    > @@ -1286,8 +1286,16 @@ class Analyzer(
               resolveSubQuery(s, plans)(ScalarSubquery(_, _, exprId))
             case e @ Exists(sub, _, exprId) if !sub.resolved =>
               resolveSubQuery(e, plans)(Exists(_, _, exprId))
    -        case In(value, Seq(l @ ListQuery(sub, _, exprId))) if
    value.resolved && !sub.resolved =>
    -          val expr = resolveSubQuery(l, plans)(ListQuery(_, _, exprId))
    +        case In(value, Seq(l @ ListQuery(sub, _, exprId, _))) if
    value.resolved && !sub.resolved =>
    
    @viirya <https://github.com/viirya> If we modified to
    
    case In(value, Seq(l @ ListQuery(sub, _, exprId, _))) if
    value.resolved && !l.resolved
    
    would we still require the following case statement ? The following case
    looks a little
    strange as we are in the resolveSubqueries routine and check for
    sub.resolved == true.
    
    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    <https://github.com/apache/spark/pull/18968#pullrequestreview-58283445>,
    or mute
    the thread
    
<https://github.com/notifications/unsubscribe-auth/AAEM9xQlIzMPgV5_BoB_PK8tJCXkzilfks5sbRO8gaJpZM4O5wyz>
    .



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