{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/53152430","id":53152430,"diff_hunk":"@@ -87,19 +92,39 @@ public DriverStrategy getStrategy() {\n \t\treturn DriverStrategy.SORTED_GROUP_REDUCE;\n \t}\n \n-\t@Override\n \tpublic SingleInputPlanNode instantiate(Channel in, SingleInputNode node) {\n \t\tif (in.getShipStrategy() == ShipStrategyType.FORWARD) {\n \t\t\t// adjust a sort (changes grouping, so it must be for this driver to combining sort\n-\t\t\tif (in.getLocalStrategy() == LocalStrategy.SORT) {\n-\t\t\t\tif (!in.getLocalStrategyKeys().isValidUnorderedPrefix(this.keys)) {\n-\t\t\t\t\tthrow new RuntimeException(\"Bug: Inconsistent sort for group strategy.\");\n+\t\t\tif(in.getSource().getOptimizerNode() instanceof PartitionNode) {\n+\t\t\t\t// Inject a combiner before the partition node\n+\t\t\t\tChannel toCombiner = new Channel(in.getSource());","path":"flink-optimizer/src/main/java/org/apache/flink/optimizer/operators/GroupReduceWithCombineProperties.java","position":35,"original_position":35,"commit_id":"80a1f385138c848501d4226634c9dc022063d757","original_commit_id":"80a1f385138c848501d4226634c9dc022063d757","user":{"login":"fhueske","id":2388347,"avatar_url":"https://avatars.githubusercontent.com/u/2388347?v=3","gravatar_id":"","url":"https://api.github.com/users/fhueske","html_url":"https://github.com/fhueske","followers_url":"https://api.github.com/users/fhueske/followers","following_url":"https://api.github.com/users/fhueske/following{/other_user}","gists_url":"https://api.github.com/users/fhueske/gists{/gist_id}","starred_url":"https://api.github.com/users/fhueske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhueske/subscriptions","organizations_url":"https://api.github.com/users/fhueske/orgs","repos_url":"https://api.github.com/users/fhueske/repos","events_url":"https://api.github.com/users/fhueske/events{/privacy}","received_events_url":"https://api.github.com/users/fhueske/received_events","type":"User","site_admin":false},"body":"This channel is also not used in the plan. It is just used for look-ups.","created_at":"2016-02-17T11:39:09Z","updated_at":"2016-02-17T11:39:09Z","html_url":"https://github.com/apache/flink/pull/1553#discussion_r53152430","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/1553","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/53152430"},"html":{"href":"https://github.com/apache/flink/pull/1553#discussion_r53152430"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/1553"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/1553","id":57385339,"html_url":"https://github.com/apache/flink/pull/1553","diff_url":"https://github.com/apache/flink/pull/1553.diff","patch_url":"https://github.com/apache/flink/pull/1553.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/1553","number":1553,"state":"open","locked":false,"title":"FLINK-3179 Combiner is not injected if Reduce or GroupReduce input is explicitly partitioned (Ram)","user":{"login":"ramkrish86","id":3690658,"avatar_url":"https://avatars.githubusercontent.com/u/3690658?v=3","gravatar_id":"","url":"https://api.github.com/users/ramkrish86","html_url":"https://github.com/ramkrish86","followers_url":"https://api.github.com/users/ramkrish86/followers","following_url":"https://api.github.com/users/ramkrish86/following{/other_user}","gists_url":"https://api.github.com/users/ramkrish86/gists{/gist_id}","starred_url":"https://api.github.com/users/ramkrish86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramkrish86/subscriptions","organizations_url":"https://api.github.com/users/ramkrish86/orgs","repos_url":"https://api.github.com/users/ramkrish86/repos","events_url":"https://api.github.com/users/ramkrish86/events{/privacy}","received_events_url":"https://api.github.com/users/ramkrish86/received_events","type":"User","site_admin":false},"body":"Followed the guidance given in the description in order to fix this. Is the approach correct here?  Also using this to learn the code. \r\nOnce we see that a partition node is the input of a reduce node or group reduce node -  we try to inject the combiner to the source node (the data source node) and the reducer node will take the actual partition node as the input. \r\nSo now the structure would be DataSource->Combine->Partition->Reduce. \r\nSuggestions and feedback welcome as am not sure if I have covered all the cases here. ","created_at":"2016-01-27T16:33:43Z","updated_at":"2016-02-17T11:39:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8ce42acf969e245f1729547f24bfc5093f07371","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/1553/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/1553/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/1553/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/80a1f385138c848501d4226634c9dc022063d757","head":{"label":"ramkrish86:FLINK-3179","ref":"FLINK-3179","sha":"80a1f385138c848501d4226634c9dc022063d757","user":{"login":"ramkrish86","id":3690658,"avatar_url":"https://avatars.githubusercontent.com/u/3690658?v=3","gravatar_id":"","url":"https://api.github.com/users/ramkrish86","html_url":"https://github.com/ramkrish86","followers_url":"https://api.github.com/users/ramkrish86/followers","following_url":"https://api.github.com/users/ramkrish86/following{/other_user}","gists_url":"https://api.github.com/users/ramkrish86/gists{/gist_id}","starred_url":"https://api.github.com/users/ramkrish86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramkrish86/subscriptions","organizations_url":"https://api.github.com/users/ramkrish86/orgs","repos_url":"https://api.github.com/users/ramkrish86/repos","events_url":"https://api.github.com/users/ramkrish86/events{/privacy}","received_events_url":"https://api.github.com/users/ramkrish86/received_events","type":"User","site_admin":false},"repo":{"id":50035316,"name":"flink","full_name":"ramkrish86/flink","owner":{"login":"ramkrish86","id":3690658,"avatar_url":"https://avatars.githubusercontent.com/u/3690658?v=3","gravatar_id":"","url":"https://api.github.com/users/ramkrish86","html_url":"https://github.com/ramkrish86","followers_url":"https://api.github.com/users/ramkrish86/followers","following_url":"https://api.github.com/users/ramkrish86/following{/other_user}","gists_url":"https://api.github.com/users/ramkrish86/gists{/gist_id}","starred_url":"https://api.github.com/users/ramkrish86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramkrish86/subscriptions","organizations_url":"https://api.github.com/users/ramkrish86/orgs","repos_url":"https://api.github.com/users/ramkrish86/repos","events_url":"https://api.github.com/users/ramkrish86/events{/privacy}","received_events_url":"https://api.github.com/users/ramkrish86/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ramkrish86/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/ramkrish86/flink","forks_url":"https://api.github.com/repos/ramkrish86/flink/forks","keys_url":"https://api.github.com/repos/ramkrish86/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ramkrish86/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ramkrish86/flink/teams","hooks_url":"https://api.github.com/repos/ramkrish86/flink/hooks","issue_events_url":"https://api.github.com/repos/ramkrish86/flink/issues/events{/number}","events_url":"https://api.github.com/repos/ramkrish86/flink/events","assignees_url":"https://api.github.com/repos/ramkrish86/flink/assignees{/user}","branches_url":"https://api.github.com/repos/ramkrish86/flink/branches{/branch}","tags_url":"https://api.github.com/repos/ramkrish86/flink/tags","blobs_url":"https://api.github.com/repos/ramkrish86/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ramkrish86/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ramkrish86/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/ramkrish86/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ramkrish86/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/ramkrish86/flink/languages","stargazers_url":"https://api.github.com/repos/ramkrish86/flink/stargazers","contributors_url":"https://api.github.com/repos/ramkrish86/flink/contributors","subscribers_url":"https://api.github.com/repos/ramkrish86/flink/subscribers","subscription_url":"https://api.github.com/repos/ramkrish86/flink/subscription","commits_url":"https://api.github.com/repos/ramkrish86/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/ramkrish86/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/ramkrish86/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/ramkrish86/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/ramkrish86/flink/contents/{+path}","compare_url":"https://api.github.com/repos/ramkrish86/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ramkrish86/flink/merges","archive_url":"https://api.github.com/repos/ramkrish86/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ramkrish86/flink/downloads","issues_url":"https://api.github.com/repos/ramkrish86/flink/issues{/number}","pulls_url":"https://api.github.com/repos/ramkrish86/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/ramkrish86/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/ramkrish86/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ramkrish86/flink/labels{/name}","releases_url":"https://api.github.com/repos/ramkrish86/flink/releases{/id}","deployments_url":"https://api.github.com/repos/ramkrish86/flink/deployments","created_at":"2016-01-20T14:27:43Z","updated_at":"2016-01-20T14:27:55Z","pushed_at":"2016-02-14T10:44:45Z","git_url":"git://github.com/ramkrish86/flink.git","ssh_url":"git@github.com:ramkrish86/flink.git","clone_url":"https://github.com/ramkrish86/flink.git","svn_url":"https://github.com/ramkrish86/flink","homepage":null,"size":71658,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"499b60fedd6db1cd0c1a4e1cc8c59a94b89c5c84","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":20587599,"name":"flink","full_name":"apache/flink","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/flink","description":"Mirror of Apache Flink","fork":false,"url":"https://api.github.com/repos/apache/flink","forks_url":"https://api.github.com/repos/apache/flink/forks","keys_url":"https://api.github.com/repos/apache/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/flink/teams","hooks_url":"https://api.github.com/repos/apache/flink/hooks","issue_events_url":"https://api.github.com/repos/apache/flink/issues/events{/number}","events_url":"https://api.github.com/repos/apache/flink/events","assignees_url":"https://api.github.com/repos/apache/flink/assignees{/user}","branches_url":"https://api.github.com/repos/apache/flink/branches{/branch}","tags_url":"https://api.github.com/repos/apache/flink/tags","blobs_url":"https://api.github.com/repos/apache/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/flink/languages","stargazers_url":"https://api.github.com/repos/apache/flink/stargazers","contributors_url":"https://api.github.com/repos/apache/flink/contributors","subscribers_url":"https://api.github.com/repos/apache/flink/subscribers","subscription_url":"https://api.github.com/repos/apache/flink/subscription","commits_url":"https://api.github.com/repos/apache/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/flink/contents/{+path}","compare_url":"https://api.github.com/repos/apache/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/flink/merges","archive_url":"https://api.github.com/repos/apache/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/flink/downloads","issues_url":"https://api.github.com/repos/apache/flink/issues{/number}","pulls_url":"https://api.github.com/repos/apache/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/flink/labels{/name}","releases_url":"https://api.github.com/repos/apache/flink/releases{/id}","deployments_url":"https://api.github.com/repos/apache/flink/deployments","created_at":"2014-06-07T07:00:10Z","updated_at":"2016-02-17T10:23:12Z","pushed_at":"2016-02-17T11:30:30Z","git_url":"git://github.com/apache/flink.git","ssh_url":"git@github.com:apache/flink.git","clone_url":"https://github.com/apache/flink.git","svn_url":"https://github.com/apache/flink","homepage":null,"size":158146,"stargazers_count":960,"watchers_count":960,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":620,"mirror_url":"git://git.apache.org/flink.git","open_issues_count":81,"forks":620,"open_issues":81,"watchers":960,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/1553"},"html":{"href":"https://github.com/apache/flink/pull/1553"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/1553"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/1553/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/1553/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/1553/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/80a1f385138c848501d4226634c9dc022063d757"}}}}