{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/presto/issues/4184","labels_url":"https://api.github.com/repos/facebook/presto/issues/4184/labels{/name}","comments_url":"https://api.github.com/repos/facebook/presto/issues/4184/comments","events_url":"https://api.github.com/repos/facebook/presto/issues/4184/events","html_url":"https://github.com/facebook/presto/pull/4184","id":122446892,"number":4184,"title":"Fix PushWriteThroughUnionAll with local union","user":{"login":"raghavsethi","id":715788,"avatar_url":"https://avatars.githubusercontent.com/u/715788?v=3","gravatar_id":"","url":"https://api.github.com/users/raghavsethi","html_url":"https://github.com/raghavsethi","followers_url":"https://api.github.com/users/raghavsethi/followers","following_url":"https://api.github.com/users/raghavsethi/following{/other_user}","gists_url":"https://api.github.com/users/raghavsethi/gists{/gist_id}","starred_url":"https://api.github.com/users/raghavsethi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raghavsethi/subscriptions","organizations_url":"https://api.github.com/users/raghavsethi/orgs","repos_url":"https://api.github.com/users/raghavsethi/repos","events_url":"https://api.github.com/users/raghavsethi/events{/privacy}","received_events_url":"https://api.github.com/users/raghavsethi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/presto/labels/CLA%20Signed","name":"CLA Signed","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"haozhun","id":2020503,"avatar_url":"https://avatars.githubusercontent.com/u/2020503?v=3","gravatar_id":"","url":"https://api.github.com/users/haozhun","html_url":"https://github.com/haozhun","followers_url":"https://api.github.com/users/haozhun/followers","following_url":"https://api.github.com/users/haozhun/following{/other_user}","gists_url":"https://api.github.com/users/haozhun/gists{/gist_id}","starred_url":"https://api.github.com/users/haozhun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haozhun/subscriptions","organizations_url":"https://api.github.com/users/haozhun/orgs","repos_url":"https://api.github.com/users/haozhun/repos","events_url":"https://api.github.com/users/haozhun/events{/privacy}","received_events_url":"https://api.github.com/users/haozhun/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-12-16T07:40:22Z","updated_at":"2015-12-16T18:10:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/presto/pulls/4184","html_url":"https://github.com/facebook/presto/pull/4184","diff_url":"https://github.com/facebook/presto/pull/4184.diff","patch_url":"https://github.com/facebook/presto/pull/4184.patch"},"body":"The root cause is that local unions are created by AddExchanges to deal with the fact that some union sources are partitioned while others are not. When redistribute_writes is turned off, this used to cause BeginTableWrite to make invalid assumptions about children."},"comment":{"url":"https://api.github.com/repos/facebook/presto/issues/comments/165197618","html_url":"https://github.com/facebook/presto/pull/4184#issuecomment-165197618","issue_url":"https://api.github.com/repos/facebook/presto/issues/4184","id":165197618,"user":{"login":"haozhun","id":2020503,"avatar_url":"https://avatars.githubusercontent.com/u/2020503?v=3","gravatar_id":"","url":"https://api.github.com/users/haozhun","html_url":"https://github.com/haozhun","followers_url":"https://api.github.com/users/haozhun/followers","following_url":"https://api.github.com/users/haozhun/following{/other_user}","gists_url":"https://api.github.com/users/haozhun/gists{/gist_id}","starred_url":"https://api.github.com/users/haozhun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haozhun/subscriptions","organizations_url":"https://api.github.com/users/haozhun/orgs","repos_url":"https://api.github.com/users/haozhun/repos","events_url":"https://api.github.com/users/haozhun/events{/privacy}","received_events_url":"https://api.github.com/users/haozhun/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T18:10:15Z","updated_at":"2015-12-16T18:10:15Z","body":"When there are multiple local unions, they should union the local ones together and have them share one table writer. As a result, `PushTablewriteThroughUnion` can only happen after `AddExchanges` and not before."}}