{"action":"created","issue":{"url":"https://api.github.com/repos/pingcap/tidb/issues/1514","repository_url":"https://api.github.com/repos/pingcap/tidb","labels_url":"https://api.github.com/repos/pingcap/tidb/issues/1514/labels{/name}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/1514/comments","events_url":"https://api.github.com/repos/pingcap/tidb/issues/1514/events","html_url":"https://github.com/pingcap/tidb/pull/1514","id":168032904,"number":1514,"title":"[DNM] parser: rewrite lex","user":{"login":"tiancaiamao","id":1420062,"avatar_url":"https://avatars.githubusercontent.com/u/1420062?v=3","gravatar_id":"","url":"https://api.github.com/users/tiancaiamao","html_url":"https://github.com/tiancaiamao","followers_url":"https://api.github.com/users/tiancaiamao/followers","following_url":"https://api.github.com/users/tiancaiamao/following{/other_user}","gists_url":"https://api.github.com/users/tiancaiamao/gists{/gist_id}","starred_url":"https://api.github.com/users/tiancaiamao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiancaiamao/subscriptions","organizations_url":"https://api.github.com/users/tiancaiamao/orgs","repos_url":"https://api.github.com/users/tiancaiamao/repos","events_url":"https://api.github.com/users/tiancaiamao/events{/privacy}","received_events_url":"https://api.github.com/users/tiancaiamao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-28T07:41:30Z","updated_at":"2016-08-01T15:27:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/1514","html_url":"https://github.com/pingcap/tidb/pull/1514","diff_url":"https://github.com/pingcap/tidb/pull/1514.diff","patch_url":"https://github.com/pingcap/tidb/pull/1514.patch"},"body":"there is a basic new lexer now, See also https://github.com/pingcap/tidb/issues/1490\r\nit can pass all tests in scanner_test.go and scan the most basic SQL statements.\r\nbut it still can't pass all tests in parser_test.go.\r\n\r\nhere is a benchmark run BenchmarkParse using the old lexer vs new lexer:\r\n```\r\nBenchmarkParse-4\t   30000\t     49745 ns/op\t    5872 B/op\t     117 allocs/op\r\nBenchmarkParse-4\t   30000\t     44896 ns/op\t    5672 B/op\t     149 allocs/op\r\n```\r\n\r\nit's slightly faster,  that's a good beginning. \r\n\r\nthe following work would be seperate test for lexer, make it (near) zero-alloc;\r\nfullfill the lexer for more complex SQL;\r\nfinally, replace the old one until it's compatible enough.\r\n"},"comment":{"url":"https://api.github.com/repos/pingcap/tidb/issues/comments/236614568","html_url":"https://github.com/pingcap/tidb/pull/1514#issuecomment-236614568","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/1514","id":236614568,"user":{"login":"shenli","id":1192573,"avatar_url":"https://avatars.githubusercontent.com/u/1192573?v=3","gravatar_id":"","url":"https://api.github.com/users/shenli","html_url":"https://github.com/shenli","followers_url":"https://api.github.com/users/shenli/followers","following_url":"https://api.github.com/users/shenli/following{/other_user}","gists_url":"https://api.github.com/users/shenli/gists{/gist_id}","starred_url":"https://api.github.com/users/shenli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shenli/subscriptions","organizations_url":"https://api.github.com/users/shenli/orgs","repos_url":"https://api.github.com/users/shenli/repos","events_url":"https://api.github.com/users/shenli/events{/privacy}","received_events_url":"https://api.github.com/users/shenli/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T15:27:30Z","updated_at":"2016-08-01T15:27:30Z","body":"Great! So can we drop the old parser? @tiancaiamao "}}
{"actor":{"display_login":"shenli"}}