{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8682","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8682/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8682/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8682/events","html_url":"https://github.com/cockroachdb/cockroach/pull/8682","id":172062062,"number":8682,"title":"time series: Add Downsampling Iterator","user":{"login":"mrtracy","id":6969858,"avatar_url":"https://avatars.githubusercontent.com/u/6969858?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtracy","html_url":"https://github.com/mrtracy","followers_url":"https://api.github.com/users/mrtracy/followers","following_url":"https://api.github.com/users/mrtracy/following{/other_user}","gists_url":"https://api.github.com/users/mrtracy/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtracy/subscriptions","organizations_url":"https://api.github.com/users/mrtracy/orgs","repos_url":"https://api.github.com/users/mrtracy/repos","events_url":"https://api.github.com/users/mrtracy/events{/privacy}","received_events_url":"https://api.github.com/users/mrtracy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars.githubusercontent.com/u/7085343?v=3","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"assignees":[{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars.githubusercontent.com/u/7085343?v=3","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-08-19T06:15:26Z","updated_at":"2016-08-22T17:16:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/8682","html_url":"https://github.com/cockroachdb/cockroach/pull/8682","diff_url":"https://github.com/cockroachdb/cockroach/pull/8682.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/8682.patch"},"body":"Adds a \"downsampling iterator\" into the time series query system. This is an\r\nadditional level of iterator between the existing dataSpanIterator and\r\ninterpolatingIterator that is capable of downsampling data to a lower\r\nresolution before interpolating.\r\n\r\nThis commit involved significant augmentation of dataSpanIterator with\r\nadditional functionality, and some refactoring of interpolatingIterator.\r\n\r\nThe downsamplingIterator is not yet being used, as all queries use the 10second\r\nresolution which matches all stored data. However, tests have been added to\r\nverify downsamplingIterator (as well as an additional test to verify\r\ndataSpanIterator on a more complete level). This is being committed before\r\nactual usage in order to reduce the size of the code review.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/8682)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/241483470","html_url":"https://github.com/cockroachdb/cockroach/pull/8682#issuecomment-241483470","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8682","id":241483470,"user":{"login":"mrtracy","id":6969858,"avatar_url":"https://avatars.githubusercontent.com/u/6969858?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtracy","html_url":"https://github.com/mrtracy","followers_url":"https://api.github.com/users/mrtracy/followers","following_url":"https://api.github.com/users/mrtracy/following{/other_user}","gists_url":"https://api.github.com/users/mrtracy/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtracy/subscriptions","organizations_url":"https://api.github.com/users/mrtracy/orgs","repos_url":"https://api.github.com/users/mrtracy/repos","events_url":"https://api.github.com/users/mrtracy/events{/privacy}","received_events_url":"https://api.github.com/users/mrtracy/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T17:16:30Z","updated_at":"2016-08-22T17:16:30Z","body":"\n\n\n\nReview status: all files reviewed at latest revision, 5 unresolved discussions, all commit checks successful.\n\n---\n\n*[ts/query.go, line 182 \\[r1\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/8682#-KPYuIHRy7p8fkt66iH1:-KPnDjaTgf_jaJKwgVh9:b-896fix) ([raw file](https://github.com/cockroachdb/cockroach/blob/63ef8d941002029f59f05cb6304ed996be0570d8/ts/query.go#L182)):*\n<details><summary><i>Previously, a-robinson (Alex Robinson) wrote…</i></summary>\n> forgot to finish the thought?\n</details>\nDone.\n\n---\n\n*[ts/query.go, line 215 \\[r1\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/8682#-KPYuYA7sErP7Pq1jKW5:-KPnDjNEm-LqC6JyHQfh:b-896fix) ([raw file](https://github.com/cockroachdb/cockroach/blob/63ef8d941002029f59f05cb6304ed996be0570d8/ts/query.go#L215)):*\n<details><summary><i>Previously, a-robinson (Alex Robinson) wrote…</i></summary>\n> forgot to finish the thought?\n</details>\nDone.\n\n---\n\n*[ts/query.go, line 223 \\[r1\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/8682#-KPYuiWNbdDDyjegjCRH:-KPnDuaPnn4w-OK3cBLA:bns5334) ([raw file](https://github.com/cockroachdb/cockroach/blob/63ef8d941002029f59f05cb6304ed996be0570d8/ts/query.go#L223)):*\n<details><summary><i>Previously, a-robinson (Alex Robinson) wrote…</i></summary>\n> I take it that we can depend on all dataSpans having at least one data point?\n</details>\nYes, this is enforced in dataSpan.addData(), which is the only way that these structures are initialized.\n\n---\n\n*[ts/query_test.go, line 159 \\[r1\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/8682#-KPZ3PW4dX6o5GOO9kK4:-KPZPpfpDD-v8W9M6IpY:b-9esvfz) ([raw file](https://github.com/cockroachdb/cockroach/blob/63ef8d941002029f59f05cb6304ed996be0570d8/ts/query_test.go#L159)):*\n<details><summary><i>Previously, a-robinson (Alex Robinson) wrote…</i></summary>\n> Is this the style of test failure messages used throughout the code base? I only ask because it's the reverse of the recommended go style - https://github.com/golang/go/wiki/CodeReviewComments#useful-test-failures\n</details>\nHuh, I didn't even know that was a suggested style. We do not enforce this anywhere, as long as the individual message is legible.\n\n---\n\n*[ts/query_test.go, line 504 \\[r1\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/8682#-KP_gRcmFDj3o3WqXppb:-KPnF6RdWIZJkz-89X66:bs7f4mp) ([raw file](https://github.com/cockroachdb/cockroach/blob/63ef8d941002029f59f05cb6304ed996be0570d8/ts/query_test.go#L504)):*\n<details><summary><i>Previously, tamird (Tamir Duberstein) wrote…</i></summary>\n> forgot to remove?\n</details>\nyup, removed.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/8682)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"mrtracy"}}