{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/28905","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/28905/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/28905/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/28905/events","html_url":"https://github.com/cockroachdb/cockroach/pull/28905","id":352626271,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5ODkwOTYw","number":28905,"title":"opt: remove some unnecessary projections","user":{"login":"justinj","id":409075,"node_id":"MDQ6VXNlcjQwOTA3NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/409075?v=4","gravatar_id":"","url":"https://api.github.com/users/justinj","html_url":"https://github.com/justinj","followers_url":"https://api.github.com/users/justinj/followers","following_url":"https://api.github.com/users/justinj/following{/other_user}","gists_url":"https://api.github.com/users/justinj/gists{/gist_id}","starred_url":"https://api.github.com/users/justinj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinj/subscriptions","organizations_url":"https://api.github.com/users/justinj/orgs","repos_url":"https://api.github.com/users/justinj/repos","events_url":"https://api.github.com/users/justinj/events{/privacy}","received_events_url":"https://api.github.com/users/justinj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-21T16:51:24Z","updated_at":"2018-08-23T16:51:00Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/28905","html_url":"https://github.com/cockroachdb/cockroach/pull/28905","diff_url":"https://github.com/cockroachdb/cockroach/pull/28905.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/28905.patch"},"body":"In some cases, we would generate a projection despite actually having a\r\npassthrough column. This would occur when we had an expression which\r\nitself was not explicitly a passthrough projection, but would normalize\r\nto one (such as `SELECT x + 0 FROM a`).\r\n\r\nThis commit modifies the optbuilder to hit the passthrough codepath when\r\nwe end up normalizing to a variable expr. I'm not sure if there's a\r\nbetter way - this breaks the rule that @andy-kimball gave me once of not\r\ninspecting what you've built, but this seems ok to me as it's\r\nsemantically equivalent and effectively an optimization.\r\n\r\nThis can't be a normalization rule on Projections because by\r\nnormalization-time we've already constructed the new column ids for the\r\nprojection, so it's too late by then to do a passthrough.\r\n\r\nRelease note: None"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/415488683","html_url":"https://github.com/cockroachdb/cockroach/pull/28905#issuecomment-415488683","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/28905","id":415488683,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTQ4ODY4Mw==","user":{"login":"andy-kimball","id":32096062,"node_id":"MDQ6VXNlcjMyMDk2MDYy","avatar_url":"https://avatars0.githubusercontent.com/u/32096062?v=4","gravatar_id":"","url":"https://api.github.com/users/andy-kimball","html_url":"https://github.com/andy-kimball","followers_url":"https://api.github.com/users/andy-kimball/followers","following_url":"https://api.github.com/users/andy-kimball/following{/other_user}","gists_url":"https://api.github.com/users/andy-kimball/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-kimball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-kimball/subscriptions","organizations_url":"https://api.github.com/users/andy-kimball/orgs","repos_url":"https://api.github.com/users/andy-kimball/repos","events_url":"https://api.github.com/users/andy-kimball/events{/privacy}","received_events_url":"https://api.github.com/users/andy-kimball/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T16:51:00Z","updated_at":"2018-08-23T16:51:00Z","author_association":"CONTRIBUTOR","body":"I see, you're right about that. Let me think on it more."}}
{"actor":{"display_login":"andy-kimball"}}