{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/scalding/pulls/comments/60819586","id":60819586,"diff_hunk":"@@ -192,6 +193,8 @@ sealed trait Execution[+T] extends java.io.Serializable {\n    */\n   def zip[U](that: Execution[U]): Execution[(T, U)] =\n     Zipped(this, that)\n+\n+  override val hashCode = super.hashCode","path":"scalding-core/src/main/scala/com/twitter/scalding/Execution.scala","position":33,"original_position":33,"commit_id":"279969d33e1e072c96c4688f8a91416332ef5a85","original_commit_id":"279969d33e1e072c96c4688f8a91416332ef5a85","user":{"login":"johnynek","id":67958,"avatar_url":"https://avatars.githubusercontent.com/u/67958?v=3","gravatar_id":"","url":"https://api.github.com/users/johnynek","html_url":"https://github.com/johnynek","followers_url":"https://api.github.com/users/johnynek/followers","following_url":"https://api.github.com/users/johnynek/following{/other_user}","gists_url":"https://api.github.com/users/johnynek/gists{/gist_id}","starred_url":"https://api.github.com/users/johnynek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnynek/subscriptions","organizations_url":"https://api.github.com/users/johnynek/orgs","repos_url":"https://api.github.com/users/johnynek/repos","events_url":"https://api.github.com/users/johnynek/events{/privacy}","received_events_url":"https://api.github.com/users/johnynek/received_events","type":"User","site_admin":false},"body":"can we add a test that this is still working like normal case class equality and hashCode?\r\n\r\nFor instance, `val e1 = Execution.from(1); val e2 = Execution.from(2); e1.zip(e2).hashCode == e1.zip(e2).hashCode`.\r\n\r\nI'm worried this could break caching if somehow this picked up `hashCode` from `java.lang.Object`.\r\n\r\nOther than that, this looks good to me.","created_at":"2016-04-23T00:55:12Z","updated_at":"2016-04-23T00:55:12Z","html_url":"https://github.com/twitter/scalding/pull/1547#discussion_r60819586","pull_request_url":"https://api.github.com/repos/twitter/scalding/pulls/1547","_links":{"self":{"href":"https://api.github.com/repos/twitter/scalding/pulls/comments/60819586"},"html":{"href":"https://github.com/twitter/scalding/pull/1547#discussion_r60819586"},"pull_request":{"href":"https://api.github.com/repos/twitter/scalding/pulls/1547"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/scalding/pulls/1547","id":67451002,"html_url":"https://github.com/twitter/scalding/pull/1547","diff_url":"https://github.com/twitter/scalding/pull/1547.diff","patch_url":"https://github.com/twitter/scalding/pull/1547.patch","issue_url":"https://api.github.com/repos/twitter/scalding/issues/1547","number":1547,"state":"open","locked":false,"title":"Trampoline Execution runs","user":{"login":"jnievelt","id":4684038,"avatar_url":"https://avatars.githubusercontent.com/u/4684038?v=3","gravatar_id":"","url":"https://api.github.com/users/jnievelt","html_url":"https://github.com/jnievelt","followers_url":"https://api.github.com/users/jnievelt/followers","following_url":"https://api.github.com/users/jnievelt/following{/other_user}","gists_url":"https://api.github.com/users/jnievelt/gists{/gist_id}","starred_url":"https://api.github.com/users/jnievelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnievelt/subscriptions","organizations_url":"https://api.github.com/users/jnievelt/orgs","repos_url":"https://api.github.com/users/jnievelt/repos","events_url":"https://api.github.com/users/jnievelt/events{/privacy}","received_events_url":"https://api.github.com/users/jnievelt/received_events","type":"User","site_admin":false},"body":"Resolves #1544\r\n\r\nTwo essential parts to this.  First, we eagerly compute and save the `hashCode`.  This means we'll compute as we go, instead of on-demand at the end.  I know this has potential for `hashCode`/`equals` discrepancies in case the contained objects mutate, but I'm not sure if we are worried about that or not.\r\n\r\nSecond, `runStats` returns a `Trampoline` of its previous return type.  This should be safe since a) the base `Execution#runStats` is protected and b) the concrete `Execution` types which expose public `runStats` are private classes.  I've also made these methods protected across the board as part of this change.\r\n\r\nNote that there is a little bit of a different style of computation as a result.  For example, with `Mapped`, we need to trampoline through the previous `Execution` before we're ready to call into `getOrElseInsert`.  As it stands, a `run` through a large `Execution` graph will always traverse the immediate graph and generate new `Trampoline`s in preparation for computing the top-level `Future` (though it will hit the cache before actually computing it).\r\n\r\nI've also written up a version that also caches the `Trampoline`s themselves, but it's not needed for functional correctness, and I didn't think it was necessarily justified from a performance standpoint.\r\n\r\nFinally, I'm moving `ExecutionTest` into the `scalding` package, to match `Execution` itself.","created_at":"2016-04-22T02:32:41Z","updated_at":"2016-04-23T00:55:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb64f53402cf23e5f1575681827d6affc44f0a01","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twitter/scalding/pulls/1547/commits","review_comments_url":"https://api.github.com/repos/twitter/scalding/pulls/1547/comments","review_comment_url":"https://api.github.com/repos/twitter/scalding/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twitter/scalding/issues/1547/comments","statuses_url":"https://api.github.com/repos/twitter/scalding/statuses/279969d33e1e072c96c4688f8a91416332ef5a85","head":{"label":"twitter:jnievelt/1544","ref":"jnievelt/1544","sha":"279969d33e1e072c96c4688f8a91416332ef5a85","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":3146558,"name":"scalding","full_name":"twitter/scalding","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/scalding","description":"A Scala API for Cascading","fork":false,"url":"https://api.github.com/repos/twitter/scalding","forks_url":"https://api.github.com/repos/twitter/scalding/forks","keys_url":"https://api.github.com/repos/twitter/scalding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/scalding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/scalding/teams","hooks_url":"https://api.github.com/repos/twitter/scalding/hooks","issue_events_url":"https://api.github.com/repos/twitter/scalding/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/scalding/events","assignees_url":"https://api.github.com/repos/twitter/scalding/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/scalding/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/scalding/tags","blobs_url":"https://api.github.com/repos/twitter/scalding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/scalding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/scalding/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/scalding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/scalding/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/scalding/languages","stargazers_url":"https://api.github.com/repos/twitter/scalding/stargazers","contributors_url":"https://api.github.com/repos/twitter/scalding/contributors","subscribers_url":"https://api.github.com/repos/twitter/scalding/subscribers","subscription_url":"https://api.github.com/repos/twitter/scalding/subscription","commits_url":"https://api.github.com/repos/twitter/scalding/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/scalding/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/scalding/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/scalding/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/scalding/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/scalding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/scalding/merges","archive_url":"https://api.github.com/repos/twitter/scalding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/scalding/downloads","issues_url":"https://api.github.com/repos/twitter/scalding/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/scalding/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/scalding/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/scalding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/scalding/labels{/name}","releases_url":"https://api.github.com/repos/twitter/scalding/releases{/id}","deployments_url":"https://api.github.com/repos/twitter/scalding/deployments","created_at":"2012-01-10T16:22:08Z","updated_at":"2016-04-22T13:10:22Z","pushed_at":"2016-04-22T21:57:46Z","git_url":"git://github.com/twitter/scalding.git","ssh_url":"git@github.com:twitter/scalding.git","clone_url":"https://github.com/twitter/scalding.git","svn_url":"https://github.com/twitter/scalding","homepage":"http://twitter.com/scalding","size":15563,"stargazers_count":2486,"watchers_count":2486,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":581,"mirror_url":null,"open_issues_count":266,"forks":581,"open_issues":266,"watchers":2486,"default_branch":"develop"}},"base":{"label":"twitter:develop","ref":"develop","sha":"0302603c5f8117a7623fb61b2a3cee429665dde8","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":3146558,"name":"scalding","full_name":"twitter/scalding","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/scalding","description":"A Scala API for Cascading","fork":false,"url":"https://api.github.com/repos/twitter/scalding","forks_url":"https://api.github.com/repos/twitter/scalding/forks","keys_url":"https://api.github.com/repos/twitter/scalding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/scalding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/scalding/teams","hooks_url":"https://api.github.com/repos/twitter/scalding/hooks","issue_events_url":"https://api.github.com/repos/twitter/scalding/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/scalding/events","assignees_url":"https://api.github.com/repos/twitter/scalding/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/scalding/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/scalding/tags","blobs_url":"https://api.github.com/repos/twitter/scalding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/scalding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/scalding/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/scalding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/scalding/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/scalding/languages","stargazers_url":"https://api.github.com/repos/twitter/scalding/stargazers","contributors_url":"https://api.github.com/repos/twitter/scalding/contributors","subscribers_url":"https://api.github.com/repos/twitter/scalding/subscribers","subscription_url":"https://api.github.com/repos/twitter/scalding/subscription","commits_url":"https://api.github.com/repos/twitter/scalding/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/scalding/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/scalding/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/scalding/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/scalding/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/scalding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/scalding/merges","archive_url":"https://api.github.com/repos/twitter/scalding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/scalding/downloads","issues_url":"https://api.github.com/repos/twitter/scalding/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/scalding/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/scalding/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/scalding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/scalding/labels{/name}","releases_url":"https://api.github.com/repos/twitter/scalding/releases{/id}","deployments_url":"https://api.github.com/repos/twitter/scalding/deployments","created_at":"2012-01-10T16:22:08Z","updated_at":"2016-04-22T13:10:22Z","pushed_at":"2016-04-22T21:57:46Z","git_url":"git://github.com/twitter/scalding.git","ssh_url":"git@github.com:twitter/scalding.git","clone_url":"https://github.com/twitter/scalding.git","svn_url":"https://github.com/twitter/scalding","homepage":"http://twitter.com/scalding","size":15563,"stargazers_count":2486,"watchers_count":2486,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":581,"mirror_url":null,"open_issues_count":266,"forks":581,"open_issues":266,"watchers":2486,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/scalding/pulls/1547"},"html":{"href":"https://github.com/twitter/scalding/pull/1547"},"issue":{"href":"https://api.github.com/repos/twitter/scalding/issues/1547"},"comments":{"href":"https://api.github.com/repos/twitter/scalding/issues/1547/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/scalding/pulls/1547/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/scalding/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twitter/scalding/pulls/1547/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/scalding/statuses/279969d33e1e072c96c4688f8a91416332ef5a85"}}}}