-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-13427][SQL] Support USING clause in JOIN. #11297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -387,6 +387,7 @@ TOK_SETCONFIG; | |
TOK_DFS; | ||
TOK_ADDFILE; | ||
TOK_ADDJAR; | ||
TOK_USING; | ||
} | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1136,6 +1136,7 @@ object PushPredicateThroughJoin extends Rule[LogicalPlan] with PredicateHelper { | |
reduceLeftOption(And).map(Filter(_, newJoin)).getOrElse(newJoin) | ||
case FullOuter => f // DO Nothing for Full Outer Join | ||
case NaturalJoin(_) => sys.error("Untransformed NaturalJoin node") | ||
case UsingJoin(_, _) => sys.error("Untransformed Using join node") | ||
} | ||
|
||
// push down the join filter into sub query scanning if applicable | ||
|
@@ -1171,6 +1172,7 @@ object PushPredicateThroughJoin extends Rule[LogicalPlan] with PredicateHelper { | |
Join(newLeft, newRight, LeftOuter, newJoinCond) | ||
case FullOuter => f | ||
case NaturalJoin(_) => sys.error("Untransformed NaturalJoin node") | ||
case UsingJoin(_, _) => sys.error("Untransformed Using join node") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: I'm not really sure what the point of these extra checks is. Is it only to remove a warning? All kinds of things break in the optimizer if the plan is unresolved. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JoinType is sealed, so we need to put something in this pattern match |
||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @hvanhovell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good.