{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26808","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26808/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26808/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26808/events","html_url":"https://github.com/cockroachdb/cockroach/pull/26808","id":333418884,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NjM1OTQ0","number":26808,"title":"opt: extract redundant subclauses in OR expressions","user":{"login":"rytaft","id":3288732,"node_id":"MDQ6VXNlcjMyODg3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/3288732?v=4","gravatar_id":"","url":"https://api.github.com/users/rytaft","html_url":"https://github.com/rytaft","followers_url":"https://api.github.com/users/rytaft/followers","following_url":"https://api.github.com/users/rytaft/following{/other_user}","gists_url":"https://api.github.com/users/rytaft/gists{/gist_id}","starred_url":"https://api.github.com/users/rytaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rytaft/subscriptions","organizations_url":"https://api.github.com/users/rytaft/orgs","repos_url":"https://api.github.com/users/rytaft/repos","events_url":"https://api.github.com/users/rytaft/events{/privacy}","received_events_url":"https://api.github.com/users/rytaft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-18T20:16:33Z","updated_at":"2018-06-18T20:16:39Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/26808","html_url":"https://github.com/cockroachdb/cockroach/pull/26808","diff_url":"https://github.com/cockroachdb/cockroach/pull/26808.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/26808.patch"},"body":"This commit adds two rules to transform OR expressions.\r\n\r\nOne rule extracts redundant subclauses from the list of OR conditions, and\r\nreplaces the OR with an AND of the subclause and the remaining OR expression\r\n(a logically equivalent expression). For example:\r\n  `(A AND B) OR (A AND C)`  =>  `A AND (B OR C)`\r\n\r\nThe other rule handles the case where extracting a redundant subclause from one\r\nof the OR conditions would result in an empty condition. In this case, the\r\nentire OR expression can be replaced with the subclause itself. For example:\r\n  `A OR (A AND B)`  =>  `A`\r\n\r\nThese transformations are useful for finding a conjunct that can be pushed\r\ndown in the query tree. For example, if the redundant subclause is fully bound\r\nby one side of a join, it can be pushed through the join, even if the other\r\nconjuncts cannot.\r\n\r\nRelease note: None"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/398181410","html_url":"https://github.com/cockroachdb/cockroach/pull/26808#issuecomment-398181410","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26808","id":398181410,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODE4MTQxMA==","user":{"login":"cockroach-teamcity","id":20559710,"node_id":"MDQ6VXNlcjIwNTU5NzEw","avatar_url":"https://avatars0.githubusercontent.com/u/20559710?v=4","gravatar_id":"","url":"https://api.github.com/users/cockroach-teamcity","html_url":"https://github.com/cockroach-teamcity","followers_url":"https://api.github.com/users/cockroach-teamcity/followers","following_url":"https://api.github.com/users/cockroach-teamcity/following{/other_user}","gists_url":"https://api.github.com/users/cockroach-teamcity/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroach-teamcity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroach-teamcity/subscriptions","organizations_url":"https://api.github.com/users/cockroach-teamcity/orgs","repos_url":"https://api.github.com/users/cockroach-teamcity/repos","events_url":"https://api.github.com/users/cockroach-teamcity/events{/privacy}","received_events_url":"https://api.github.com/users/cockroach-teamcity/received_events","type":"User","site_admin":false},"created_at":"2018-06-18T20:16:39Z","updated_at":"2018-06-18T20:16:39Z","author_association":"MEMBER","body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.png\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/26808)\n<!-- Reviewable:end -->\n"}}
{"actor":{"display_login":"cockroach-teamcity"}}