[SPARK-6376][SQL] Avoid eliminating subqueries until optimization#5160
Closed
marmbrus wants to merge 4 commits into
Closed
[SPARK-6376][SQL] Avoid eliminating subqueries until optimization#5160marmbrus wants to merge 4 commits into
marmbrus wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
nitpick here - can we put an explicit type?
|
Test build #29066 has finished for PR 5160 at commit
|
|
Test build #29071 has finished for PR 5160 at commit
|
Contributor
There was a problem hiding this comment.
Add a comment at here to let others know that the first step in Optimizer is to remove SubQueries (which are helper wrappers for query analysis)?
|
Test build #29100 has finished for PR 5160 at commit
|
Contributor
|
LGTM |
asfgit
pushed a commit
that referenced
this pull request
Mar 24, 2015
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.
Author: Michael Armbrust <michael@databricks.com>
Closes #5160 from marmbrus/subqueriesInDfs and squashes the following commits:
a9bb262 [Michael Armbrust] Update Optimizer.scala
27d25bf [Michael Armbrust] fix hive tests
9137e03 [Michael Armbrust] add type
81cd597 [Michael Armbrust] Avoid eliminating subqueries until optimization
(cherry picked from commit cbeaf9e)
Signed-off-by: Michael Armbrust <michael@databricks.com>
|
Test build #29104 has finished for PR 5160 at commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
DataFrames this can cause errors for queries such as:As a result, in this PR we defer the elimination of subqueries until the optimization phase.