You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Fei Wang (JIRA)" <ji...@apache.org> on 2015/04/29 12:18:06 UTC

[jira] [Created] (SPARK-7232) Add a Substitution batch for spark sql analyzer

Fei Wang created SPARK-7232:
-------------------------------

             Summary: Add a Substitution batch for spark sql analyzer
                 Key: SPARK-7232
                 URL: https://issues.apache.org/jira/browse/SPARK-7232
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 1.3.1
            Reporter: Fei Wang


Added a new batch named `Substitution` before Resolution batch. The motivation for this is there are kind of cases we want to do some substitution on the parsed logical plan before resolve it. 
Consider this two cases:
1 CTE, for cte we first build a row logical plan
'With Map(q1 -> 'Subquery q1
                             'Project ['key]
                               'UnresolvedRelation [src], None)
 'Project [*]
  'Filter ('key = 5)
   'UnresolvedRelation [q1], None

In `With` logicalplan here is a map stored the (q1-> subquery), we want first take off the with command and substitute the  q1 of UnresolvedRelation by the subquery

2 Another example is Window function, in window function user may define some windows, we also need substitute the window name of child by the concrete window. this should also done in the Substitution batch.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org