{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/6582","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/6582/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/6582/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/6582/events","html_url":"https://github.com/cockroachdb/cockroach/pull/6582","id":153781980,"number":6582,"title":"sql: add APIs for output streams and routers","user":{"login":"RaduBerinde","id":16544120,"avatar_url":"https://avatars.githubusercontent.com/u/16544120?v=3","gravatar_id":"","url":"https://api.github.com/users/RaduBerinde","html_url":"https://github.com/RaduBerinde","followers_url":"https://api.github.com/users/RaduBerinde/followers","following_url":"https://api.github.com/users/RaduBerinde/following{/other_user}","gists_url":"https://api.github.com/users/RaduBerinde/gists{/gist_id}","starred_url":"https://api.github.com/users/RaduBerinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaduBerinde/subscriptions","organizations_url":"https://api.github.com/users/RaduBerinde/orgs","repos_url":"https://api.github.com/users/RaduBerinde/repos","events_url":"https://api.github.com/users/RaduBerinde/events{/privacy}","received_events_url":"https://api.github.com/users/RaduBerinde/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"andreimatei","id":377201,"avatar_url":"https://avatars.githubusercontent.com/u/377201?v=3","gravatar_id":"","url":"https://api.github.com/users/andreimatei","html_url":"https://github.com/andreimatei","followers_url":"https://api.github.com/users/andreimatei/followers","following_url":"https://api.github.com/users/andreimatei/following{/other_user}","gists_url":"https://api.github.com/users/andreimatei/gists{/gist_id}","starred_url":"https://api.github.com/users/andreimatei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreimatei/subscriptions","organizations_url":"https://api.github.com/users/andreimatei/orgs","repos_url":"https://api.github.com/users/andreimatei/repos","events_url":"https://api.github.com/users/andreimatei/events{/privacy}","received_events_url":"https://api.github.com/users/andreimatei/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2016-05-09T13:55:58Z","updated_at":"2016-05-10T10:49:07Z","closed_at":"2016-05-09T19:54:21Z","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/6582","html_url":"https://github.com/cockroachdb/cockroach/pull/6582","diff_url":"https://github.com/cockroachdb/cockroach/pull/6582.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/6582.patch"},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/6582)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/218123102","html_url":"https://github.com/cockroachdb/cockroach/pull/6582#issuecomment-218123102","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/6582","id":218123102,"user":{"login":"bdarnell","id":160562,"avatar_url":"https://avatars.githubusercontent.com/u/160562?v=3","gravatar_id":"","url":"https://api.github.com/users/bdarnell","html_url":"https://github.com/bdarnell","followers_url":"https://api.github.com/users/bdarnell/followers","following_url":"https://api.github.com/users/bdarnell/following{/other_user}","gists_url":"https://api.github.com/users/bdarnell/gists{/gist_id}","starred_url":"https://api.github.com/users/bdarnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdarnell/subscriptions","organizations_url":"https://api.github.com/users/bdarnell/orgs","repos_url":"https://api.github.com/users/bdarnell/repos","events_url":"https://api.github.com/users/bdarnell/events{/privacy}","received_events_url":"https://api.github.com/users/bdarnell/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T10:49:07Z","updated_at":"2016-05-10T10:49:07Z","body":"\n\n\n\n\n\nReview status: 4 of 5 files reviewed at latest revision, 6 unresolved discussions, all commit checks successful.\n\n---\n\n*[sql/distsql/data.proto, line 112 \\[r1\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/6582#-KHKu1srsR6Pwjvg0rr7:-KHPFvnjMiMT4Pvl_3BL:-547621955) ([raw file](https://github.com/cockroachdb/cockroach/blob/4641b9833053432398c36c4270f1b05df577a970/sql/distsql/data.proto#L112)):*\n<details><summary><i>Previously, RaduBerinde wrote…</i></summary>\n> Ok, I see now. The generated code for `oneof` is less than ideal, that's why we're not using it everywhere. Moved to a union which uses `onlyone`.</details>\nOriginally, we used `onlyone` instead of `oneof` because the latter wasn't supported in Go at the time (it was a noop, which is why we had both in #529 and later removed `oneof`). Since `oneof` support was added, we've mostly stuck with `onlyone` because the generated API is nicer for our purposes (using type switches, although this comes at the expense of being able to have multiple fields with the same type but different names)\n\n---\n\n*[sql/distsql/server.go, line 79 \\[r5\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/6582#-KHPFp9XMoX4_L6xOgSg:-KHPFp9XMoX4_L6xOgSh:196546559) ([raw file](https://github.com/cockroachdb/cockroach/blob/752504602c9be470fb1a70b2ee470cb38bd0941a/sql/distsql/server.go#L79)):*\n> ```Go\n> }\n> \n> // TODO(radu): prevent varcheck from complaining about (yet) unused constants\n> ```\n\nWe have a whitelist in check-style.sh to exclude generated files; we should just add .pb.go to the list.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/6582)*\n<!-- Sent from Reviewable.io -->\n"}}