Uh oh!
There was an error while loading. Please reload this page.
[SPARK-12395] [SQL] fix resulting columns of outer join - #10353
Closed
davies wants to merge 1 commit into
Closed
Conversation
davies
commented
Dec 17, 2015
ContributorAuthor
Contributor
There was a problem hiding this comment.
Nit: Here we can use an AttributeSet for convenience:
valjoinRefs=AttributeSet(condition.toSeq.flatMap(_.references))
valresultCols= joinedCols ++ joined.output.filterNot(joinRefs.contains)ContributorAuthor
There was a problem hiding this comment.
Maybe not, as the comment said, we can't compare Attribute here
Contributor
There was a problem hiding this comment.
Yes, but that is exactly what an AttributeSet is for. It is a set that only compares the id.
ContributorAuthor
There was a problem hiding this comment.
@liancheng@marmbrus Oh, I see, missed that, thanks!
liancheng
commented
Dec 17, 2015
Contributor
LGTM except for one minor issue. |
SparkQA
commented
Dec 17, 2015
Test build #47914 has finished for PR 10353 at commit
|
yhuai
commented
Dec 17, 2015
Contributor
Does 1.5 have this problem? |
davies
commented
Dec 17, 2015
ContributorAuthor
@yhuai No, this is a new feature in 1.6 |
asfgit pushed a commit
that referenced
this pull request
Dec 17, 2015
For API DataFrame.join(right, usingColumns, joinType), if the joinType is right_outer or full_outer, the resulting join columns could be wrong (will be null). The order of columns had been changed to match that with MySQL and PostgreSQL [1]. This PR also fix the nullability of output for outer join. [1] http://www.postgresql.org/docs/9.2/static/queries-table-expressions.html Author: Davies Liu <davies@databricks.com> Closes#10353 from davies/fix_join. (cherry picked from commit a170d34) Signed-off-by: Davies Liu <davies.liu@gmail.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 freeto 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.
For API DataFrame.join(right, usingColumns, joinType), if the joinType is right_outer or full_outer, the resulting join columns could be wrong (will be null).
The order of columns had been changed to match that with MySQL and PostgreSQL [1].
This PR also fix the nullability of output for outer join.
[1] http://www.postgresql.org/docs/9.2/static/queries-table-expressions.html