{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/57280163","id":57280163,"diff_hunk":"@@ -129,7 +129,7 @@ class SqlLexical extends StdLexical {\n   override def identChar: Parser[Elem] = letter | elem('_')\n \n   private lazy val scientificNotation: Parser[String] =\n-    (elem('e') | elem('E')) ~> (elem('+') | elem('-')).? ~ rep1(digit) ^^ {\n+    (elem('e') | elem('E')) ~> (elem('+') | elem('-')).? ~ rep1(digit) <~ not(rep1(identChar)) ^^ {","path":"sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/AbstractSparkSQLParser.scala","position":5,"original_position":5,"commit_id":"81287d31648b229bd3e617ef9ebce985fb54dca0","original_commit_id":"81287d31648b229bd3e617ef9ebce985fb54dca0","user":{"login":"hvanhovell","id":9616802,"avatar_url":"https://avatars.githubusercontent.com/u/9616802?v=3","gravatar_id":"","url":"https://api.github.com/users/hvanhovell","html_url":"https://github.com/hvanhovell","followers_url":"https://api.github.com/users/hvanhovell/followers","following_url":"https://api.github.com/users/hvanhovell/following{/other_user}","gists_url":"https://api.github.com/users/hvanhovell/gists{/gist_id}","starred_url":"https://api.github.com/users/hvanhovell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvanhovell/subscriptions","organizations_url":"https://api.github.com/users/hvanhovell/orgs","repos_url":"https://api.github.com/users/hvanhovell/repos","events_url":"https://api.github.com/users/hvanhovell/events{/privacy}","received_events_url":"https://api.github.com/users/hvanhovell/received_events","type":"User","site_admin":false},"body":"The `SqlLexical` is still used in the `DataTypeParser`. About 50% of this class is redundant.","created_at":"2016-03-24T06:56:01Z","updated_at":"2016-03-24T06:56:01Z","html_url":"https://github.com/apache/spark/pull/11929#discussion_r57280163","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/11929","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/57280163"},"html":{"href":"https://github.com/apache/spark/pull/11929#discussion_r57280163"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/11929"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/11929","id":63991583,"html_url":"https://github.com/apache/spark/pull/11929","diff_url":"https://github.com/apache/spark/pull/11929.diff","patch_url":"https://github.com/apache/spark/pull/11929.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/11929","number":11929,"state":"open","locked":false,"title":"[SPARK-13934][SQL] fixed table identifier","user":{"login":"wangyang1992","id":10561966,"avatar_url":"https://avatars.githubusercontent.com/u/10561966?v=3","gravatar_id":"","url":"https://api.github.com/users/wangyang1992","html_url":"https://github.com/wangyang1992","followers_url":"https://api.github.com/users/wangyang1992/followers","following_url":"https://api.github.com/users/wangyang1992/following{/other_user}","gists_url":"https://api.github.com/users/wangyang1992/gists{/gist_id}","starred_url":"https://api.github.com/users/wangyang1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangyang1992/subscriptions","organizations_url":"https://api.github.com/users/wangyang1992/orgs","repos_url":"https://api.github.com/users/wangyang1992/repos","events_url":"https://api.github.com/users/wangyang1992/events{/privacy}","received_events_url":"https://api.github.com/users/wangyang1992/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\nTable identifier that starts in a form of scientific notation (like 1e34) will throw an exception.\r\nval tableName = \"1e34abcd\"\r\nhc.sql(\"select 123\").registerTempTable(tableName)\r\nhc.dropTempTable(tableName)\r\nThe last line will throw a RuntimeException.(java.lang.RuntimeException: [1.1] failure: identifier expected)\r\n\r\nFix this by changing the scientific notation parser. If a scientific notation is followed by one or more identifier char, then don't see it as a valid token.\r\n\r\n## How was this patch tested?\r\n\r\nUnit test is added.\r\n\r\n\r\n","created_at":"2016-03-24T05:26:07Z","updated_at":"2016-03-24T06:56:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"220a6ffcaa07baa274525728825bd2721749cbf9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/11929/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/11929/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/11929/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/81287d31648b229bd3e617ef9ebce985fb54dca0","head":{"label":"wangyang1992:branch-1.6","ref":"branch-1.6","sha":"81287d31648b229bd3e617ef9ebce985fb54dca0","user":{"login":"wangyang1992","id":10561966,"avatar_url":"https://avatars.githubusercontent.com/u/10561966?v=3","gravatar_id":"","url":"https://api.github.com/users/wangyang1992","html_url":"https://github.com/wangyang1992","followers_url":"https://api.github.com/users/wangyang1992/followers","following_url":"https://api.github.com/users/wangyang1992/following{/other_user}","gists_url":"https://api.github.com/users/wangyang1992/gists{/gist_id}","starred_url":"https://api.github.com/users/wangyang1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangyang1992/subscriptions","organizations_url":"https://api.github.com/users/wangyang1992/orgs","repos_url":"https://api.github.com/users/wangyang1992/repos","events_url":"https://api.github.com/users/wangyang1992/events{/privacy}","received_events_url":"https://api.github.com/users/wangyang1992/received_events","type":"User","site_admin":false},"repo":{"id":47666092,"name":"spark","full_name":"wangyang1992/spark","owner":{"login":"wangyang1992","id":10561966,"avatar_url":"https://avatars.githubusercontent.com/u/10561966?v=3","gravatar_id":"","url":"https://api.github.com/users/wangyang1992","html_url":"https://github.com/wangyang1992","followers_url":"https://api.github.com/users/wangyang1992/followers","following_url":"https://api.github.com/users/wangyang1992/following{/other_user}","gists_url":"https://api.github.com/users/wangyang1992/gists{/gist_id}","starred_url":"https://api.github.com/users/wangyang1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangyang1992/subscriptions","organizations_url":"https://api.github.com/users/wangyang1992/orgs","repos_url":"https://api.github.com/users/wangyang1992/repos","events_url":"https://api.github.com/users/wangyang1992/events{/privacy}","received_events_url":"https://api.github.com/users/wangyang1992/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wangyang1992/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/wangyang1992/spark","forks_url":"https://api.github.com/repos/wangyang1992/spark/forks","keys_url":"https://api.github.com/repos/wangyang1992/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wangyang1992/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wangyang1992/spark/teams","hooks_url":"https://api.github.com/repos/wangyang1992/spark/hooks","issue_events_url":"https://api.github.com/repos/wangyang1992/spark/issues/events{/number}","events_url":"https://api.github.com/repos/wangyang1992/spark/events","assignees_url":"https://api.github.com/repos/wangyang1992/spark/assignees{/user}","branches_url":"https://api.github.com/repos/wangyang1992/spark/branches{/branch}","tags_url":"https://api.github.com/repos/wangyang1992/spark/tags","blobs_url":"https://api.github.com/repos/wangyang1992/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wangyang1992/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wangyang1992/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/wangyang1992/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wangyang1992/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/wangyang1992/spark/languages","stargazers_url":"https://api.github.com/repos/wangyang1992/spark/stargazers","contributors_url":"https://api.github.com/repos/wangyang1992/spark/contributors","subscribers_url":"https://api.github.com/repos/wangyang1992/spark/subscribers","subscription_url":"https://api.github.com/repos/wangyang1992/spark/subscription","commits_url":"https://api.github.com/repos/wangyang1992/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/wangyang1992/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/wangyang1992/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/wangyang1992/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/wangyang1992/spark/contents/{+path}","compare_url":"https://api.github.com/repos/wangyang1992/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wangyang1992/spark/merges","archive_url":"https://api.github.com/repos/wangyang1992/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wangyang1992/spark/downloads","issues_url":"https://api.github.com/repos/wangyang1992/spark/issues{/number}","pulls_url":"https://api.github.com/repos/wangyang1992/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/wangyang1992/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/wangyang1992/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wangyang1992/spark/labels{/name}","releases_url":"https://api.github.com/repos/wangyang1992/spark/releases{/id}","deployments_url":"https://api.github.com/repos/wangyang1992/spark/deployments","created_at":"2015-12-09T03:26:03Z","updated_at":"2016-01-29T04:31:30Z","pushed_at":"2016-03-24T05:18:10Z","git_url":"git://github.com/wangyang1992/spark.git","ssh_url":"git@github.com:wangyang1992/spark.git","clone_url":"https://github.com/wangyang1992/spark.git","svn_url":"https://github.com/wangyang1992/spark","homepage":null,"size":150814,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:branch-1.6","ref":"branch-1.6","sha":"b75f970948d94d12505f0414e22e4688229b90af","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2016-03-24T05:54:15Z","pushed_at":"2016-03-24T06:54:03Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":445292,"stargazers_count":7899,"watchers_count":7899,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7279,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":415,"forks":7279,"open_issues":415,"watchers":7899,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/11929"},"html":{"href":"https://github.com/apache/spark/pull/11929"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/11929"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/11929/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/11929/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/11929/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/81287d31648b229bd3e617ef9ebce985fb54dca0"}}}}