{"action":"created","issue":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/981","repository_url":"https://api.github.com/repos/greenplum-db/gpdb","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/981/labels{/name}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/981/comments","events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/981/events","html_url":"https://github.com/greenplum-db/gpdb/pull/981","id":166931646,"number":981,"title":"Fix deparsing of group by columns in EXPLAIN of Agg node when Append is the outer child","user":{"login":"foyzur","id":1253020,"avatar_url":"https://avatars.githubusercontent.com/u/1253020?v=3","gravatar_id":"","url":"https://api.github.com/users/foyzur","html_url":"https://github.com/foyzur","followers_url":"https://api.github.com/users/foyzur/followers","following_url":"https://api.github.com/users/foyzur/following{/other_user}","gists_url":"https://api.github.com/users/foyzur/gists{/gist_id}","starred_url":"https://api.github.com/users/foyzur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foyzur/subscriptions","organizations_url":"https://api.github.com/users/foyzur/orgs","repos_url":"https://api.github.com/users/foyzur/repos","events_url":"https://api.github.com/users/foyzur/events{/privacy}","received_events_url":"https://api.github.com/users/foyzur/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-21T22:23:40Z","updated_at":"2016-07-27T01:30:05Z","closed_at":"2016-07-27T01:30:04Z","pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/981","html_url":"https://github.com/greenplum-db/gpdb/pull/981","diff_url":"https://github.com/greenplum-db/gpdb/pull/981.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/981.patch"},"body":"If Agg has an Append as the outer child, group by cannot resolve the variable names of\r\nthe group by expression. This is because of incorrect assumption that it can take outerPlan\r\nof any child to access the outer child of its child, which is not true for Append. For\r\nAppend we keep a list of children and lefttee and righttree are set to NULL.\r\n\r\nThis breaks bfv_partition test suite when optimizer is enabled. For repro:\r\n\r\n```\r\ndrop table if exists t;\r\ndrop table if exists p1;\r\ndrop table if exists p2;\r\n-- end_ignore\r\n\r\ncreate table p1 (a int, b int) partition by range(b) (start (1) end(100) every (20));\r\ncreate table p2 (a int, b int) partition by range(b) (start (1) end(100) every (20));\r\ncreate table t(a int, b int);\r\n\r\ninsert into t select g, g*10 from generate_series(1,100) g;\r\ninsert into p1 select g, g%99 +1 from generate_series(1,10000) g;\r\ninsert into p2 select g, g%99 +1 from generate_series(1,10000) g;\r\n\r\nanalyze t;\r\nanalyze p1;\r\nanalyze p2;\r\n\r\nexplain select * from (select * from p1 union select * from p2) as p_all, t where p_all.b=t.b;\r\n```\r\n\r\nThis commit fixes this by considering Append as special child and properly extracting the first\r\nsubplan under Append as its outer child."},"comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments/235455684","html_url":"https://github.com/greenplum-db/gpdb/pull/981#issuecomment-235455684","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/981","id":235455684,"user":{"login":"foyzur","id":1253020,"avatar_url":"https://avatars.githubusercontent.com/u/1253020?v=3","gravatar_id":"","url":"https://api.github.com/users/foyzur","html_url":"https://github.com/foyzur","followers_url":"https://api.github.com/users/foyzur/followers","following_url":"https://api.github.com/users/foyzur/following{/other_user}","gists_url":"https://api.github.com/users/foyzur/gists{/gist_id}","starred_url":"https://api.github.com/users/foyzur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foyzur/subscriptions","organizations_url":"https://api.github.com/users/foyzur/orgs","repos_url":"https://api.github.com/users/foyzur/repos","events_url":"https://api.github.com/users/foyzur/events{/privacy}","received_events_url":"https://api.github.com/users/foyzur/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T01:30:04Z","updated_at":"2016-07-27T01:30:04Z","body":"Pushed to master: f82644f731cdc5ef96fa9d3beaab2dad0b055960"}}
{"actor":{"display_login":"foyzur"}}