{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/41598747","id":41598747,"diff_hunk":"@@ -814,11 +863,11 @@ var functions = map[string]*Function{\n \t\tCall:       funcResets,\n \t},\n \t\"round\": {\n-\t\tName:         \"round\",\n-\t\tArgTypes:     []model.ValueType{model.ValVector, model.ValScalar},\n-\t\tOptionalArgs: 1,\n-\t\tReturnType:   model.ValVector,\n-\t\tCall:         funcRound,\n+\t\tName:       \"round\",\n+\t\tArgTypes:   []model.ValueType{model.ValVector, model.ValScalar},\n+\t\tVariadic:   true,","path":"promql/functions.go","position":null,"original_position":115,"commit_id":"daea1d95caa69844f9ab0d9dc424cf49391fbad3","original_commit_id":"8fd43b763a0a0e7a550c654e9f0253d2a3783726","user":{"login":"fabxc","id":4948210,"avatar_url":"https://avatars.githubusercontent.com/u/4948210?v=3","gravatar_id":"","url":"https://api.github.com/users/fabxc","html_url":"https://github.com/fabxc","followers_url":"https://api.github.com/users/fabxc/followers","following_url":"https://api.github.com/users/fabxc/following{/other_user}","gists_url":"https://api.github.com/users/fabxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fabxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabxc/subscriptions","organizations_url":"https://api.github.com/users/fabxc/orgs","repos_url":"https://api.github.com/users/fabxc/repos","events_url":"https://api.github.com/users/fabxc/events{/privacy}","received_events_url":"https://api.github.com/users/fabxc/received_events","type":"User","site_admin":false},"body":"As a callee I have every freedom to ignore arguments or parts of them.\r\n\r\nUltimately, what you want to achieve is a static error on more than one variadic argument – that's the exact opposite of Python, which you name as an example for a use of that feature. Those functions can still throw runtime errors if that's what you are worried about.\r\n\r\nOur expression language is statically typed in general, so scripting languages are not a fair comparison. I don't think it needs a type system more complex than that of an actual programming language.","created_at":"2015-10-09T05:30:31Z","updated_at":"2015-10-09T05:30:31Z","html_url":"https://github.com/prometheus/prometheus/pull/1147#discussion_r41598747","pull_request_url":"https://api.github.com/repos/prometheus/prometheus/pulls/1147","_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/41598747"},"html":{"href":"https://github.com/prometheus/prometheus/pull/1147#discussion_r41598747"},"pull_request":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/1147"}}},"pull_request":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/1147","id":46867723,"html_url":"https://github.com/prometheus/prometheus/pull/1147","diff_url":"https://github.com/prometheus/prometheus/pull/1147.diff","patch_url":"https://github.com/prometheus/prometheus/pull/1147.patch","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/1147","number":1147,"state":"open","locked":false,"title":"Implement label_join.","user":{"login":"varunpatro","id":6943308,"avatar_url":"https://avatars.githubusercontent.com/u/6943308?v=3","gravatar_id":"","url":"https://api.github.com/users/varunpatro","html_url":"https://github.com/varunpatro","followers_url":"https://api.github.com/users/varunpatro/followers","following_url":"https://api.github.com/users/varunpatro/following{/other_user}","gists_url":"https://api.github.com/users/varunpatro/gists{/gist_id}","starred_url":"https://api.github.com/users/varunpatro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varunpatro/subscriptions","organizations_url":"https://api.github.com/users/varunpatro/orgs","repos_url":"https://api.github.com/users/varunpatro/repos","events_url":"https://api.github.com/users/varunpatro/events{/privacy}","received_events_url":"https://api.github.com/users/varunpatro/received_events","type":"User","site_admin":false},"body":"This PR partially completes #959 \r\n\r\nI have implemented the basic features of `label_join`. Yet to cover all cases.\r\n\r\nA few questions on the behavior of `label_join`:\r\n1. What is the expected output if some or all of the src labels are not found? (No change? Or join only found src labels?)\r\n2. Should I create a dst label if the label doesn't exist in the original vector? (Or no change?)\r\n3. Should I drop labels that have empty values? (like `label_replace`)\r\n\r\nA question on implementation:\r\n1. How do I specify variable arguments in the `ArgTypes` of `label_join`.\r\n    ","created_at":"2015-10-06T06:52:14Z","updated_at":"2015-10-09T05:30:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f9445bf32334613fc4abfc310b1135fbd7b4888","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/prometheus/pulls/1147/commits","review_comments_url":"https://api.github.com/repos/prometheus/prometheus/pulls/1147/comments","review_comment_url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/1147/comments","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/daea1d95caa69844f9ab0d9dc424cf49391fbad3","head":{"label":"varunpatro:label_join","ref":"label_join","sha":"daea1d95caa69844f9ab0d9dc424cf49391fbad3","user":{"login":"varunpatro","id":6943308,"avatar_url":"https://avatars.githubusercontent.com/u/6943308?v=3","gravatar_id":"","url":"https://api.github.com/users/varunpatro","html_url":"https://github.com/varunpatro","followers_url":"https://api.github.com/users/varunpatro/followers","following_url":"https://api.github.com/users/varunpatro/following{/other_user}","gists_url":"https://api.github.com/users/varunpatro/gists{/gist_id}","starred_url":"https://api.github.com/users/varunpatro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varunpatro/subscriptions","organizations_url":"https://api.github.com/users/varunpatro/orgs","repos_url":"https://api.github.com/users/varunpatro/repos","events_url":"https://api.github.com/users/varunpatro/events{/privacy}","received_events_url":"https://api.github.com/users/varunpatro/received_events","type":"User","site_admin":false},"repo":{"id":43669187,"name":"prometheus","full_name":"varunpatro/prometheus","owner":{"login":"varunpatro","id":6943308,"avatar_url":"https://avatars.githubusercontent.com/u/6943308?v=3","gravatar_id":"","url":"https://api.github.com/users/varunpatro","html_url":"https://github.com/varunpatro","followers_url":"https://api.github.com/users/varunpatro/followers","following_url":"https://api.github.com/users/varunpatro/following{/other_user}","gists_url":"https://api.github.com/users/varunpatro/gists{/gist_id}","starred_url":"https://api.github.com/users/varunpatro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varunpatro/subscriptions","organizations_url":"https://api.github.com/users/varunpatro/orgs","repos_url":"https://api.github.com/users/varunpatro/repos","events_url":"https://api.github.com/users/varunpatro/events{/privacy}","received_events_url":"https://api.github.com/users/varunpatro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/varunpatro/prometheus","description":"The Prometheus monitoring system and time series database.","fork":true,"url":"https://api.github.com/repos/varunpatro/prometheus","forks_url":"https://api.github.com/repos/varunpatro/prometheus/forks","keys_url":"https://api.github.com/repos/varunpatro/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/varunpatro/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/varunpatro/prometheus/teams","hooks_url":"https://api.github.com/repos/varunpatro/prometheus/hooks","issue_events_url":"https://api.github.com/repos/varunpatro/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/varunpatro/prometheus/events","assignees_url":"https://api.github.com/repos/varunpatro/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/varunpatro/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/varunpatro/prometheus/tags","blobs_url":"https://api.github.com/repos/varunpatro/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/varunpatro/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/varunpatro/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/varunpatro/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/varunpatro/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/varunpatro/prometheus/languages","stargazers_url":"https://api.github.com/repos/varunpatro/prometheus/stargazers","contributors_url":"https://api.github.com/repos/varunpatro/prometheus/contributors","subscribers_url":"https://api.github.com/repos/varunpatro/prometheus/subscribers","subscription_url":"https://api.github.com/repos/varunpatro/prometheus/subscription","commits_url":"https://api.github.com/repos/varunpatro/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/varunpatro/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/varunpatro/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/varunpatro/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/varunpatro/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/varunpatro/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/varunpatro/prometheus/merges","archive_url":"https://api.github.com/repos/varunpatro/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/varunpatro/prometheus/downloads","issues_url":"https://api.github.com/repos/varunpatro/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/varunpatro/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/varunpatro/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/varunpatro/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/varunpatro/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/varunpatro/prometheus/releases{/id}","created_at":"2015-10-05T06:46:30Z","updated_at":"2015-10-05T06:46:32Z","pushed_at":"2015-10-06T17:37:53Z","git_url":"git://github.com/varunpatro/prometheus.git","ssh_url":"git@github.com:varunpatro/prometheus.git","clone_url":"https://github.com/varunpatro/prometheus.git","svn_url":"https://github.com/varunpatro/prometheus","homepage":"http://prometheus.io/","size":8778,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"prometheus:master","ref":"master","sha":"5ebef5c025e491ea49fe6f15e0d82b3845146c88","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":6838921,"name":"prometheus","full_name":"prometheus/prometheus","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/prometheus","description":"The Prometheus monitoring system and time series database.","fork":false,"url":"https://api.github.com/repos/prometheus/prometheus","forks_url":"https://api.github.com/repos/prometheus/prometheus/forks","keys_url":"https://api.github.com/repos/prometheus/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/prometheus/teams","hooks_url":"https://api.github.com/repos/prometheus/prometheus/hooks","issue_events_url":"https://api.github.com/repos/prometheus/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/prometheus/events","assignees_url":"https://api.github.com/repos/prometheus/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/prometheus/tags","blobs_url":"https://api.github.com/repos/prometheus/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/prometheus/languages","stargazers_url":"https://api.github.com/repos/prometheus/prometheus/stargazers","contributors_url":"https://api.github.com/repos/prometheus/prometheus/contributors","subscribers_url":"https://api.github.com/repos/prometheus/prometheus/subscribers","subscription_url":"https://api.github.com/repos/prometheus/prometheus/subscription","commits_url":"https://api.github.com/repos/prometheus/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/prometheus/merges","archive_url":"https://api.github.com/repos/prometheus/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/prometheus/downloads","issues_url":"https://api.github.com/repos/prometheus/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/prometheus/releases{/id}","created_at":"2012-11-24T11:14:12Z","updated_at":"2015-10-08T20:44:14Z","pushed_at":"2015-10-08T21:11:58Z","git_url":"git://github.com/prometheus/prometheus.git","ssh_url":"git@github.com:prometheus/prometheus.git","clone_url":"https://github.com/prometheus/prometheus.git","svn_url":"https://github.com/prometheus/prometheus","homepage":"http://prometheus.io/","size":19249,"stargazers_count":3120,"watchers_count":3120,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":213,"mirror_url":null,"open_issues_count":98,"forks":213,"open_issues":98,"watchers":3120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/1147"},"html":{"href":"https://github.com/prometheus/prometheus/pull/1147"},"issue":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/1147"},"comments":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/1147/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/1147/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/1147/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/prometheus/statuses/daea1d95caa69844f9ab0d9dc424cf49391fbad3"}}}}