{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/4015","labels_url":"https://api.github.com/repos/apache/spark/issues/4015/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/4015/comments","events_url":"https://api.github.com/repos/apache/spark/issues/4015/events","html_url":"https://github.com/apache/spark/pull/4015","id":54162855,"number":4015,"title":"[SPARK-5213] [SQL] Pluggable SQL Parser Support","user":{"login":"chenghao-intel","id":2367031,"avatar_url":"https://avatars.githubusercontent.com/u/2367031?v=3","gravatar_id":"","url":"https://api.github.com/users/chenghao-intel","html_url":"https://github.com/chenghao-intel","followers_url":"https://api.github.com/users/chenghao-intel/followers","following_url":"https://api.github.com/users/chenghao-intel/following{/other_user}","gists_url":"https://api.github.com/users/chenghao-intel/gists{/gist_id}","starred_url":"https://api.github.com/users/chenghao-intel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenghao-intel/subscriptions","organizations_url":"https://api.github.com/users/chenghao-intel/orgs","repos_url":"https://api.github.com/users/chenghao-intel/repos","events_url":"https://api.github.com/users/chenghao-intel/events{/privacy}","received_events_url":"https://api.github.com/users/chenghao-intel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":46,"created_at":"2015-01-13T08:29:09Z","updated_at":"2015-04-08T01:58:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/4015","html_url":"https://github.com/apache/spark/pull/4015","diff_url":"https://github.com/apache/spark/pull/4015.diff","patch_url":"https://github.com/apache/spark/pull/4015.patch"},"body":"This PR aims to make the SQL Parser Pluggable, and user can register it's own parser via Spark SQL CLI.\r\n\r\n```\r\n# add the jar into the classpath\r\n$hcheng@mydesktop:spark>bin/spark-sql --jars sql99.jar\r\n\r\n-- switch to \"hiveql\" dialect\r\n   spark-sql>SET spark.sql.dialect=hiveql;\r\n   spark-sql>SELECT * FROM src LIMIT 1;\r\n\r\n-- switch to \"sql\" dialect\r\n   spark-sql>SET spark.sql.dialect=sql;\r\n   spark-sql>SELECT * FROM src LIMIT 1;\r\n\r\n-- switch to a custom dialect\r\n   spark-sql>SET spark.sql.dialect=com.xxx.xxx.SQL99Dialect;\r\n   spark-sql>SELECT * FROM src LIMIT 1;\r\n\r\n-- register the non-exist SQL dialect\r\n   spark-sql> SET spark.sql.dialect=NotExistedClass;\r\n   spark-sql> SELECT * FROM src LIMIT 1;\r\n-- Exception will be thrown and switch to default sql dialect (\"sql\" for SQLContext and \"hiveql\" for HiveContext)\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/90778506","html_url":"https://github.com/apache/spark/pull/4015#issuecomment-90778506","issue_url":"https://api.github.com/repos/apache/spark/issues/4015","id":90778506,"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":"2015-04-08T01:58:26Z","updated_at":"2015-04-08T01:58:26Z","body":"  [Test build #29824 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/29824/consoleFull) for   PR 4015 at commit [`41805b5`](https://github.com/apache/spark/commit/41805b5569394047ad6a2d212e42d271b9562b9d)."}}