{"action":"created","comment":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/comments/203743390","pull_request_review_id":138692392,"id":203743390,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzc0MzM5MA==","diff_hunk":"@@ -112,6 +112,26 @@ func checkPartitionNameUnique(tbInfo *model.TableInfo, pi *model.PartitionInfo)\n \treturn nil\n }\n \n+func checkPartitionFuncValid(expr ast.ExprNode) error {\n+\tswitch v := expr.(type) {\n+\tcase *ast.CaseExpr:","path":"ddl/partition.go","position":6,"original_position":6,"commit_id":"c7f6ffb1d0c648890064d2fadad3c3280cb94ee1","original_commit_id":"c7f6ffb1d0c648890064d2fadad3c3280cb94ee1","user":{"login":"ciscoxll","id":20379978,"node_id":"MDQ6VXNlcjIwMzc5OTc4","avatar_url":"https://avatars0.githubusercontent.com/u/20379978?v=4","gravatar_id":"","url":"https://api.github.com/users/ciscoxll","html_url":"https://github.com/ciscoxll","followers_url":"https://api.github.com/users/ciscoxll/followers","following_url":"https://api.github.com/users/ciscoxll/following{/other_user}","gists_url":"https://api.github.com/users/ciscoxll/gists{/gist_id}","starred_url":"https://api.github.com/users/ciscoxll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciscoxll/subscriptions","organizations_url":"https://api.github.com/users/ciscoxll/orgs","repos_url":"https://api.github.com/users/ciscoxll/repos","events_url":"https://api.github.com/users/ciscoxll/events{/privacy}","received_events_url":"https://api.github.com/users/ciscoxll/received_events","type":"User","site_admin":false},"body":"The expression with ` + - * ` arithmetic can inside.","created_at":"2018-07-19T14:16:18Z","updated_at":"2018-07-19T14:16:26Z","html_url":"https://github.com/pingcap/tidb/pull/7111#discussion_r203743390","pull_request_url":"https://api.github.com/repos/pingcap/tidb/pulls/7111","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/comments/203743390"},"html":{"href":"https://github.com/pingcap/tidb/pull/7111#discussion_r203743390"},"pull_request":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/7111"}}},"pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/7111","id":202554016,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNTU0MDE2","html_url":"https://github.com/pingcap/tidb/pull/7111","diff_url":"https://github.com/pingcap/tidb/pull/7111.diff","patch_url":"https://github.com/pingcap/tidb/pull/7111.patch","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/7111","number":7111,"state":"open","locked":false,"title":"ddl: add partion function check when create partion table","user":{"login":"crazycs520","id":26020263,"node_id":"MDQ6VXNlcjI2MDIwMjYz","avatar_url":"https://avatars2.githubusercontent.com/u/26020263?v=4","gravatar_id":"","url":"https://api.github.com/users/crazycs520","html_url":"https://github.com/crazycs520","followers_url":"https://api.github.com/users/crazycs520/followers","following_url":"https://api.github.com/users/crazycs520/following{/other_user}","gists_url":"https://api.github.com/users/crazycs520/gists{/gist_id}","starred_url":"https://api.github.com/users/crazycs520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazycs520/subscriptions","organizations_url":"https://api.github.com/users/crazycs520/orgs","repos_url":"https://api.github.com/users/crazycs520/repos","events_url":"https://api.github.com/users/crazycs520/events{/privacy}","received_events_url":"https://api.github.com/users/crazycs520/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you for contributing to TiDB! Please read TiDB's [CONTRIBUTING](https://github.com/pingcap/tidb/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.\r\n-->\r\n\r\n## What have you changed? (mandatory)\r\n* check partition function valid when create partition table.\r\nFix issue[#7058](https://github.com/pingcap/tidb/issues/7058)\r\n\r\nMySQL Partitioning Limitations Relating to Functions:\r\nhttps://dev.mysql.com/doc/mysql-partitioning-excerpt/5.5/en/partitioning-limitations-functions.html\r\n\r\n## What is the type of the changes? (mandatory)\r\n\r\n- Bug fix (non-breaking change which fixes an issue)\r\n\r\n## How has this PR been tested? (mandatory)\r\n\r\nUnit test\r\n\r\n## Does this PR affect documentation (docs/docs-cn) update? (mandatory)\r\n\r\nNo\r\n## Does this PR affect tidb-ansible update? (mandatory)\r\n\r\nNo\r\n\r\n## Does this PR need to be added to the release notes? (mandatory)\r\nNo\r\n<!--\r\nIf this PR needs to be added to the release notes, please:\r\n1. add the \"**release-note**\" label for this PR\r\n2. write your release note in the below block\r\n3. if the PR requires additional action from users switching to the new\r\n   release, describe the concrete action that users need to take in detail.\r\n\r\nAn example:\r\n```\r\nrelease note:\r\n// put your release notes for this PR here.\r\n\r\naction required:\r\n// put your required action in detail here.\r\n```\r\n-->\r\n\r\n\r\n## Refer to a related PR or issue link (optional)\r\n\r\n## Benchmark result if necessary (optional)\r\n\r\n## Add a few positive/negative examples (optional)\r\n\r\n","created_at":"2018-07-19T13:09:56Z","updated_at":"2018-07-19T14:16:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"897d382fc57aaf0c357d0e92c2ee0974ef99b5fa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":745133021,"node_id":"MDU6TGFiZWw3NDUxMzMwMjE=","url":"https://api.github.com/repos/pingcap/tidb/labels/component/DDL-need-LGT3","name":"component/DDL-need-LGT3","color":"00bff4","default":false},{"id":564574080,"node_id":"MDU6TGFiZWw1NjQ1NzQwODA=","url":"https://api.github.com/repos/pingcap/tidb/labels/status/LGT1","name":"status/LGT1","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/tidb/pulls/7111/commits","review_comments_url":"https://api.github.com/repos/pingcap/tidb/pulls/7111/comments","review_comment_url":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/7111/comments","statuses_url":"https://api.github.com/repos/pingcap/tidb/statuses/c7f6ffb1d0c648890064d2fadad3c3280cb94ee1","head":{"label":"crazycs520:add_partition_func_check","ref":"add_partition_func_check","sha":"c7f6ffb1d0c648890064d2fadad3c3280cb94ee1","user":{"login":"crazycs520","id":26020263,"node_id":"MDQ6VXNlcjI2MDIwMjYz","avatar_url":"https://avatars2.githubusercontent.com/u/26020263?v=4","gravatar_id":"","url":"https://api.github.com/users/crazycs520","html_url":"https://github.com/crazycs520","followers_url":"https://api.github.com/users/crazycs520/followers","following_url":"https://api.github.com/users/crazycs520/following{/other_user}","gists_url":"https://api.github.com/users/crazycs520/gists{/gist_id}","starred_url":"https://api.github.com/users/crazycs520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazycs520/subscriptions","organizations_url":"https://api.github.com/users/crazycs520/orgs","repos_url":"https://api.github.com/users/crazycs520/repos","events_url":"https://api.github.com/users/crazycs520/events{/privacy}","received_events_url":"https://api.github.com/users/crazycs520/received_events","type":"User","site_admin":false},"repo":{"id":136926865,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY5MjY4NjU=","name":"tidb","full_name":"crazycs520/tidb","owner":{"login":"crazycs520","id":26020263,"node_id":"MDQ6VXNlcjI2MDIwMjYz","avatar_url":"https://avatars2.githubusercontent.com/u/26020263?v=4","gravatar_id":"","url":"https://api.github.com/users/crazycs520","html_url":"https://github.com/crazycs520","followers_url":"https://api.github.com/users/crazycs520/followers","following_url":"https://api.github.com/users/crazycs520/following{/other_user}","gists_url":"https://api.github.com/users/crazycs520/gists{/gist_id}","starred_url":"https://api.github.com/users/crazycs520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazycs520/subscriptions","organizations_url":"https://api.github.com/users/crazycs520/orgs","repos_url":"https://api.github.com/users/crazycs520/repos","events_url":"https://api.github.com/users/crazycs520/events{/privacy}","received_events_url":"https://api.github.com/users/crazycs520/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/crazycs520/tidb","description":"TiDB is a distributed HTAP database compatible with the MySQL protocol ","fork":true,"url":"https://api.github.com/repos/crazycs520/tidb","forks_url":"https://api.github.com/repos/crazycs520/tidb/forks","keys_url":"https://api.github.com/repos/crazycs520/tidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crazycs520/tidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crazycs520/tidb/teams","hooks_url":"https://api.github.com/repos/crazycs520/tidb/hooks","issue_events_url":"https://api.github.com/repos/crazycs520/tidb/issues/events{/number}","events_url":"https://api.github.com/repos/crazycs520/tidb/events","assignees_url":"https://api.github.com/repos/crazycs520/tidb/assignees{/user}","branches_url":"https://api.github.com/repos/crazycs520/tidb/branches{/branch}","tags_url":"https://api.github.com/repos/crazycs520/tidb/tags","blobs_url":"https://api.github.com/repos/crazycs520/tidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crazycs520/tidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crazycs520/tidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/crazycs520/tidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crazycs520/tidb/statuses/{sha}","languages_url":"https://api.github.com/repos/crazycs520/tidb/languages","stargazers_url":"https://api.github.com/repos/crazycs520/tidb/stargazers","contributors_url":"https://api.github.com/repos/crazycs520/tidb/contributors","subscribers_url":"https://api.github.com/repos/crazycs520/tidb/subscribers","subscription_url":"https://api.github.com/repos/crazycs520/tidb/subscription","commits_url":"https://api.github.com/repos/crazycs520/tidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/crazycs520/tidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/crazycs520/tidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/crazycs520/tidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/crazycs520/tidb/contents/{+path}","compare_url":"https://api.github.com/repos/crazycs520/tidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crazycs520/tidb/merges","archive_url":"https://api.github.com/repos/crazycs520/tidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crazycs520/tidb/downloads","issues_url":"https://api.github.com/repos/crazycs520/tidb/issues{/number}","pulls_url":"https://api.github.com/repos/crazycs520/tidb/pulls{/number}","milestones_url":"https://api.github.com/repos/crazycs520/tidb/milestones{/number}","notifications_url":"https://api.github.com/repos/crazycs520/tidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crazycs520/tidb/labels{/name}","releases_url":"https://api.github.com/repos/crazycs520/tidb/releases{/id}","deployments_url":"https://api.github.com/repos/crazycs520/tidb/deployments","created_at":"2018-06-11T13:00:28Z","updated_at":"2018-06-11T13:00:33Z","pushed_at":"2018-07-19T13:02:08Z","git_url":"git://github.com/crazycs520/tidb.git","ssh_url":"git@github.com:crazycs520/tidb.git","clone_url":"https://github.com/crazycs520/tidb.git","svn_url":"https://github.com/crazycs520/tidb","homepage":"https://pingcap.com","size":51854,"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":"90c721ad72f44ff5849e131d813509d1dedbe035","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":41986369,"node_id":"MDEwOlJlcG9zaXRvcnk0MTk4NjM2OQ==","name":"tidb","full_name":"pingcap/tidb","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},"private":false,"html_url":"https://github.com/pingcap/tidb","description":"TiDB is a distributed HTAP database compatible with the MySQL protocol ","fork":false,"url":"https://api.github.com/repos/pingcap/tidb","forks_url":"https://api.github.com/repos/pingcap/tidb/forks","keys_url":"https://api.github.com/repos/pingcap/tidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/tidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/tidb/teams","hooks_url":"https://api.github.com/repos/pingcap/tidb/hooks","issue_events_url":"https://api.github.com/repos/pingcap/tidb/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/tidb/events","assignees_url":"https://api.github.com/repos/pingcap/tidb/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/tidb/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/tidb/tags","blobs_url":"https://api.github.com/repos/pingcap/tidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/tidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/tidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/tidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/tidb/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/tidb/languages","stargazers_url":"https://api.github.com/repos/pingcap/tidb/stargazers","contributors_url":"https://api.github.com/repos/pingcap/tidb/contributors","subscribers_url":"https://api.github.com/repos/pingcap/tidb/subscribers","subscription_url":"https://api.github.com/repos/pingcap/tidb/subscription","commits_url":"https://api.github.com/repos/pingcap/tidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/tidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/tidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/tidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/tidb/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/tidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/tidb/merges","archive_url":"https://api.github.com/repos/pingcap/tidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/tidb/downloads","issues_url":"https://api.github.com/repos/pingcap/tidb/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/tidb/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/tidb/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/tidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/tidb/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/tidb/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/tidb/deployments","created_at":"2015-09-06T04:01:52Z","updated_at":"2018-07-19T10:53:25Z","pushed_at":"2018-07-19T13:59:59Z","git_url":"git://github.com/pingcap/tidb.git","ssh_url":"git@github.com:pingcap/tidb.git","clone_url":"https://github.com/pingcap/tidb.git","svn_url":"https://github.com/pingcap/tidb","homepage":"https://pingcap.com","size":77186,"stargazers_count":14082,"watchers_count":14082,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1924,"mirror_url":null,"archived":false,"open_issues_count":467,"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":1924,"open_issues":467,"watchers":14082,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/7111"},"html":{"href":"https://github.com/pingcap/tidb/pull/7111"},"issue":{"href":"https://api.github.com/repos/pingcap/tidb/issues/7111"},"comments":{"href":"https://api.github.com/repos/pingcap/tidb/issues/7111/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/7111/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/7111/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/tidb/statuses/c7f6ffb1d0c648890064d2fadad3c3280cb94ee1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ciscoxll"}}