GitHub user marmbrus opened a pull request:
https://github.com/apache/spark/pull/5160
[SPARK-6376][SQL] Avoid eliminating subqueries until optimization
Previously it was okay to throw away subqueries after analysis, as we would
never try to use that tree for resolution again. However, with eager analysis
in `DataFrame`s this can cause errors for queries such as:
```scala
val df = Seq(1,2,3).map(i => (i, i.toString)).toDF("int", "str")
df.as('x).join(df.as('y), $"x.str" === $"y.str").groupBy("x.str").count()
```
As a result, in this PR we defer the elimination of subqueries until the
optimization phase.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/marmbrus/spark subqueriesInDfs
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/5160.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5160
----
commit 81cd5977adc9a44236a700878eb2c49081709df8
Author: Michael Armbrust <[email protected]>
Date: 2015-03-24T07:57:29Z
Avoid eliminating subqueries until optimization
----
---
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]