-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-20311][SQL] Support aliases for table value functions #17928
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 1 commit
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 |
|---|---|---|
|
|
@@ -468,7 +468,18 @@ class PlanParserSuite extends PlanTest { | |
| test("table valued function") { | ||
| assertEqual( | ||
| "select * from range(2)", | ||
| UnresolvedTableValuedFunction("range", Literal(2) :: Nil).select(star())) | ||
| UnresolvedTableValuedFunction("range", Literal(2) :: Nil, Seq.empty).select(star())) | ||
| } | ||
|
|
||
| test("SPARK-20311 range(N) as alias") { | ||
| assertEqual( | ||
| "select * from range(10) AS t", | ||
|
||
| SubqueryAlias("t", UnresolvedTableValuedFunction("range", Literal(10) :: Nil, Seq.empty)) | ||
| .select(star())) | ||
| assertEqual( | ||
| "select * from range(7) AS t(a)", | ||
| SubqueryAlias("t", UnresolvedTableValuedFunction("range", Literal(7) :: Nil, "a" :: Nil)) | ||
| .select(star())) | ||
| } | ||
|
|
||
| test("inline table") { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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 also hits another bug in inline tables. Maybe you also can include the following query in the test case
inline-table.sql?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.
Added.