{"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":8,"created_at":"2016-07-01T03:11:31Z","updated_at":"2016-07-01T17:07:47Z","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/229999148","html_url":"https://github.com/apache/spark/pull/14007#issuecomment-229999148","issue_url":"https://api.github.com/repos/apache/spark/issues/14007","id":229999148,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T17:07:46Z","updated_at":"2016-07-01T17:07:46Z","body":"Merged build finished. Test FAILed."}}
{"actor":{"display_login":"AmplabJenkins"}}