{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/12134","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/12134/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/12134/comments","events_url":"https://api.github.com/repos/apache/spark/issues/12134/events","html_url":"https://github.com/apache/spark/pull/12134","id":145434629,"number":12134,"title":"[SPARK-14349] [SQL] Issue Error Messages for Unsupported Operators/DML/DDL in SQL Context.","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,"milestone":null,"comments":17,"created_at":"2016-04-03T00:16:05Z","updated_at":"2016-04-04T16:12:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/12134","html_url":"https://github.com/apache/spark/pull/12134","diff_url":"https://github.com/apache/spark/pull/12134.diff","patch_url":"https://github.com/apache/spark/pull/12134.patch"},"body":"#### What changes were proposed in this pull request?\r\n\r\nCurrently, the weird error messages are issued if we use Hive Context-only operations in SQL Context. \r\n\r\nFor example, \r\n- When calling `Drop Table` in SQL Context, we got the following message:\r\n```\r\nExpected exception org.apache.spark.sql.catalyst.parser.ParseException to be thrown, but java.lang.ClassCastException was thrown.\r\n```\r\n\r\n- When calling `Script Transform` in SQL Context, we got the message:\r\n```\r\nassertion failed: No plan for ScriptTransformation [key#9,value#10], cat, [tKey#155,tValue#156], null\r\n+- LogicalRDD [key#9,value#10], MapPartitionsRDD[3] at beforeAll at BeforeAndAfterAll.scala:187\r\n```\r\n\r\nUpdates:\r\nBased on the investigation from @hvanhovell , the root cause is `visitChildren`, which is the default implementation. It always returns the result of the last defined context child. After merging the code changes from @hvanhovell , it works! Thank you @hvanhovell !\r\n\r\n#### How was this patch tested?\r\nA few test cases are added. \r\n\r\nNot sure if the same issue exist for the other operators/DDL/DML. @hvanhovell "},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/205371253","html_url":"https://github.com/apache/spark/pull/12134#issuecomment-205371253","issue_url":"https://api.github.com/repos/apache/spark/issues/12134","id":205371253,"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-04-04T16:12:37Z","updated_at":"2016-04-04T16:12:37Z","body":"**[Test build #54852 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54852/consoleFull)** for PR 12134 at commit [`c618a78`](https://github.com/apache/spark/commit/c618a78c249e7bf5f4160220feff2ba6a2390132).\n * This patch **fails Spark unit tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}