{"action":"created","comment":{"url":"https://api.github.com/repos/m3db/m3db/pulls/comments/202110710","pull_request_review_id":136719843,"id":202110710,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjExMDcxMA==","diff_hunk":"@@ -0,0 +1,178 @@\n+// Copyright (c) 2018 Uber Technologies, Inc.\n+//\n+// Permission is hereby granted, free of charge, to any person obtaining a copy\n+// of this software and associated documentation files (the \"Software\"), to deal\n+// in the Software without restriction, including without limitation the rights\n+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+// copies of the Software, and to permit persons to whom the Software is\n+// furnished to do so, subject to the following conditions:\n+//\n+// The above copyright notice and this permission notice shall be included in\n+// all copies or substantial portions of the Software.\n+//\n+// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+// THE SOFTWARE.\n+\n+package block\n+\n+import (\n+\t\"testing\"\n+\t\"time\"\n+\n+\t\"github.com/m3db/m3db/src/coordinator/models\"\n+\t\"github.com/m3db/m3db/src/dbnode/encoding\"\n+\t\"github.com/m3db/m3db/src/dbnode/ts\"\n+\t\"github.com/m3db/m3x/ident\"\n+\txtime \"github.com/m3db/m3x/time\"\n+\n+\t\"github.com/golang/mock/gomock\"\n+\t\"github.com/stretchr/testify/assert\"\n+\t\"github.com/stretchr/testify/require\"\n+)\n+\n+func newSeriesBlock(seriesIterator encoding.SeriesIterator, start, end time.Time) SeriesBlock {\n+\treturn SeriesBlock{\n+\t\tstart:          start,\n+\t\tend:            end,\n+\t\tseriesIterator: seriesIterator,\n+\t}\n+}\n+\n+func newMultiNamespaceSeries(ctrl *gomock.Controller, now time.Time, t *testing.T) ([]SeriesBlocks, []SeriesBlocks) {\n+\trawTagsOne := []string{\"foo\", \"bar\", \"same\", \"tag\"}\n+\tseriesOneIterators := []encoding.SeriesIterator{\n+\t\tnewMockIterator(t, \"test_one\", rawTagsOne, ctrl, []ts.Datapoint{\n+\t\t\t{Timestamp: now, Value: 1},\n+\t\t\t{Timestamp: now.Add(90 * time.Second), Value: 2},\n+\t\t\t{Timestamp: now.Add(5 * time.Minute), Value: 3},\n+\t\t}),\n+\t\tnewMockIterator(t, \"test_one\", rawTagsOne, ctrl, []ts.Datapoint{\n+\t\t\t{},\n+\t\t\t{Timestamp: now.Add(17 * time.Minute), Value: 5},\n+\t\t\t{Timestamp: now.Add(19 * time.Minute), Value: 6},\n+\t\t}),\n+\t}\n+\tseriesOneBlockOne := newSeriesBlock(seriesOneIterators[0], now, now.Add(10*time.Minute))\n+\tseriesOneBlockTwo := newSeriesBlock(seriesOneIterators[1], now.Add(10*time.Minute), now.Add(20*time.Minute))\n+\ttagsOne, err := ident.NewTagStringsIterator(rawTagsOne...)\n+\trequire.NoError(t, err)\n+\n+\tseriesOne := SeriesBlocks{\n+\t\tBlocks: []SeriesBlock{seriesOneBlockOne, seriesOneBlockTwo},\n+\t\tID:     ident.StringID(\"test_one\"),\n+\t\tTags:   tagsOne,\n+\t}\n+\n+\trawTagsTwo := []string{\"biz\", \"baz\", \"same\", \"tag\"}\n+\tseriesIteratorsTwo := []encoding.SeriesIterator{","path":"src/coordinator/ts/m3db/block/convertor_test.go","position":72,"original_position":72,"commit_id":"bf1c218b94c7f9607ca65d906aba539bdbe3ccb2","original_commit_id":"bf1c218b94c7f9607ca65d906aba539bdbe3ccb2","user":{"login":"nikunjgit","id":1733496,"node_id":"MDQ6VXNlcjE3MzM0OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1733496?v=4","gravatar_id":"","url":"https://api.github.com/users/nikunjgit","html_url":"https://github.com/nikunjgit","followers_url":"https://api.github.com/users/nikunjgit/followers","following_url":"https://api.github.com/users/nikunjgit/following{/other_user}","gists_url":"https://api.github.com/users/nikunjgit/gists{/gist_id}","starred_url":"https://api.github.com/users/nikunjgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikunjgit/subscriptions","organizations_url":"https://api.github.com/users/nikunjgit/orgs","repos_url":"https://api.github.com/users/nikunjgit/repos","events_url":"https://api.github.com/users/nikunjgit/events{/privacy}","received_events_url":"https://api.github.com/users/nikunjgit/received_events","type":"User","site_admin":false},"body":"also maybe call it seriesTwoIterators to be consistent ?","created_at":"2018-07-12T17:09:24Z","updated_at":"2018-07-12T17:43:42Z","html_url":"https://github.com/m3db/m3db/pull/778#discussion_r202110710","pull_request_url":"https://api.github.com/repos/m3db/m3db/pulls/778","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/m3db/m3db/pulls/comments/202110710"},"html":{"href":"https://github.com/m3db/m3db/pull/778#discussion_r202110710"},"pull_request":{"href":"https://api.github.com/repos/m3db/m3db/pulls/778"}},"in_reply_to_id":202110643},"pull_request":{"url":"https://api.github.com/repos/m3db/m3db/pulls/778","id":198786893,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4Nzg2ODkz","html_url":"https://github.com/m3db/m3db/pull/778","diff_url":"https://github.com/m3db/m3db/pull/778.diff","patch_url":"https://github.com/m3db/m3db/pull/778.patch","issue_url":"https://api.github.com/repos/m3db/m3db/issues/778","number":778,"state":"open","locked":false,"title":"Add StepIter to blocks","user":{"login":"benraskin92","id":4688976,"node_id":"MDQ6VXNlcjQ2ODg5NzY=","avatar_url":"https://avatars0.githubusercontent.com/u/4688976?v=4","gravatar_id":"","url":"https://api.github.com/users/benraskin92","html_url":"https://github.com/benraskin92","followers_url":"https://api.github.com/users/benraskin92/followers","following_url":"https://api.github.com/users/benraskin92/following{/other_user}","gists_url":"https://api.github.com/users/benraskin92/gists{/gist_id}","starred_url":"https://api.github.com/users/benraskin92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benraskin92/subscriptions","organizations_url":"https://api.github.com/users/benraskin92/orgs","repos_url":"https://api.github.com/users/benraskin92/repos","events_url":"https://api.github.com/users/benraskin92/events{/privacy}","received_events_url":"https://api.github.com/users/benraskin92/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-02T20:53:59Z","updated_at":"2018-07-12T17:43:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78d553189ae10ad955ec159f8e124bc40ad761ae","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/m3db/m3db/pulls/778/commits","review_comments_url":"https://api.github.com/repos/m3db/m3db/pulls/778/comments","review_comment_url":"https://api.github.com/repos/m3db/m3db/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m3db/m3db/issues/778/comments","statuses_url":"https://api.github.com/repos/m3db/m3db/statuses/bf1c218b94c7f9607ca65d906aba539bdbe3ccb2","head":{"label":"m3db:braskin/block_iters","ref":"braskin/block_iters","sha":"bf1c218b94c7f9607ca65d906aba539bdbe3ccb2","user":{"login":"m3db","id":19937171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTM3MTcx","avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":61153677,"node_id":"MDEwOlJlcG9zaXRvcnk2MTE1MzY3Nw==","name":"m3db","full_name":"m3db/m3db","owner":{"login":"m3db","id":19937171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTM3MTcx","avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3db","description":"A distributed time series database using M3TSZ float64 compression ","fork":false,"url":"https://api.github.com/repos/m3db/m3db","forks_url":"https://api.github.com/repos/m3db/m3db/forks","keys_url":"https://api.github.com/repos/m3db/m3db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3db/teams","hooks_url":"https://api.github.com/repos/m3db/m3db/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3db/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3db/events","assignees_url":"https://api.github.com/repos/m3db/m3db/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3db/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3db/tags","blobs_url":"https://api.github.com/repos/m3db/m3db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3db/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3db/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3db/languages","stargazers_url":"https://api.github.com/repos/m3db/m3db/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3db/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3db/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3db/subscription","commits_url":"https://api.github.com/repos/m3db/m3db/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3db/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3db/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3db/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3db/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3db/merges","archive_url":"https://api.github.com/repos/m3db/m3db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3db/downloads","issues_url":"https://api.github.com/repos/m3db/m3db/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3db/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3db/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3db/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3db/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3db/deployments","created_at":"2016-06-14T20:29:45Z","updated_at":"2018-07-11T14:59:29Z","pushed_at":"2018-07-12T16:05:34Z","git_url":"git://github.com/m3db/m3db.git","ssh_url":"git@github.com:m3db/m3db.git","clone_url":"https://github.com/m3db/m3db.git","svn_url":"https://github.com/m3db/m3db","homepage":"https://m3db.github.io/m3db/","size":12677,"stargazers_count":185,"watchers_count":185,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":114,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":15,"open_issues":114,"watchers":185,"default_branch":"master"}},"base":{"label":"m3db:lazyEval","ref":"lazyEval","sha":"49f762db2d65ff6cb0d92891535ae9d41f065096","user":{"login":"m3db","id":19937171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTM3MTcx","avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":61153677,"node_id":"MDEwOlJlcG9zaXRvcnk2MTE1MzY3Nw==","name":"m3db","full_name":"m3db/m3db","owner":{"login":"m3db","id":19937171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTM3MTcx","avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3db","description":"A distributed time series database using M3TSZ float64 compression ","fork":false,"url":"https://api.github.com/repos/m3db/m3db","forks_url":"https://api.github.com/repos/m3db/m3db/forks","keys_url":"https://api.github.com/repos/m3db/m3db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3db/teams","hooks_url":"https://api.github.com/repos/m3db/m3db/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3db/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3db/events","assignees_url":"https://api.github.com/repos/m3db/m3db/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3db/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3db/tags","blobs_url":"https://api.github.com/repos/m3db/m3db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3db/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3db/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3db/languages","stargazers_url":"https://api.github.com/repos/m3db/m3db/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3db/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3db/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3db/subscription","commits_url":"https://api.github.com/repos/m3db/m3db/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3db/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3db/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3db/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3db/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3db/merges","archive_url":"https://api.github.com/repos/m3db/m3db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3db/downloads","issues_url":"https://api.github.com/repos/m3db/m3db/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3db/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3db/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3db/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3db/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3db/deployments","created_at":"2016-06-14T20:29:45Z","updated_at":"2018-07-11T14:59:29Z","pushed_at":"2018-07-12T16:05:34Z","git_url":"git://github.com/m3db/m3db.git","ssh_url":"git@github.com:m3db/m3db.git","clone_url":"https://github.com/m3db/m3db.git","svn_url":"https://github.com/m3db/m3db","homepage":"https://m3db.github.io/m3db/","size":12677,"stargazers_count":185,"watchers_count":185,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":114,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":15,"open_issues":114,"watchers":185,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/m3db/m3db/pulls/778"},"html":{"href":"https://github.com/m3db/m3db/pull/778"},"issue":{"href":"https://api.github.com/repos/m3db/m3db/issues/778"},"comments":{"href":"https://api.github.com/repos/m3db/m3db/issues/778/comments"},"review_comments":{"href":"https://api.github.com/repos/m3db/m3db/pulls/778/comments"},"review_comment":{"href":"https://api.github.com/repos/m3db/m3db/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m3db/m3db/pulls/778/commits"},"statuses":{"href":"https://api.github.com/repos/m3db/m3db/statuses/bf1c218b94c7f9607ca65d906aba539bdbe3ccb2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nikunjgit"}}