{"action":"created","comment":{"url":"https://api.github.com/repos/hail-is/hail/pulls/comments/189082037","pull_request_review_id":121193080,"id":189082037,"diff_hunk":"@@ -69,5 +69,66 @@ object SetFunctions extends RegistryFunctions {\n         ApplySpecial(\"&&\",\n           FastSeq(Ref(a, TBoolean()), SetContains(w, Ref(x, t)))))\n     }\n+\n+    registerIR(\"min\", TSet(tnum(\"T\"))) { s =>\n+      val t = -s.typ.asInstanceOf[TSet].elementType\n+      val a = genUID()\n+      Let(a, ToArray(s), If(\n+        ApplySpecial(\">\", FastSeq(ArrayLen(Ref(a, TArray(t))), I32(0))),\n+        ArrayRef(Ref(a, TArray(t)), I32(0)),\n+        NA(t)))\n+    }\n+\n+    registerIR(\"max\", TSet(tnum(\"T\"))) { s =>\n+      val t = -s.typ.asInstanceOf[TSet].elementType","path":"src/main/scala/is/hail/expr/ir/functions/SetFunctions.scala","position":24,"original_position":24,"commit_id":"d3d232afddabb6c6a8af1fd3bb0489e1c8541550","original_commit_id":"d3d232afddabb6c6a8af1fd3bb0489e1c8541550","user":{"login":"catoverdrive","id":19789871,"avatar_url":"https://avatars3.githubusercontent.com/u/19789871?v=4","gravatar_id":"","url":"https://api.github.com/users/catoverdrive","html_url":"https://github.com/catoverdrive","followers_url":"https://api.github.com/users/catoverdrive/followers","following_url":"https://api.github.com/users/catoverdrive/following{/other_user}","gists_url":"https://api.github.com/users/catoverdrive/gists{/gist_id}","starred_url":"https://api.github.com/users/catoverdrive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catoverdrive/subscriptions","organizations_url":"https://api.github.com/users/catoverdrive/orgs","repos_url":"https://api.github.com/users/catoverdrive/repos","events_url":"https://api.github.com/users/catoverdrive/events{/privacy}","received_events_url":"https://api.github.com/users/catoverdrive/received_events","type":"User","site_admin":false},"body":"the type of `Ref(a)` is not quite going to be `TArray(t)`, since ToArray is `TArray(s.typ.elementType)`. Here and below in median.","created_at":"2018-05-17T19:57:50Z","updated_at":"2018-05-17T19:58:11Z","html_url":"https://github.com/hail-is/hail/pull/3608#discussion_r189082037","pull_request_url":"https://api.github.com/repos/hail-is/hail/pulls/3608","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/hail-is/hail/pulls/comments/189082037"},"html":{"href":"https://github.com/hail-is/hail/pull/3608#discussion_r189082037"},"pull_request":{"href":"https://api.github.com/repos/hail-is/hail/pulls/3608"}}},"pull_request":{"url":"https://api.github.com/repos/hail-is/hail/pulls/3608","id":188579069,"html_url":"https://github.com/hail-is/hail/pull/3608","diff_url":"https://github.com/hail-is/hail/pull/3608.diff","patch_url":"https://github.com/hail-is/hail/pull/3608.patch","issue_url":"https://api.github.com/repos/hail-is/hail/issues/3608","number":3608,"state":"open","locked":false,"title":"IR functions","user":{"login":"jigold","id":1693348,"avatar_url":"https://avatars2.githubusercontent.com/u/1693348?v=4","gravatar_id":"","url":"https://api.github.com/users/jigold","html_url":"https://github.com/jigold","followers_url":"https://api.github.com/users/jigold/followers","following_url":"https://api.github.com/users/jigold/following{/other_user}","gists_url":"https://api.github.com/users/jigold/gists{/gist_id}","starred_url":"https://api.github.com/users/jigold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jigold/subscriptions","organizations_url":"https://api.github.com/users/jigold/orgs","repos_url":"https://api.github.com/users/jigold/repos","events_url":"https://api.github.com/users/jigold/events{/privacy}","received_events_url":"https://api.github.com/users/jigold/received_events","type":"User","site_admin":false},"body":"min(set<tnum>):tnum\r\nmax(set<tnum>):tnum\r\nmean(set<tnum>):tnum\r\nmedian(set<tnum>):tnum\r\nargmax(array<T>):int32\r\nargmin(array<T>):int32\r\nuniqueMinIndex(array<T>):int32\r\nuniqueMaxIndex(array<T>):int32\r\nabs(tnum):tnum\r\nmax(T,T):T\r\nmin(T,T):T\r\nmax(array<tnum>):tnum\r\nmin(array<tnum>):tnum\r\nmean(array<tnum>):tnum","created_at":"2018-05-16T22:32:54Z","updated_at":"2018-05-17T19:58:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31bda1f37e46a14607a395d1a7e3daf5f54c8e5a","assignee":{"login":"catoverdrive","id":19789871,"avatar_url":"https://avatars3.githubusercontent.com/u/19789871?v=4","gravatar_id":"","url":"https://api.github.com/users/catoverdrive","html_url":"https://github.com/catoverdrive","followers_url":"https://api.github.com/users/catoverdrive/followers","following_url":"https://api.github.com/users/catoverdrive/following{/other_user}","gists_url":"https://api.github.com/users/catoverdrive/gists{/gist_id}","starred_url":"https://api.github.com/users/catoverdrive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catoverdrive/subscriptions","organizations_url":"https://api.github.com/users/catoverdrive/orgs","repos_url":"https://api.github.com/users/catoverdrive/repos","events_url":"https://api.github.com/users/catoverdrive/events{/privacy}","received_events_url":"https://api.github.com/users/catoverdrive/received_events","type":"User","site_admin":false},"assignees":[{"login":"catoverdrive","id":19789871,"avatar_url":"https://avatars3.githubusercontent.com/u/19789871?v=4","gravatar_id":"","url":"https://api.github.com/users/catoverdrive","html_url":"https://github.com/catoverdrive","followers_url":"https://api.github.com/users/catoverdrive/followers","following_url":"https://api.github.com/users/catoverdrive/following{/other_user}","gists_url":"https://api.github.com/users/catoverdrive/gists{/gist_id}","starred_url":"https://api.github.com/users/catoverdrive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catoverdrive/subscriptions","organizations_url":"https://api.github.com/users/catoverdrive/orgs","repos_url":"https://api.github.com/users/catoverdrive/repos","events_url":"https://api.github.com/users/catoverdrive/events{/privacy}","received_events_url":"https://api.github.com/users/catoverdrive/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hail-is/hail/pulls/3608/commits","review_comments_url":"https://api.github.com/repos/hail-is/hail/pulls/3608/comments","review_comment_url":"https://api.github.com/repos/hail-is/hail/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hail-is/hail/issues/3608/comments","statuses_url":"https://api.github.com/repos/hail-is/hail/statuses/d3d232afddabb6c6a8af1fd3bb0489e1c8541550","head":{"label":"jigold:jg_func_reg","ref":"jg_func_reg","sha":"d3d232afddabb6c6a8af1fd3bb0489e1c8541550","user":{"login":"jigold","id":1693348,"avatar_url":"https://avatars2.githubusercontent.com/u/1693348?v=4","gravatar_id":"","url":"https://api.github.com/users/jigold","html_url":"https://github.com/jigold","followers_url":"https://api.github.com/users/jigold/followers","following_url":"https://api.github.com/users/jigold/following{/other_user}","gists_url":"https://api.github.com/users/jigold/gists{/gist_id}","starred_url":"https://api.github.com/users/jigold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jigold/subscriptions","organizations_url":"https://api.github.com/users/jigold/orgs","repos_url":"https://api.github.com/users/jigold/repos","events_url":"https://api.github.com/users/jigold/events{/privacy}","received_events_url":"https://api.github.com/users/jigold/received_events","type":"User","site_admin":false},"repo":{"id":64695542,"name":"hail","full_name":"jigold/hail","owner":{"login":"jigold","id":1693348,"avatar_url":"https://avatars2.githubusercontent.com/u/1693348?v=4","gravatar_id":"","url":"https://api.github.com/users/jigold","html_url":"https://github.com/jigold","followers_url":"https://api.github.com/users/jigold/followers","following_url":"https://api.github.com/users/jigold/following{/other_user}","gists_url":"https://api.github.com/users/jigold/gists{/gist_id}","starred_url":"https://api.github.com/users/jigold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jigold/subscriptions","organizations_url":"https://api.github.com/users/jigold/orgs","repos_url":"https://api.github.com/users/jigold/repos","events_url":"https://api.github.com/users/jigold/events{/privacy}","received_events_url":"https://api.github.com/users/jigold/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jigold/hail","description":"Hail, a framework for scalable genetic data analysis","fork":true,"url":"https://api.github.com/repos/jigold/hail","forks_url":"https://api.github.com/repos/jigold/hail/forks","keys_url":"https://api.github.com/repos/jigold/hail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jigold/hail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jigold/hail/teams","hooks_url":"https://api.github.com/repos/jigold/hail/hooks","issue_events_url":"https://api.github.com/repos/jigold/hail/issues/events{/number}","events_url":"https://api.github.com/repos/jigold/hail/events","assignees_url":"https://api.github.com/repos/jigold/hail/assignees{/user}","branches_url":"https://api.github.com/repos/jigold/hail/branches{/branch}","tags_url":"https://api.github.com/repos/jigold/hail/tags","blobs_url":"https://api.github.com/repos/jigold/hail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jigold/hail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jigold/hail/git/refs{/sha}","trees_url":"https://api.github.com/repos/jigold/hail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jigold/hail/statuses/{sha}","languages_url":"https://api.github.com/repos/jigold/hail/languages","stargazers_url":"https://api.github.com/repos/jigold/hail/stargazers","contributors_url":"https://api.github.com/repos/jigold/hail/contributors","subscribers_url":"https://api.github.com/repos/jigold/hail/subscribers","subscription_url":"https://api.github.com/repos/jigold/hail/subscription","commits_url":"https://api.github.com/repos/jigold/hail/commits{/sha}","git_commits_url":"https://api.github.com/repos/jigold/hail/git/commits{/sha}","comments_url":"https://api.github.com/repos/jigold/hail/comments{/number}","issue_comment_url":"https://api.github.com/repos/jigold/hail/issues/comments{/number}","contents_url":"https://api.github.com/repos/jigold/hail/contents/{+path}","compare_url":"https://api.github.com/repos/jigold/hail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jigold/hail/merges","archive_url":"https://api.github.com/repos/jigold/hail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jigold/hail/downloads","issues_url":"https://api.github.com/repos/jigold/hail/issues{/number}","pulls_url":"https://api.github.com/repos/jigold/hail/pulls{/number}","milestones_url":"https://api.github.com/repos/jigold/hail/milestones{/number}","notifications_url":"https://api.github.com/repos/jigold/hail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jigold/hail/labels{/name}","releases_url":"https://api.github.com/repos/jigold/hail/releases{/id}","deployments_url":"https://api.github.com/repos/jigold/hail/deployments","created_at":"2016-08-01T19:28:56Z","updated_at":"2018-05-16T15:28:15Z","pushed_at":"2018-05-16T22:31:53Z","git_url":"git://github.com/jigold/hail.git","ssh_url":"git@github.com:jigold/hail.git","clone_url":"https://github.com/jigold/hail.git","svn_url":"https://github.com/jigold/hail","homepage":"","size":42972,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"hail-is:master","ref":"master","sha":"d1584d54057c9da54df29108d43ce09f36f8fa95","user":{"login":"hail-is","id":20861792,"avatar_url":"https://avatars1.githubusercontent.com/u/20861792?v=4","gravatar_id":"","url":"https://api.github.com/users/hail-is","html_url":"https://github.com/hail-is","followers_url":"https://api.github.com/users/hail-is/followers","following_url":"https://api.github.com/users/hail-is/following{/other_user}","gists_url":"https://api.github.com/users/hail-is/gists{/gist_id}","starred_url":"https://api.github.com/users/hail-is/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hail-is/subscriptions","organizations_url":"https://api.github.com/users/hail-is/orgs","repos_url":"https://api.github.com/users/hail-is/repos","events_url":"https://api.github.com/users/hail-is/events{/privacy}","received_events_url":"https://api.github.com/users/hail-is/received_events","type":"Organization","site_admin":false},"repo":{"id":45069467,"name":"hail","full_name":"hail-is/hail","owner":{"login":"hail-is","id":20861792,"avatar_url":"https://avatars1.githubusercontent.com/u/20861792?v=4","gravatar_id":"","url":"https://api.github.com/users/hail-is","html_url":"https://github.com/hail-is","followers_url":"https://api.github.com/users/hail-is/followers","following_url":"https://api.github.com/users/hail-is/following{/other_user}","gists_url":"https://api.github.com/users/hail-is/gists{/gist_id}","starred_url":"https://api.github.com/users/hail-is/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hail-is/subscriptions","organizations_url":"https://api.github.com/users/hail-is/orgs","repos_url":"https://api.github.com/users/hail-is/repos","events_url":"https://api.github.com/users/hail-is/events{/privacy}","received_events_url":"https://api.github.com/users/hail-is/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hail-is/hail","description":"Scalable genomic data analysis.","fork":false,"url":"https://api.github.com/repos/hail-is/hail","forks_url":"https://api.github.com/repos/hail-is/hail/forks","keys_url":"https://api.github.com/repos/hail-is/hail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hail-is/hail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hail-is/hail/teams","hooks_url":"https://api.github.com/repos/hail-is/hail/hooks","issue_events_url":"https://api.github.com/repos/hail-is/hail/issues/events{/number}","events_url":"https://api.github.com/repos/hail-is/hail/events","assignees_url":"https://api.github.com/repos/hail-is/hail/assignees{/user}","branches_url":"https://api.github.com/repos/hail-is/hail/branches{/branch}","tags_url":"https://api.github.com/repos/hail-is/hail/tags","blobs_url":"https://api.github.com/repos/hail-is/hail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hail-is/hail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hail-is/hail/git/refs{/sha}","trees_url":"https://api.github.com/repos/hail-is/hail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hail-is/hail/statuses/{sha}","languages_url":"https://api.github.com/repos/hail-is/hail/languages","stargazers_url":"https://api.github.com/repos/hail-is/hail/stargazers","contributors_url":"https://api.github.com/repos/hail-is/hail/contributors","subscribers_url":"https://api.github.com/repos/hail-is/hail/subscribers","subscription_url":"https://api.github.com/repos/hail-is/hail/subscription","commits_url":"https://api.github.com/repos/hail-is/hail/commits{/sha}","git_commits_url":"https://api.github.com/repos/hail-is/hail/git/commits{/sha}","comments_url":"https://api.github.com/repos/hail-is/hail/comments{/number}","issue_comment_url":"https://api.github.com/repos/hail-is/hail/issues/comments{/number}","contents_url":"https://api.github.com/repos/hail-is/hail/contents/{+path}","compare_url":"https://api.github.com/repos/hail-is/hail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hail-is/hail/merges","archive_url":"https://api.github.com/repos/hail-is/hail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hail-is/hail/downloads","issues_url":"https://api.github.com/repos/hail-is/hail/issues{/number}","pulls_url":"https://api.github.com/repos/hail-is/hail/pulls{/number}","milestones_url":"https://api.github.com/repos/hail-is/hail/milestones{/number}","notifications_url":"https://api.github.com/repos/hail-is/hail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hail-is/hail/labels{/name}","releases_url":"https://api.github.com/repos/hail-is/hail/releases{/id}","deployments_url":"https://api.github.com/repos/hail-is/hail/deployments","created_at":"2015-10-27T20:55:42Z","updated_at":"2018-05-17T19:21:38Z","pushed_at":"2018-05-17T19:56:45Z","git_url":"git://github.com/hail-is/hail.git","ssh_url":"git@github.com:hail-is/hail.git","clone_url":"https://github.com/hail-is/hail.git","svn_url":"https://github.com/hail-is/hail","homepage":"https://hail.is","size":35585,"stargazers_count":320,"watchers_count":320,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":98,"mirror_url":null,"archived":false,"open_issues_count":140,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":98,"open_issues":140,"watchers":320,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hail-is/hail/pulls/3608"},"html":{"href":"https://github.com/hail-is/hail/pull/3608"},"issue":{"href":"https://api.github.com/repos/hail-is/hail/issues/3608"},"comments":{"href":"https://api.github.com/repos/hail-is/hail/issues/3608/comments"},"review_comments":{"href":"https://api.github.com/repos/hail-is/hail/pulls/3608/comments"},"review_comment":{"href":"https://api.github.com/repos/hail-is/hail/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hail-is/hail/pulls/3608/commits"},"statuses":{"href":"https://api.github.com/repos/hail-is/hail/statuses/d3d232afddabb6c6a8af1fd3bb0489e1c8541550"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"catoverdrive"}}