aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorwangfei <wangfei1@huawei.com>2015-05-07 22:55:42 -0700
committerYin Huai <yhuai@databricks.com>2015-05-07 22:55:42 -0700
commitf496bf3c539a873ffdf3aa803847ef7b50135bd7 (patch)
tree0d7b2762e99612dc0371505d40638d5c65bf2cf3 /project
parent714db2ef52c0fe34418e252e5a6f220337022046 (diff)
downloadspark-f496bf3c539a873ffdf3aa803847ef7b50135bd7.tar.gz
spark-f496bf3c539a873ffdf3aa803847ef7b50135bd7.tar.bz2
spark-f496bf3c539a873ffdf3aa803847ef7b50135bd7.zip
[SPARK-7232] [SQL] Add a Substitution batch for spark sql analyzer
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. Author: wangfei <wangfei1@huawei.com> Closes #5776 from scwf/addbatch and squashes the following commits: d4b962f [wangfei] added WindowsSubstitution 70f6932 [wangfei] Merge branch 'master' of https://github.com/apache/spark into addbatch ecaeafb [wangfei] address yhuai's comments 553005a [wangfei] fix test case 0c54798 [wangfei] address comments 29aaaaf [wangfei] fix compile 1c9a092 [wangfei] added Substitution bastch
Diffstat (limited to 'project')
0 files changed, 0 insertions, 0 deletions