{"action":"created","issue":{"url":"https://api.github.com/repos/pingcap/tidb/issues/7869","repository_url":"https://api.github.com/repos/pingcap/tidb","labels_url":"https://api.github.com/repos/pingcap/tidb/issues/7869/labels{/name}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/7869/comments","events_url":"https://api.github.com/repos/pingcap/tidb/issues/7869/events","html_url":"https://github.com/pingcap/tidb/pull/7869","id":368937155,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxOTk1MDU0","number":7869,"title":"planner: support the transformation framework of the cascades planner","user":{"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},"labels":[{"id":667671533,"node_id":"MDU6TGFiZWw2Njc2NzE1MzM=","url":"https://api.github.com/repos/pingcap/tidb/labels/component/planner","name":"component/planner","color":"1d76db","default":false},{"id":564600738,"node_id":"MDU6TGFiZWw1NjQ2MDA3Mzg=","url":"https://api.github.com/repos/pingcap/tidb/labels/status/LGT2","name":"status/LGT2","color":"5319e7","default":false},{"id":770872605,"node_id":"MDU6TGFiZWw3NzA4NzI2MDU=","url":"https://api.github.com/repos/pingcap/tidb/labels/status/all%20tests%20passed","name":"status/all tests passed","color":"2cbe4e","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-10-11T03:23:51Z","updated_at":"2018-10-26T08:02:33Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/7869","html_url":"https://github.com/pingcap/tidb/pull/7869","diff_url":"https://github.com/pingcap/tidb/pull/7869.diff","patch_url":"https://github.com/pingcap/tidb/pull/7869.patch"},"body":"### What problem does this PR solve? <!--add issue link with summary if exists-->\r\n\r\nsupport framework of the cascades planner.\r\n\r\n### What is changed and how it works?\r\n\r\n~- introduce a global session variable \"tidb_enable_cascades_planner\" to control whether to use the cascades planner.~  split to https://github.com/pingcap/tidb/pull/7879 \r\n~- modify the `Optimize()` function to share some common code logic between the old planner and cascades planner.~  split to https://github.com/pingcap/tidb/pull/7879 \r\n~- implement the `Group` and `GroupExpr` component.~ split to https://github.com/pingcap/tidb/pull/7917\r\n\r\n- implement the `FindBestPlan()` function \r\n- implement the `convert2Group()` function to convert a logical plan to `Group`\r\n- implement the `onPhaseExploration()` function, which applies all the possible rules and transforms the expression to its equivalents.\r\n- implement the `ExprIter` to extract and iterate all the group expressions which match the rule pattern\r\n- modify the `GetOperand()` function to only return the operand.\r\n\r\n### Check List <!--REMOVE the items that are not applicable-->\r\n\r\nTests <!-- At least one of them must be included. -->\r\n\r\n - Unit test **will be added later**\r\n\r\nCode changes\r\n\r\n - Has exported function/method change\r\n"},"comment":{"url":"https://api.github.com/repos/pingcap/tidb/issues/comments/433322984","html_url":"https://github.com/pingcap/tidb/pull/7869#issuecomment-433322984","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/7869","id":433322984,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzMyMjk4NA==","user":{"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},"created_at":"2018-10-26T08:02:33Z","updated_at":"2018-10-26T08:02:33Z","author_association":"MEMBER","body":"@winoros PTAL"}}
{"actor":{"display_login":"zz-jason"}}