[SPARK-26057][SQL] Transform also analyzed plans when dedup references#23035
Closed
mgaido91 wants to merge 4 commits into
Closed
[SPARK-26057][SQL] Transform also analyzed plans when dedup references#23035mgaido91 wants to merge 4 commits into
mgaido91 wants to merge 4 commits into
Conversation
Contributor
Author
|
Test build #98829 has finished for PR 23035 at commit
|
cloud-fan
reviewed
Nov 15, 2018
| } | ||
|
|
||
| test("SPARK-26057: attribute deduplication on already analyzed plans") { | ||
| withTempView("cc", "p", "c") { |
Contributor
There was a problem hiding this comment.
if we don't care about naming, how about a, b, c instead of cc, p, c?
cloud-fan
reviewed
Nov 15, 2018
| | WHERE c.id = cc.id AND c.layout = cc.layout AND c.ts > p.ts) | ||
| |GROUP BY cc.id, cc.layout | ||
| """.stripMargin).createOrReplaceTempView("pcc") | ||
| val res = spark.sql( |
Contributor
There was a problem hiding this comment.
good catch on the problem! Do you think it's possible to simplify the test? I think we just need a temp view with subquery, and use it in a join.
Contributor
Author
There was a problem hiding this comment.
yes, I simplified as much as I was able to. I hope now it is fine. Thanks.
|
Test build #98861 has finished for PR 23035 at commit
|
Contributor
|
thanks, merging to master/2.4! |
asfgit
pushed a commit
that referenced
this pull request
Nov 15, 2018
## What changes were proposed in this pull request? In SPARK-24865 `AnalysisBarrier` was removed and in order to improve resolution speed, the `analyzed` flag was (re-)introduced in order to process only plans which are not yet analyzed. This should not be the case when performing attribute deduplication as in that case we need to transform also the plans which were already analyzed, otherwise we can miss to rewrite some attributes leading to invalid plans. ## How was this patch tested? added UT Please review http://spark.apache.org/contributing.html before opening a pull request. Closes #23035 from mgaido91/SPARK-26057. Authored-by: Marco Gaido <marcogaido91@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit b46f75a) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
jackylee-ch
pushed a commit
to jackylee-ch/spark
that referenced
this pull request
Feb 18, 2019
## What changes were proposed in this pull request? In SPARK-24865 `AnalysisBarrier` was removed and in order to improve resolution speed, the `analyzed` flag was (re-)introduced in order to process only plans which are not yet analyzed. This should not be the case when performing attribute deduplication as in that case we need to transform also the plans which were already analyzed, otherwise we can miss to rewrite some attributes leading to invalid plans. ## How was this patch tested? added UT Please review http://spark.apache.org/contributing.html before opening a pull request. Closes apache#23035 from mgaido91/SPARK-26057. Authored-by: Marco Gaido <marcogaido91@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
kai-chi
pushed a commit
to kai-chi/spark
that referenced
this pull request
Jul 23, 2019
In SPARK-24865 `AnalysisBarrier` was removed and in order to improve resolution speed, the `analyzed` flag was (re-)introduced in order to process only plans which are not yet analyzed. This should not be the case when performing attribute deduplication as in that case we need to transform also the plans which were already analyzed, otherwise we can miss to rewrite some attributes leading to invalid plans. added UT Please review http://spark.apache.org/contributing.html before opening a pull request. Closes apache#23035 from mgaido91/SPARK-26057. Authored-by: Marco Gaido <marcogaido91@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit b46f75a) Signed-off-by: Wenchen Fan <wenchen@databricks.com> Conflicts: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
kai-chi
pushed a commit
to kai-chi/spark
that referenced
this pull request
Aug 1, 2019
## What changes were proposed in this pull request? In SPARK-24865 `AnalysisBarrier` was removed and in order to improve resolution speed, the `analyzed` flag was (re-)introduced in order to process only plans which are not yet analyzed. This should not be the case when performing attribute deduplication as in that case we need to transform also the plans which were already analyzed, otherwise we can miss to rewrite some attributes leading to invalid plans. ## How was this patch tested? added UT Please review http://spark.apache.org/contributing.html before opening a pull request. Closes apache#23035 from mgaido91/SPARK-26057. Authored-by: Marco Gaido <marcogaido91@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit b46f75a) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
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.
What changes were proposed in this pull request?
In SPARK-24865
AnalysisBarrierwas removed and in order to improve resolution speed, theanalyzedflag was (re-)introduced in order to process only plans which are not yet analyzed. This should not be the case when performing attribute deduplication as in that case we need to transform also the plans which were already analyzed, otherwise we can miss to rewrite some attributes leading to invalid plans.How was this patch tested?
added UT
Please review http://spark.apache.org/contributing.html before opening a pull request.