{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/14007","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/14007/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/14007/comments","events_url":"https://api.github.com/repos/apache/spark/issues/14007/events","html_url":"https://github.com/apache/spark/pull/14007","id":163311012,"number":14007,"title":"[SPARK-16329] [SQL] Star Expansion over Table Containing No Column ","user":{"login":"gatorsmile","id":11567269,"avatar_url":"https://avatars.githubusercontent.com/u/11567269?v=3","gravatar_id":"","url":"https://api.github.com/users/gatorsmile","html_url":"https://github.com/gatorsmile","followers_url":"https://api.github.com/users/gatorsmile/followers","following_url":"https://api.github.com/users/gatorsmile/following{/other_user}","gists_url":"https://api.github.com/users/gatorsmile/gists{/gist_id}","starred_url":"https://api.github.com/users/gatorsmile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gatorsmile/subscriptions","organizations_url":"https://api.github.com/users/gatorsmile/orgs","repos_url":"https://api.github.com/users/gatorsmile/repos","events_url":"https://api.github.com/users/gatorsmile/events{/privacy}","received_events_url":"https://api.github.com/users/gatorsmile/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-01T03:11:31Z","updated_at":"2016-07-01T06:16:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14007","html_url":"https://github.com/apache/spark/pull/14007","diff_url":"https://github.com/apache/spark/pull/14007.diff","patch_url":"https://github.com/apache/spark/pull/14007.patch"},"body":"#### What changes were proposed in this pull request?\r\nStar expansion over a table containing zero column does not work since 1.6. However, it works in Spark 1.5.1. This PR is to fix the issue in the master branch.\r\n\r\nFor example, \r\n```scala\r\nval rddNoCols = sqlContext.sparkContext.parallelize(1 to 10).map(_ => Row.empty)\r\nval dfNoCols = sqlContext.createDataFrame(rddNoCols, StructType(Seq.empty))\r\ndfNoCols.registerTempTable(\"temp_table_no_cols\")\r\nsqlContext.sql(\"select * from temp_table_no_cols\").show\r\n```\r\n\r\nWithout the fix, users will get the following the exception:\r\n```\r\njava.lang.IllegalArgumentException: requirement failed\r\n        at scala.Predef$.require(Predef.scala:221)\r\n        at org.apache.spark.sql.catalyst.analysis.UnresolvedStar.expand(unresolved.scala:199)\r\n```\r\n\r\n#### How was this patch tested?\r\nTests are added"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/229862857","html_url":"https://github.com/apache/spark/pull/14007#issuecomment-229862857","issue_url":"https://api.github.com/repos/apache/spark/issues/14007","id":229862857,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T06:16:26Z","updated_at":"2016-07-01T06:16:26Z","body":"**[Test build #61595 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61595/consoleFull)** for PR 14007 at commit [`e386226`](https://github.com/apache/spark/commit/e3862262eaea9bef9be7283d1e7dcb105e8fa136).\n * This patch passes all tests.\n * This patch merges cleanly.\n * This patch adds no public classes."}}
{"actor":{"display_login":"SparkQA"}}