{"action":"created","comment":{"url":"https://api.github.com/repos/manahl/arctic/pulls/comments/60991788","id":60991788,"diff_hunk":"@@ -163,6 +160,41 @@ def get_info(self, version):\n         ret['rows'] = int(version['up_to'])\n         return ret\n \n+    def chunked_read(self, arctic_lib, version, symbol, date_range, read_preference=None):\n+        collection = arctic_lib.get_top_level_collection()\n+        if read_preference:\n+            collection = collection.with_options(read_preference=read_preference)\n+        return self._do_chunked_read(collection, version, symbol, date_range)\n+\n+    def _do_chunked_read(self, collection, version, symbol, date_range):\n+        segment_count = version.get('segment_count', None)\n+\n+        spec = {'symbol': symbol,\n+                'parent': version.get('base_version_id', version['_id']),\n+                }\n+\n+        if date_range is not None:\n+            spec['segment'] = date_range.mongo_query()","path":"arctic/store/_ndarray_store.py","position":77,"original_position":72,"commit_id":"1a9c36fd17a4aebb5cbcca3b4fdd53dc9a1ed1ed","original_commit_id":"79b8190435586260ee954f9a4917d8e0448bd18b","user":{"login":"jamesblackburn","id":55716,"avatar_url":"https://avatars.githubusercontent.com/u/55716?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesblackburn","html_url":"https://github.com/jamesblackburn","followers_url":"https://api.github.com/users/jamesblackburn/followers","following_url":"https://api.github.com/users/jamesblackburn/following{/other_user}","gists_url":"https://api.github.com/users/jamesblackburn/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesblackburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesblackburn/subscriptions","organizations_url":"https://api.github.com/users/jamesblackburn/orgs","repos_url":"https://api.github.com/users/jamesblackburn/repos","events_url":"https://api.github.com/users/jamesblackburn/events{/privacy}","received_events_url":"https://api.github.com/users/jamesblackburn/received_events","type":"User","site_admin":false},"body":"Would something like:\r\n\r\n- Chunked by year\r\n- TS containing: 2015/01/01  ;  2015/06/01 ; 2016/01/01\r\n- Query 2015/05/30 -> 2016/01/02 should return two rows \r\n\r\nwork?","created_at":"2016-04-25T21:21:49Z","updated_at":"2016-04-25T21:21:50Z","html_url":"https://github.com/manahl/arctic/pull/122#discussion_r60991788","pull_request_url":"https://api.github.com/repos/manahl/arctic/pulls/122","_links":{"self":{"href":"https://api.github.com/repos/manahl/arctic/pulls/comments/60991788"},"html":{"href":"https://github.com/manahl/arctic/pull/122#discussion_r60991788"},"pull_request":{"href":"https://api.github.com/repos/manahl/arctic/pulls/122"}}},"pull_request":{"url":"https://api.github.com/repos/manahl/arctic/pulls/122","id":64683103,"html_url":"https://github.com/manahl/arctic/pull/122","diff_url":"https://github.com/manahl/arctic/pull/122.diff","patch_url":"https://github.com/manahl/arctic/pull/122.patch","issue_url":"https://api.github.com/repos/manahl/arctic/issues/122","number":122,"state":"open","locked":false,"title":"Support for new chunkable Version Store type","user":{"login":"bmoscon","id":1280059,"avatar_url":"https://avatars.githubusercontent.com/u/1280059?v=3","gravatar_id":"","url":"https://api.github.com/users/bmoscon","html_url":"https://github.com/bmoscon","followers_url":"https://api.github.com/users/bmoscon/followers","following_url":"https://api.github.com/users/bmoscon/following{/other_user}","gists_url":"https://api.github.com/users/bmoscon/gists{/gist_id}","starred_url":"https://api.github.com/users/bmoscon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmoscon/subscriptions","organizations_url":"https://api.github.com/users/bmoscon/orgs","repos_url":"https://api.github.com/users/bmoscon/repos","events_url":"https://api.github.com/users/bmoscon/events{/privacy}","received_events_url":"https://api.github.com/users/bmoscon/received_events","type":"User","site_admin":false},"body":"New store type allows user to specify the chunking method for the dataframe/series (Daily, Monthly, Yearly). Requires a datetime-indexed dataframe/series","created_at":"2016-03-30T19:28:52Z","updated_at":"2016-04-25T21:21:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68ce8a7889d56b7f3ca0b05f11375e7637b1280c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/manahl/arctic/pulls/122/commits","review_comments_url":"https://api.github.com/repos/manahl/arctic/pulls/122/comments","review_comment_url":"https://api.github.com/repos/manahl/arctic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manahl/arctic/issues/122/comments","statuses_url":"https://api.github.com/repos/manahl/arctic/statuses/1a9c36fd17a4aebb5cbcca3b4fdd53dc9a1ed1ed","head":{"label":"manahl:atlas","ref":"atlas","sha":"1a9c36fd17a4aebb5cbcca3b4fdd53dc9a1ed1ed","user":{"login":"manahl","id":5859004,"avatar_url":"https://avatars.githubusercontent.com/u/5859004?v=3","gravatar_id":"","url":"https://api.github.com/users/manahl","html_url":"https://github.com/manahl","followers_url":"https://api.github.com/users/manahl/followers","following_url":"https://api.github.com/users/manahl/following{/other_user}","gists_url":"https://api.github.com/users/manahl/gists{/gist_id}","starred_url":"https://api.github.com/users/manahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manahl/subscriptions","organizations_url":"https://api.github.com/users/manahl/orgs","repos_url":"https://api.github.com/users/manahl/repos","events_url":"https://api.github.com/users/manahl/events{/privacy}","received_events_url":"https://api.github.com/users/manahl/received_events","type":"Organization","site_admin":false},"repo":{"id":36506399,"name":"arctic","full_name":"manahl/arctic","owner":{"login":"manahl","id":5859004,"avatar_url":"https://avatars.githubusercontent.com/u/5859004?v=3","gravatar_id":"","url":"https://api.github.com/users/manahl","html_url":"https://github.com/manahl","followers_url":"https://api.github.com/users/manahl/followers","following_url":"https://api.github.com/users/manahl/following{/other_user}","gists_url":"https://api.github.com/users/manahl/gists{/gist_id}","starred_url":"https://api.github.com/users/manahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manahl/subscriptions","organizations_url":"https://api.github.com/users/manahl/orgs","repos_url":"https://api.github.com/users/manahl/repos","events_url":"https://api.github.com/users/manahl/events{/privacy}","received_events_url":"https://api.github.com/users/manahl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/manahl/arctic","description":"High performance datastore for time series and tick data","fork":false,"url":"https://api.github.com/repos/manahl/arctic","forks_url":"https://api.github.com/repos/manahl/arctic/forks","keys_url":"https://api.github.com/repos/manahl/arctic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manahl/arctic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manahl/arctic/teams","hooks_url":"https://api.github.com/repos/manahl/arctic/hooks","issue_events_url":"https://api.github.com/repos/manahl/arctic/issues/events{/number}","events_url":"https://api.github.com/repos/manahl/arctic/events","assignees_url":"https://api.github.com/repos/manahl/arctic/assignees{/user}","branches_url":"https://api.github.com/repos/manahl/arctic/branches{/branch}","tags_url":"https://api.github.com/repos/manahl/arctic/tags","blobs_url":"https://api.github.com/repos/manahl/arctic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manahl/arctic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manahl/arctic/git/refs{/sha}","trees_url":"https://api.github.com/repos/manahl/arctic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manahl/arctic/statuses/{sha}","languages_url":"https://api.github.com/repos/manahl/arctic/languages","stargazers_url":"https://api.github.com/repos/manahl/arctic/stargazers","contributors_url":"https://api.github.com/repos/manahl/arctic/contributors","subscribers_url":"https://api.github.com/repos/manahl/arctic/subscribers","subscription_url":"https://api.github.com/repos/manahl/arctic/subscription","commits_url":"https://api.github.com/repos/manahl/arctic/commits{/sha}","git_commits_url":"https://api.github.com/repos/manahl/arctic/git/commits{/sha}","comments_url":"https://api.github.com/repos/manahl/arctic/comments{/number}","issue_comment_url":"https://api.github.com/repos/manahl/arctic/issues/comments{/number}","contents_url":"https://api.github.com/repos/manahl/arctic/contents/{+path}","compare_url":"https://api.github.com/repos/manahl/arctic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manahl/arctic/merges","archive_url":"https://api.github.com/repos/manahl/arctic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manahl/arctic/downloads","issues_url":"https://api.github.com/repos/manahl/arctic/issues{/number}","pulls_url":"https://api.github.com/repos/manahl/arctic/pulls{/number}","milestones_url":"https://api.github.com/repos/manahl/arctic/milestones{/number}","notifications_url":"https://api.github.com/repos/manahl/arctic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manahl/arctic/labels{/name}","releases_url":"https://api.github.com/repos/manahl/arctic/releases{/id}","deployments_url":"https://api.github.com/repos/manahl/arctic/deployments","created_at":"2015-05-29T13:37:30Z","updated_at":"2016-04-25T04:38:37Z","pushed_at":"2016-04-22T00:15:13Z","git_url":"git://github.com/manahl/arctic.git","ssh_url":"git@github.com:manahl/arctic.git","clone_url":"https://github.com/manahl/arctic.git","svn_url":"https://github.com/manahl/arctic","homepage":"","size":920,"stargazers_count":289,"watchers_count":289,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":25,"forks":75,"open_issues":25,"watchers":289,"default_branch":"master"}},"base":{"label":"manahl:master","ref":"master","sha":"95c6356f2083485958ef8008b90126d56200a102","user":{"login":"manahl","id":5859004,"avatar_url":"https://avatars.githubusercontent.com/u/5859004?v=3","gravatar_id":"","url":"https://api.github.com/users/manahl","html_url":"https://github.com/manahl","followers_url":"https://api.github.com/users/manahl/followers","following_url":"https://api.github.com/users/manahl/following{/other_user}","gists_url":"https://api.github.com/users/manahl/gists{/gist_id}","starred_url":"https://api.github.com/users/manahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manahl/subscriptions","organizations_url":"https://api.github.com/users/manahl/orgs","repos_url":"https://api.github.com/users/manahl/repos","events_url":"https://api.github.com/users/manahl/events{/privacy}","received_events_url":"https://api.github.com/users/manahl/received_events","type":"Organization","site_admin":false},"repo":{"id":36506399,"name":"arctic","full_name":"manahl/arctic","owner":{"login":"manahl","id":5859004,"avatar_url":"https://avatars.githubusercontent.com/u/5859004?v=3","gravatar_id":"","url":"https://api.github.com/users/manahl","html_url":"https://github.com/manahl","followers_url":"https://api.github.com/users/manahl/followers","following_url":"https://api.github.com/users/manahl/following{/other_user}","gists_url":"https://api.github.com/users/manahl/gists{/gist_id}","starred_url":"https://api.github.com/users/manahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manahl/subscriptions","organizations_url":"https://api.github.com/users/manahl/orgs","repos_url":"https://api.github.com/users/manahl/repos","events_url":"https://api.github.com/users/manahl/events{/privacy}","received_events_url":"https://api.github.com/users/manahl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/manahl/arctic","description":"High performance datastore for time series and tick data","fork":false,"url":"https://api.github.com/repos/manahl/arctic","forks_url":"https://api.github.com/repos/manahl/arctic/forks","keys_url":"https://api.github.com/repos/manahl/arctic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manahl/arctic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manahl/arctic/teams","hooks_url":"https://api.github.com/repos/manahl/arctic/hooks","issue_events_url":"https://api.github.com/repos/manahl/arctic/issues/events{/number}","events_url":"https://api.github.com/repos/manahl/arctic/events","assignees_url":"https://api.github.com/repos/manahl/arctic/assignees{/user}","branches_url":"https://api.github.com/repos/manahl/arctic/branches{/branch}","tags_url":"https://api.github.com/repos/manahl/arctic/tags","blobs_url":"https://api.github.com/repos/manahl/arctic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manahl/arctic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manahl/arctic/git/refs{/sha}","trees_url":"https://api.github.com/repos/manahl/arctic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manahl/arctic/statuses/{sha}","languages_url":"https://api.github.com/repos/manahl/arctic/languages","stargazers_url":"https://api.github.com/repos/manahl/arctic/stargazers","contributors_url":"https://api.github.com/repos/manahl/arctic/contributors","subscribers_url":"https://api.github.com/repos/manahl/arctic/subscribers","subscription_url":"https://api.github.com/repos/manahl/arctic/subscription","commits_url":"https://api.github.com/repos/manahl/arctic/commits{/sha}","git_commits_url":"https://api.github.com/repos/manahl/arctic/git/commits{/sha}","comments_url":"https://api.github.com/repos/manahl/arctic/comments{/number}","issue_comment_url":"https://api.github.com/repos/manahl/arctic/issues/comments{/number}","contents_url":"https://api.github.com/repos/manahl/arctic/contents/{+path}","compare_url":"https://api.github.com/repos/manahl/arctic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manahl/arctic/merges","archive_url":"https://api.github.com/repos/manahl/arctic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manahl/arctic/downloads","issues_url":"https://api.github.com/repos/manahl/arctic/issues{/number}","pulls_url":"https://api.github.com/repos/manahl/arctic/pulls{/number}","milestones_url":"https://api.github.com/repos/manahl/arctic/milestones{/number}","notifications_url":"https://api.github.com/repos/manahl/arctic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manahl/arctic/labels{/name}","releases_url":"https://api.github.com/repos/manahl/arctic/releases{/id}","deployments_url":"https://api.github.com/repos/manahl/arctic/deployments","created_at":"2015-05-29T13:37:30Z","updated_at":"2016-04-25T04:38:37Z","pushed_at":"2016-04-22T00:15:13Z","git_url":"git://github.com/manahl/arctic.git","ssh_url":"git@github.com:manahl/arctic.git","clone_url":"https://github.com/manahl/arctic.git","svn_url":"https://github.com/manahl/arctic","homepage":"","size":920,"stargazers_count":289,"watchers_count":289,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":25,"forks":75,"open_issues":25,"watchers":289,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manahl/arctic/pulls/122"},"html":{"href":"https://github.com/manahl/arctic/pull/122"},"issue":{"href":"https://api.github.com/repos/manahl/arctic/issues/122"},"comments":{"href":"https://api.github.com/repos/manahl/arctic/issues/122/comments"},"review_comments":{"href":"https://api.github.com/repos/manahl/arctic/pulls/122/comments"},"review_comment":{"href":"https://api.github.com/repos/manahl/arctic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manahl/arctic/pulls/122/commits"},"statuses":{"href":"https://api.github.com/repos/manahl/arctic/statuses/1a9c36fd17a4aebb5cbcca3b4fdd53dc9a1ed1ed"}}}}