{"action":"created","comment":{"url":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/comments/197950310","pull_request_review_id":131793817,"id":197950310,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Nzk1MDMxMA==","diff_hunk":"@@ -68,4 +71,45 @@ public void compositeColocateIdUsage(List<JsonObject> composites) {\n         for (JsonObject composite : composites)\n             pePlacementPreprocess.compositeColocateIdUse(composite);\n     }\n+\n+    @SuppressWarnings(\"serial\")\n+    private void relocateHashAdders(){\n+        final Set<JsonObject> hashAdders = new HashSet<>();\n+        // Firstly, find each hashAdder\n+        GraphUtilities.visitOnce(GraphUtilities.findStarts(graph),\n+                new HashSet<BVirtualMarker>(),\n+                graph,\n+                new Consumer<JsonObject>(){\n+                    public void accept(JsonObject op) {\n+                        if(jstring(op, \"kind\").equals(\"com.ibm.streamsx.topology.functional.java::HashAdder\")){\n+                            hashAdders.add(op);\n+                        }\n+                    }\n+        });\n+\n+        for(JsonObject hashAdder : hashAdders){\n+            relocateHashAdder(hashAdder);\n+        }\n+    }\n+\n+    private void relocateHashAdder(JsonObject hashAdder){\n+        // $Unparallel$ -> hashAdder -> $Parallel$ -> hashRemover\n+        Set<JsonObject> parents = GraphUtilities.getUpstream(hashAdder, graph);\n+        \n+        // hashAdder has multiple parents\n+        if (parents.size() != 1) return;\n+\n+        JsonObject parent = parents.iterator().next();\n+\n+        // hashAdder's parent has multiple children\n+        if (GraphUtilities.getDownstream(parent, graph).size() != 1)\n+            return;\n+\n+        // Only optimize the case where $Unparallel has only one child, and\n+        // $parallel has only one parent","path":"java/src/com/ibm/streamsx/topology/generator/spl/Preprocessor.java","position":76,"original_position":76,"commit_id":"d363c211bfa29f0528fb416a1a10eb070f2323b4","original_commit_id":"d363c211bfa29f0528fb416a1a10eb070f2323b4","user":{"login":"ddebrunner","id":3769612,"node_id":"MDQ6VXNlcjM3Njk2MTI=","avatar_url":"https://avatars1.githubusercontent.com/u/3769612?v=4","gravatar_id":"","url":"https://api.github.com/users/ddebrunner","html_url":"https://github.com/ddebrunner","followers_url":"https://api.github.com/users/ddebrunner/followers","following_url":"https://api.github.com/users/ddebrunner/following{/other_user}","gists_url":"https://api.github.com/users/ddebrunner/gists{/gist_id}","starred_url":"https://api.github.com/users/ddebrunner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddebrunner/subscriptions","organizations_url":"https://api.github.com/users/ddebrunner/orgs","repos_url":"https://api.github.com/users/ddebrunner/repos","events_url":"https://api.github.com/users/ddebrunner/events{/privacy}","received_events_url":"https://api.github.com/users/ddebrunner/received_events","type":"User","site_admin":false},"body":"That's probably the comment I was looking for (assuming it is corrected), but it should be before the checks so that a reader understands the checks as they read down.","created_at":"2018-06-25T21:36:26Z","updated_at":"2018-06-25T21:36:26Z","html_url":"https://github.com/IBMStreams/streamsx.topology/pull/1738#discussion_r197950310","pull_request_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/1738","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/comments/197950310"},"html":{"href":"https://github.com/IBMStreams/streamsx.topology/pull/1738#discussion_r197950310"},"pull_request":{"href":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/1738"}},"in_reply_to_id":197949976},"pull_request":{"url":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/1738","id":197220189,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MjIwMTg5","html_url":"https://github.com/IBMStreams/streamsx.topology/pull/1738","diff_url":"https://github.com/IBMStreams/streamsx.topology/pull/1738.diff","patch_url":"https://github.com/IBMStreams/streamsx.topology/pull/1738.patch","issue_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/issues/1738","number":1738,"state":"open","locked":false,"title":"Relocate HashAdder (Step 1)","user":{"login":"mrshenli","id":16999635,"node_id":"MDQ6VXNlcjE2OTk5NjM1","avatar_url":"https://avatars2.githubusercontent.com/u/16999635?v=4","gravatar_id":"","url":"https://api.github.com/users/mrshenli","html_url":"https://github.com/mrshenli","followers_url":"https://api.github.com/users/mrshenli/followers","following_url":"https://api.github.com/users/mrshenli/following{/other_user}","gists_url":"https://api.github.com/users/mrshenli/gists{/gist_id}","starred_url":"https://api.github.com/users/mrshenli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrshenli/subscriptions","organizations_url":"https://api.github.com/users/mrshenli/orgs","repos_url":"https://api.github.com/users/mrshenli/repos","events_url":"https://api.github.com/users/mrshenli/events{/privacy}","received_events_url":"https://api.github.com/users/mrshenli/received_events","type":"User","site_admin":false},"body":"Relocate `HashAdder` for a special case `$Unparallel$ -> HashAdder -> $Parallel$ -> HashRemover` where `HashAdder` is `$Unparallel$`'s only child, and `$Unparallel$` is `HashAdder`'s only parent.\r\n\r\nRelated to #753 ","created_at":"2018-06-25T20:02:43Z","updated_at":"2018-06-25T21:36:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"793655c5d272360055f81b3df12958b834b203ae","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/1738/commits","review_comments_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/1738/comments","review_comment_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/issues/1738/comments","statuses_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/statuses/d363c211bfa29f0528fb416a1a10eb070f2323b4","head":{"label":"mrshenli:hashadder","ref":"hashadder","sha":"d363c211bfa29f0528fb416a1a10eb070f2323b4","user":{"login":"mrshenli","id":16999635,"node_id":"MDQ6VXNlcjE2OTk5NjM1","avatar_url":"https://avatars2.githubusercontent.com/u/16999635?v=4","gravatar_id":"","url":"https://api.github.com/users/mrshenli","html_url":"https://github.com/mrshenli","followers_url":"https://api.github.com/users/mrshenli/followers","following_url":"https://api.github.com/users/mrshenli/following{/other_user}","gists_url":"https://api.github.com/users/mrshenli/gists{/gist_id}","starred_url":"https://api.github.com/users/mrshenli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrshenli/subscriptions","organizations_url":"https://api.github.com/users/mrshenli/orgs","repos_url":"https://api.github.com/users/mrshenli/repos","events_url":"https://api.github.com/users/mrshenli/events{/privacy}","received_events_url":"https://api.github.com/users/mrshenli/received_events","type":"User","site_admin":false},"repo":{"id":67633404,"node_id":"MDEwOlJlcG9zaXRvcnk2NzYzMzQwNA==","name":"streamsx.topology","full_name":"mrshenli/streamsx.topology","owner":{"login":"mrshenli","id":16999635,"node_id":"MDQ6VXNlcjE2OTk5NjM1","avatar_url":"https://avatars2.githubusercontent.com/u/16999635?v=4","gravatar_id":"","url":"https://api.github.com/users/mrshenli","html_url":"https://github.com/mrshenli","followers_url":"https://api.github.com/users/mrshenli/followers","following_url":"https://api.github.com/users/mrshenli/following{/other_user}","gists_url":"https://api.github.com/users/mrshenli/gists{/gist_id}","starred_url":"https://api.github.com/users/mrshenli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrshenli/subscriptions","organizations_url":"https://api.github.com/users/mrshenli/orgs","repos_url":"https://api.github.com/users/mrshenli/repos","events_url":"https://api.github.com/users/mrshenli/events{/privacy}","received_events_url":"https://api.github.com/users/mrshenli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrshenli/streamsx.topology","description":"(Incubation) A project that supports building streaming topologies (applications) for IBM Streams in different programming languages, such as Java, Scala and Python.","fork":true,"url":"https://api.github.com/repos/mrshenli/streamsx.topology","forks_url":"https://api.github.com/repos/mrshenli/streamsx.topology/forks","keys_url":"https://api.github.com/repos/mrshenli/streamsx.topology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrshenli/streamsx.topology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrshenli/streamsx.topology/teams","hooks_url":"https://api.github.com/repos/mrshenli/streamsx.topology/hooks","issue_events_url":"https://api.github.com/repos/mrshenli/streamsx.topology/issues/events{/number}","events_url":"https://api.github.com/repos/mrshenli/streamsx.topology/events","assignees_url":"https://api.github.com/repos/mrshenli/streamsx.topology/assignees{/user}","branches_url":"https://api.github.com/repos/mrshenli/streamsx.topology/branches{/branch}","tags_url":"https://api.github.com/repos/mrshenli/streamsx.topology/tags","blobs_url":"https://api.github.com/repos/mrshenli/streamsx.topology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrshenli/streamsx.topology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrshenli/streamsx.topology/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrshenli/streamsx.topology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrshenli/streamsx.topology/statuses/{sha}","languages_url":"https://api.github.com/repos/mrshenli/streamsx.topology/languages","stargazers_url":"https://api.github.com/repos/mrshenli/streamsx.topology/stargazers","contributors_url":"https://api.github.com/repos/mrshenli/streamsx.topology/contributors","subscribers_url":"https://api.github.com/repos/mrshenli/streamsx.topology/subscribers","subscription_url":"https://api.github.com/repos/mrshenli/streamsx.topology/subscription","commits_url":"https://api.github.com/repos/mrshenli/streamsx.topology/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrshenli/streamsx.topology/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrshenli/streamsx.topology/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrshenli/streamsx.topology/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrshenli/streamsx.topology/contents/{+path}","compare_url":"https://api.github.com/repos/mrshenli/streamsx.topology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrshenli/streamsx.topology/merges","archive_url":"https://api.github.com/repos/mrshenli/streamsx.topology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrshenli/streamsx.topology/downloads","issues_url":"https://api.github.com/repos/mrshenli/streamsx.topology/issues{/number}","pulls_url":"https://api.github.com/repos/mrshenli/streamsx.topology/pulls{/number}","milestones_url":"https://api.github.com/repos/mrshenli/streamsx.topology/milestones{/number}","notifications_url":"https://api.github.com/repos/mrshenli/streamsx.topology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrshenli/streamsx.topology/labels{/name}","releases_url":"https://api.github.com/repos/mrshenli/streamsx.topology/releases{/id}","deployments_url":"https://api.github.com/repos/mrshenli/streamsx.topology/deployments","created_at":"2016-09-07T18:34:51Z","updated_at":"2016-09-07T18:34:53Z","pushed_at":"2018-06-25T21:28:45Z","git_url":"git://github.com/mrshenli/streamsx.topology.git","ssh_url":"git@github.com:mrshenli/streamsx.topology.git","clone_url":"https://github.com/mrshenli/streamsx.topology.git","svn_url":"https://github.com/mrshenli/streamsx.topology","homepage":"http://ibmstreams.github.io/streamsx.topology","size":14834,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"IBMStreams:master","ref":"master","sha":"5340a469b1870fa596c5ac234cc69537f40eac33","user":{"login":"IBMStreams","id":5439177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzkxNzc=","avatar_url":"https://avatars1.githubusercontent.com/u/5439177?v=4","gravatar_id":"","url":"https://api.github.com/users/IBMStreams","html_url":"https://github.com/IBMStreams","followers_url":"https://api.github.com/users/IBMStreams/followers","following_url":"https://api.github.com/users/IBMStreams/following{/other_user}","gists_url":"https://api.github.com/users/IBMStreams/gists{/gist_id}","starred_url":"https://api.github.com/users/IBMStreams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBMStreams/subscriptions","organizations_url":"https://api.github.com/users/IBMStreams/orgs","repos_url":"https://api.github.com/users/IBMStreams/repos","events_url":"https://api.github.com/users/IBMStreams/events{/privacy}","received_events_url":"https://api.github.com/users/IBMStreams/received_events","type":"Organization","site_admin":false},"repo":{"id":36458001,"node_id":"MDEwOlJlcG9zaXRvcnkzNjQ1ODAwMQ==","name":"streamsx.topology","full_name":"IBMStreams/streamsx.topology","owner":{"login":"IBMStreams","id":5439177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzkxNzc=","avatar_url":"https://avatars1.githubusercontent.com/u/5439177?v=4","gravatar_id":"","url":"https://api.github.com/users/IBMStreams","html_url":"https://github.com/IBMStreams","followers_url":"https://api.github.com/users/IBMStreams/followers","following_url":"https://api.github.com/users/IBMStreams/following{/other_user}","gists_url":"https://api.github.com/users/IBMStreams/gists{/gist_id}","starred_url":"https://api.github.com/users/IBMStreams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBMStreams/subscriptions","organizations_url":"https://api.github.com/users/IBMStreams/orgs","repos_url":"https://api.github.com/users/IBMStreams/repos","events_url":"https://api.github.com/users/IBMStreams/events{/privacy}","received_events_url":"https://api.github.com/users/IBMStreams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IBMStreams/streamsx.topology","description":"(Incubation) Develop streaming applications for IBM Streams in Python, Java & Scala.","fork":false,"url":"https://api.github.com/repos/IBMStreams/streamsx.topology","forks_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/forks","keys_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/teams","hooks_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/hooks","issue_events_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/issues/events{/number}","events_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/events","assignees_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/assignees{/user}","branches_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/branches{/branch}","tags_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/tags","blobs_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/git/refs{/sha}","trees_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/statuses/{sha}","languages_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/languages","stargazers_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/stargazers","contributors_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/contributors","subscribers_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/subscribers","subscription_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/subscription","commits_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/commits{/sha}","git_commits_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/git/commits{/sha}","comments_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/comments{/number}","issue_comment_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/issues/comments{/number}","contents_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/contents/{+path}","compare_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/merges","archive_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/downloads","issues_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/issues{/number}","pulls_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls{/number}","milestones_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/milestones{/number}","notifications_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/labels{/name}","releases_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/releases{/id}","deployments_url":"https://api.github.com/repos/IBMStreams/streamsx.topology/deployments","created_at":"2015-05-28T18:30:13Z","updated_at":"2018-06-23T00:39:37Z","pushed_at":"2018-06-25T21:33:33Z","git_url":"git://github.com/IBMStreams/streamsx.topology.git","ssh_url":"git@github.com:IBMStreams/streamsx.topology.git","clone_url":"https://github.com/IBMStreams/streamsx.topology.git","svn_url":"https://github.com/IBMStreams/streamsx.topology","homepage":"http://ibmstreams.github.io/streamsx.topology","size":20002,"stargazers_count":21,"watchers_count":21,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":40,"mirror_url":null,"archived":false,"open_issues_count":174,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":40,"open_issues":174,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/1738"},"html":{"href":"https://github.com/IBMStreams/streamsx.topology/pull/1738"},"issue":{"href":"https://api.github.com/repos/IBMStreams/streamsx.topology/issues/1738"},"comments":{"href":"https://api.github.com/repos/IBMStreams/streamsx.topology/issues/1738/comments"},"review_comments":{"href":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/1738/comments"},"review_comment":{"href":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IBMStreams/streamsx.topology/pulls/1738/commits"},"statuses":{"href":"https://api.github.com/repos/IBMStreams/streamsx.topology/statuses/d363c211bfa29f0528fb416a1a10eb070f2323b4"}},"author_association":"NONE"}}
{"actor":{"display_login":"ddebrunner"}}