{"action":"created","comment":{"url":"https://api.github.com/repos/pingcap/parser/pulls/comments/241384184","pull_request_review_id":184640737,"id":241384184,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTM4NDE4NA==","diff_hunk":"@@ -1812,6 +1812,20 @@ func (s *testParserSuite) TestDDL(c *C) {\n \ts.RunTest(c, table)\n }\n \n+func (s *testParserSuite) TestHintError(c *C) {\n+\tparser := New()\n+\tstmt, err := parser.Parse(\"select /*+ tidb_unknow(T1,t2) */ c1, c2 from t1, t2 where t1.c1 = t2.c1\", \"\", \"\")\n+\tc.Assert(err, IsNil)\n+\tc.Assert(len(stmt[0].(*ast.SelectStmt).TableHints), Equals, 0)\n+\tstmt, err = parser.Parse(\"select /*+ tidb_unknow(T1,t2, 1) TIDB_INLJ(t1, T2) */ c1, c2 from t1, t2 where t1.c1 = t2.c1\", \"\", \"\")\n+\tc.Assert(len(stmt[0].(*ast.SelectStmt).TableHints), Equals, 0)\n+\tc.Assert(err, IsNil)\n+\tstmt, err = parser.Parse(\"select1 /*+ TIDB_INLJ(t1, T2) */ c1, c2 from t1, t2 where t1.c1 = t2.c1\", \"\", \"\")","path":"parser_test.go","position":12,"original_position":12,"commit_id":"37d75752f8c71b44248ca39a591fb5094a07636a","original_commit_id":"37d75752f8c71b44248ca39a591fb5094a07636a","user":{"login":"jackysp","id":4352397,"node_id":"MDQ6VXNlcjQzNTIzOTc=","avatar_url":"https://avatars1.githubusercontent.com/u/4352397?v=4","gravatar_id":"","url":"https://api.github.com/users/jackysp","html_url":"https://github.com/jackysp","followers_url":"https://api.github.com/users/jackysp/followers","following_url":"https://api.github.com/users/jackysp/following{/other_user}","gists_url":"https://api.github.com/users/jackysp/gists{/gist_id}","starred_url":"https://api.github.com/users/jackysp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackysp/subscriptions","organizations_url":"https://api.github.com/users/jackysp/orgs","repos_url":"https://api.github.com/users/jackysp/repos","events_url":"https://api.github.com/users/jackysp/events{/privacy}","received_events_url":"https://api.github.com/users/jackysp/received_events","type":"User","site_admin":false},"body":"select1 -> select","created_at":"2018-12-13T12:39:20Z","updated_at":"2018-12-13T12:39:20Z","html_url":"https://github.com/pingcap/parser/pull/80#discussion_r241384184","pull_request_url":"https://api.github.com/repos/pingcap/parser/pulls/80","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/pingcap/parser/pulls/comments/241384184"},"html":{"href":"https://github.com/pingcap/parser/pull/80#discussion_r241384184"},"pull_request":{"href":"https://api.github.com/repos/pingcap/parser/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/pingcap/parser/pulls/80","id":238367364,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MzY3MzY0","html_url":"https://github.com/pingcap/parser/pull/80","diff_url":"https://github.com/pingcap/parser/pull/80.diff","patch_url":"https://github.com/pingcap/parser/pull/80.patch","issue_url":"https://api.github.com/repos/pingcap/parser/issues/80","number":80,"state":"open","locked":false,"title":"ignore hint when meet unknow token in hint","user":{"login":"lysu","id":528332,"node_id":"MDQ6VXNlcjUyODMzMg==","avatar_url":"https://avatars3.githubusercontent.com/u/528332?v=4","gravatar_id":"","url":"https://api.github.com/users/lysu","html_url":"https://github.com/lysu","followers_url":"https://api.github.com/users/lysu/followers","following_url":"https://api.github.com/users/lysu/following{/other_user}","gists_url":"https://api.github.com/users/lysu/gists{/gist_id}","starred_url":"https://api.github.com/users/lysu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lysu/subscriptions","organizations_url":"https://api.github.com/users/lysu/orgs","repos_url":"https://api.github.com/users/lysu/repos","events_url":"https://api.github.com/users/lysu/events{/privacy}","received_events_url":"https://api.github.com/users/lysu/received_events","type":"User","site_admin":false},"body":"Current, when we meet unknow hint token whole sql will be failure.\r\n\r\nThis PR will ignore whole hint when meet unknow hint to compatible to SQL that generate by tool and target to other database.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/pingcap/parser/80)\n<!-- Reviewable:end -->\n","created_at":"2018-12-13T12:11:51Z","updated_at":"2018-12-13T12:39:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8cac85f6cc6fcaef4d62fefe5ddf3e20fd7e14c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tiancaiamao","id":1420062,"node_id":"MDQ6VXNlcjE0MjAwNjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1420062?v=4","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},{"login":"zz-jason","id":5268763,"node_id":"MDQ6VXNlcjUyNjg3NjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5268763?v=4","gravatar_id":"","url":"https://api.github.com/users/zz-jason","html_url":"https://github.com/zz-jason","followers_url":"https://api.github.com/users/zz-jason/followers","following_url":"https://api.github.com/users/zz-jason/following{/other_user}","gists_url":"https://api.github.com/users/zz-jason/gists{/gist_id}","starred_url":"https://api.github.com/users/zz-jason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zz-jason/subscriptions","organizations_url":"https://api.github.com/users/zz-jason/orgs","repos_url":"https://api.github.com/users/zz-jason/repos","events_url":"https://api.github.com/users/zz-jason/events{/privacy}","received_events_url":"https://api.github.com/users/zz-jason/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/parser/pulls/80/commits","review_comments_url":"https://api.github.com/repos/pingcap/parser/pulls/80/comments","review_comment_url":"https://api.github.com/repos/pingcap/parser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/parser/issues/80/comments","statuses_url":"https://api.github.com/repos/pingcap/parser/statuses/37d75752f8c71b44248ca39a591fb5094a07636a","head":{"label":"lysu:fix-hint-sql-error","ref":"fix-hint-sql-error","sha":"37d75752f8c71b44248ca39a591fb5094a07636a","user":{"login":"lysu","id":528332,"node_id":"MDQ6VXNlcjUyODMzMg==","avatar_url":"https://avatars3.githubusercontent.com/u/528332?v=4","gravatar_id":"","url":"https://api.github.com/users/lysu","html_url":"https://github.com/lysu","followers_url":"https://api.github.com/users/lysu/followers","following_url":"https://api.github.com/users/lysu/following{/other_user}","gists_url":"https://api.github.com/users/lysu/gists{/gist_id}","starred_url":"https://api.github.com/users/lysu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lysu/subscriptions","organizations_url":"https://api.github.com/users/lysu/orgs","repos_url":"https://api.github.com/users/lysu/repos","events_url":"https://api.github.com/users/lysu/events{/privacy}","received_events_url":"https://api.github.com/users/lysu/received_events","type":"User","site_admin":false},"repo":{"id":156366444,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYzNjY0NDQ=","name":"parser","full_name":"lysu/parser","private":false,"owner":{"login":"lysu","id":528332,"node_id":"MDQ6VXNlcjUyODMzMg==","avatar_url":"https://avatars3.githubusercontent.com/u/528332?v=4","gravatar_id":"","url":"https://api.github.com/users/lysu","html_url":"https://github.com/lysu","followers_url":"https://api.github.com/users/lysu/followers","following_url":"https://api.github.com/users/lysu/following{/other_user}","gists_url":"https://api.github.com/users/lysu/gists{/gist_id}","starred_url":"https://api.github.com/users/lysu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lysu/subscriptions","organizations_url":"https://api.github.com/users/lysu/orgs","repos_url":"https://api.github.com/users/lysu/repos","events_url":"https://api.github.com/users/lysu/events{/privacy}","received_events_url":"https://api.github.com/users/lysu/received_events","type":"User","site_admin":false},"html_url":"https://github.com/lysu/parser","description":"TiDB SQL Parser","fork":true,"url":"https://api.github.com/repos/lysu/parser","forks_url":"https://api.github.com/repos/lysu/parser/forks","keys_url":"https://api.github.com/repos/lysu/parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lysu/parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lysu/parser/teams","hooks_url":"https://api.github.com/repos/lysu/parser/hooks","issue_events_url":"https://api.github.com/repos/lysu/parser/issues/events{/number}","events_url":"https://api.github.com/repos/lysu/parser/events","assignees_url":"https://api.github.com/repos/lysu/parser/assignees{/user}","branches_url":"https://api.github.com/repos/lysu/parser/branches{/branch}","tags_url":"https://api.github.com/repos/lysu/parser/tags","blobs_url":"https://api.github.com/repos/lysu/parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lysu/parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lysu/parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/lysu/parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lysu/parser/statuses/{sha}","languages_url":"https://api.github.com/repos/lysu/parser/languages","stargazers_url":"https://api.github.com/repos/lysu/parser/stargazers","contributors_url":"https://api.github.com/repos/lysu/parser/contributors","subscribers_url":"https://api.github.com/repos/lysu/parser/subscribers","subscription_url":"https://api.github.com/repos/lysu/parser/subscription","commits_url":"https://api.github.com/repos/lysu/parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/lysu/parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/lysu/parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/lysu/parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/lysu/parser/contents/{+path}","compare_url":"https://api.github.com/repos/lysu/parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lysu/parser/merges","archive_url":"https://api.github.com/repos/lysu/parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lysu/parser/downloads","issues_url":"https://api.github.com/repos/lysu/parser/issues{/number}","pulls_url":"https://api.github.com/repos/lysu/parser/pulls{/number}","milestones_url":"https://api.github.com/repos/lysu/parser/milestones{/number}","notifications_url":"https://api.github.com/repos/lysu/parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lysu/parser/labels{/name}","releases_url":"https://api.github.com/repos/lysu/parser/releases{/id}","deployments_url":"https://api.github.com/repos/lysu/parser/deployments","created_at":"2018-11-06T10:28:38Z","updated_at":"2018-11-22T09:26:00Z","pushed_at":"2018-12-13T12:07:28Z","git_url":"git://github.com/lysu/parser.git","ssh_url":"git@github.com:lysu/parser.git","clone_url":"https://github.com/lysu/parser.git","svn_url":"https://github.com/lysu/parser","homepage":null,"size":1353,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"f20218bc290343c2752c4926c1bf4264343bbef4","user":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":153882884,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM4ODI4ODQ=","name":"parser","full_name":"pingcap/parser","private":false,"owner":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pingcap/parser","description":"TiDB SQL Parser","fork":false,"url":"https://api.github.com/repos/pingcap/parser","forks_url":"https://api.github.com/repos/pingcap/parser/forks","keys_url":"https://api.github.com/repos/pingcap/parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/parser/teams","hooks_url":"https://api.github.com/repos/pingcap/parser/hooks","issue_events_url":"https://api.github.com/repos/pingcap/parser/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/parser/events","assignees_url":"https://api.github.com/repos/pingcap/parser/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/parser/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/parser/tags","blobs_url":"https://api.github.com/repos/pingcap/parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/parser/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/parser/languages","stargazers_url":"https://api.github.com/repos/pingcap/parser/stargazers","contributors_url":"https://api.github.com/repos/pingcap/parser/contributors","subscribers_url":"https://api.github.com/repos/pingcap/parser/subscribers","subscription_url":"https://api.github.com/repos/pingcap/parser/subscription","commits_url":"https://api.github.com/repos/pingcap/parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/parser/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/parser/merges","archive_url":"https://api.github.com/repos/pingcap/parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/parser/downloads","issues_url":"https://api.github.com/repos/pingcap/parser/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/parser/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/parser/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/parser/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/parser/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/parser/deployments","created_at":"2018-10-20T07:55:25Z","updated_at":"2018-12-13T10:38:10Z","pushed_at":"2018-12-13T12:12:41Z","git_url":"git://github.com/pingcap/parser.git","ssh_url":"git@github.com:pingcap/parser.git","clone_url":"https://github.com/pingcap/parser.git","svn_url":"https://github.com/pingcap/parser","homepage":null,"size":1289,"stargazers_count":112,"watchers_count":112,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":45,"open_issues":15,"watchers":112,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/parser/pulls/80"},"html":{"href":"https://github.com/pingcap/parser/pull/80"},"issue":{"href":"https://api.github.com/repos/pingcap/parser/issues/80"},"comments":{"href":"https://api.github.com/repos/pingcap/parser/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/parser/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/parser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/parser/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/parser/statuses/37d75752f8c71b44248ca39a591fb5094a07636a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jackysp"}}