{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/12191","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/12191/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/12191/comments","events_url":"https://api.github.com/repos/apache/spark/issues/12191/events","html_url":"https://github.com/apache/spark/pull/12191","id":146150871,"number":12191,"title":"[SPARK-14398] [SQL] Audit non-reserved keyword list in ANTLR4 parser","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":18,"created_at":"2016-04-06T00:40:58Z","updated_at":"2016-04-18T19:35:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/12191","html_url":"https://github.com/apache/spark/pull/12191","diff_url":"https://github.com/apache/spark/pull/12191.diff","patch_url":"https://github.com/apache/spark/pull/12191.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nI have compared non-reserved list in Antlr3 and Antlr4 one by one as well as all the existing keywords defined in Antlr4, added the missing keywords to the non-reserved keywords list.  If we need to support more syntax, we can add more keywords by then.\r\n\r\nAny recommendation for the above is welcome. \r\n\r\n## How was this patch tested?\r\n\r\nI manually checked the keywords one by one. Please let me know if there is a better way to test.\r\n\r\nAnother thought: I suggest to put all the keywords definition and non-reserved list in order, that will be much easier to check in the future. "},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/211543283","html_url":"https://github.com/apache/spark/pull/12191#issuecomment-211543283","issue_url":"https://api.github.com/repos/apache/spark/issues/12191","id":211543283,"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},"created_at":"2016-04-18T19:35:40Z","updated_at":"2016-04-18T19:35:40Z","body":"Yes, the reason for sorting the keywords is for ease of searching purpose. \r\nI have checked the generated codes and see the switch/case for each non-reserved words. But to my understanding, case A: case B: ... won't have performance difference as case A | B: ... this should be easily optimized by the compiler. "}}