{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/12125","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/12125/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/12125/comments","events_url":"https://api.github.com/repos/apache/spark/issues/12125/events","html_url":"https://github.com/apache/spark/pull/12125","id":145332268,"number":12125,"title":"[SPARK-14341] [SQL] Throw exception on unsupported create / drop macro ddl","user":{"login":"bomeng","id":295781,"avatar_url":"https://avatars.githubusercontent.com/u/295781?v=3","gravatar_id":"","url":"https://api.github.com/users/bomeng","html_url":"https://github.com/bomeng","followers_url":"https://api.github.com/users/bomeng/followers","following_url":"https://api.github.com/users/bomeng/following{/other_user}","gists_url":"https://api.github.com/users/bomeng/gists{/gist_id}","starred_url":"https://api.github.com/users/bomeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bomeng/subscriptions","organizations_url":"https://api.github.com/users/bomeng/orgs","repos_url":"https://api.github.com/users/bomeng/repos","events_url":"https://api.github.com/users/bomeng/events{/privacy}","received_events_url":"https://api.github.com/users/bomeng/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-02T03:55:04Z","updated_at":"2016-04-02T12:44:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/12125","html_url":"https://github.com/apache/spark/pull/12125","diff_url":"https://github.com/apache/spark/pull/12125.diff","patch_url":"https://github.com/apache/spark/pull/12125.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nWe throw an AnalysisException that looks like this:\r\n\r\n```\r\nscala> sqlContext.sql(\"CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x))\")\r\norg.apache.spark.sql.catalyst.parser.ParseException:\r\nUnsupported SQL statement\r\n== SQL ==\r\nCREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x))\r\n  at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.nativeCommand(ParseDriver.scala:66)\r\n  at org.apache.spark.sql.catalyst.parser.AbstractSqlParser$$anonfun$parsePlan$1.apply(ParseDriver.scala:56)\r\n  at org.apache.spark.sql.catalyst.parser.AbstractSqlParser$$anonfun$parsePlan$1.apply(ParseDriver.scala:53)\r\n  at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:86)\r\n  at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:53)\r\n  at org.apache.spark.sql.SQLContext.parseSql(SQLContext.scala:198)\r\n  at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:749)\r\n  ... 48 elided\r\n\r\n```\r\n\r\n## How was this patch tested?\r\n\r\nAdd test cases in HiveQuerySuite.scala"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/204708244","html_url":"https://github.com/apache/spark/pull/12125#issuecomment-204708244","issue_url":"https://api.github.com/repos/apache/spark/issues/12125","id":204708244,"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-02T12:44:45Z","updated_at":"2016-04-02T12:44:45Z","body":"**[Test build #54772 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54772/consoleFull)** for PR 12125 at commit [`401f59e`](https://github.com/apache/spark/commit/401f59e9ddac7670091c1f2d0cb46ac332444200).\n * This patch **fails Spark unit tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}