{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/27967","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/27967/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/27967/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/27967/events","html_url":"https://github.com/cockroachdb/cockroach/pull/27967","id":344993650,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MjU3Njgz","number":27967,"title":"opt: replace AnyNotNull with ConstAgg and ConstNotNullAgg","user":{"login":"RaduBerinde","id":16544120,"node_id":"MDQ6VXNlcjE2NTQ0MTIw","avatar_url":"https://avatars1.githubusercontent.com/u/16544120?v=4","gravatar_id":"","url":"https://api.github.com/users/RaduBerinde","html_url":"https://github.com/RaduBerinde","followers_url":"https://api.github.com/users/RaduBerinde/followers","following_url":"https://api.github.com/users/RaduBerinde/following{/other_user}","gists_url":"https://api.github.com/users/RaduBerinde/gists{/gist_id}","starred_url":"https://api.github.com/users/RaduBerinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaduBerinde/subscriptions","organizations_url":"https://api.github.com/users/RaduBerinde/orgs","repos_url":"https://api.github.com/users/RaduBerinde/repos","events_url":"https://api.github.com/users/RaduBerinde/events{/privacy}","received_events_url":"https://api.github.com/users/RaduBerinde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-26T20:28:27Z","updated_at":"2018-07-27T13:52:52Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/27967","html_url":"https://github.com/cockroachdb/cockroach/pull/27967","diff_url":"https://github.com/cockroachdb/cockroach/pull/27967.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/27967.patch"},"body":"This change replaces the `AnyNotNull` internal aggregate function with\r\n`ConstAgg` and `ConstNotNullAgg`, which have stricter requirements on\r\ntheir input:\r\n - `ConstAgg` is only used when it is known that all rows in a\r\n   group have the same value.\r\n - `ConstNotNullAgg` is used when all rows in a group have the same\r\n   value, except some rows which have a NULL value (this is useful for\r\n   decorrelation).\r\n\r\nThis simplifies the groupby null rejection logic which can now rely on\r\nthese semantics instead of having to look at FDs. It will also be\r\nuseful for removing redundant columns for `DistinctOn`, where the\r\nsemantics of `AnyNotNull` are not appropriate.\r\n\r\nNote that the execution layer still uses the `any_not_null` function,\r\nwhich can be used to execute both `ConstAgg` and `ConstNotNullAgg`.\r\n\r\nRelease note: None"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/408425168","html_url":"https://github.com/cockroachdb/cockroach/pull/27967#issuecomment-408425168","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/27967","id":408425168,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODQyNTE2OA==","user":{"login":"craig[bot]","id":37807150,"node_id":"MDM6Qm90Mzc4MDcxNTA=","avatar_url":"https://avatars0.githubusercontent.com/in/10419?v=4","gravatar_id":"","url":"https://api.github.com/users/craig%5Bbot%5D","html_url":"https://github.com/apps/craig","followers_url":"https://api.github.com/users/craig%5Bbot%5D/followers","following_url":"https://api.github.com/users/craig%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/craig%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/craig%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/craig%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/craig%5Bbot%5D/repos","events_url":"https://api.github.com/users/craig%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/craig%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-07-27T13:52:52Z","updated_at":"2018-07-27T13:52:52Z","author_association":"NONE","body":"# Build succeeded\n  * [GitHub CI (Cockroach)](https://teamcity.cockroachdb.com/viewLog.html?buildId=800616&buildTypeId=Cockroach_UnitTests)"}}
{"actor":{"display_login":"craig"}}