payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rapidsai/cudf/pulls/comments/342204053","pull_request_review_id":311272813,"id":342204053,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0MjIwNDA1Mw==","diff_hunk":"@@ -50,5 +52,39 @@ void expect_columns_equal(cudf::column_view lhs, cudf::column_view rhs);\n void expect_equal_buffers(void const* lhs, void const* rhs,\n                           std::size_t size_bytes);\n \n+/**\n+ * @brief Copies the data and bitmask of a `column_view` to the host.\n+ *\n+ * @tparam T The data type of the elements of the `column_view`\n+ * @param c the `column_view` to copy from\n+ * @return std::pair<std::vector<T>, std::vector<bitmask_type>> first is the\n+ *  `column_view`'s data, and second is the column's bitmask.\n+ */\n+template <typename T>\n+std::pair<std::vector<T>, std::vector<bitmask_type>> to_host(column_view c) {\n+  std::size_t const mask_bytes{bitmask_allocation_size_bytes(c.size())};\n+  std::vector<T> host_data;\n+  std::vector<bitmask_type> host_bitmask;\n+\n+  auto col = column(c);\n+\n+  if (col.size() > 0) {\n+    host_data.resize(col.size());\n+    CUDA_TRY(cudaMemcpy(host_data.data(), col.view().head<T>(),\n+                        col.size() * sizeof(T),\n+                        cudaMemcpyDeviceToHost));\n+  }\n+\n+  if (col.nullable()) {\n+    size_t num_mask_elements = ","path":"cpp/tests/utilities/column_utilities.hpp","position":null,"original_position":37,"commit_id":"524777767611263d5dd40324c91e574d55ba6727","original_commit_id":"7b08f978562eab282dc8d5dab65aee32fe9981fb","user":{"login":"devavret","id":3027195,"node_id":"MDQ6VXNlcjMwMjcxOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3027195?v=4","gravatar_id":"","url":"https://api.github.com/users/devavret","html_url":"https://github.com/devavret","followers_url":"https://api.github.com/users/devavret/followers","following_url":"https://api.github.com/users/devavret/following{/other_user}","gists_url":"https://api.github.com/users/devavret/gists{/gist_id}","starred_url":"https://api.github.com/users/devavret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devavret/subscriptions","organizations_url":"https://api.github.com/users/devavret/orgs","repos_url":"https://api.github.com/users/devavret/repos","events_url":"https://api.github.com/users/devavret/events{/privacy}","received_events_url":"https://api.github.com/users/devavret/received_events","type":"User","site_admin":false},"body":"just did this","created_at":"2019-11-04T18:35:32Z","updated_at":"2019-11-04T18:35:32Z","html_url":"https://github.com/rapidsai/cudf/pull/3278#discussion_r342204053","pull_request_url":"https://api.github.com/repos/rapidsai/cudf/pulls/3278","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rapidsai/cudf/pulls/comments/342204053"},"html":{"href":"https://github.com/rapidsai/cudf/pull/3278#discussion_r342204053"},"pull_request":{"href":"https://api.github.com/repos/rapidsai/cudf/pulls/3278"}},"in_reply_to_id":342202741},"pull_request":{"url":"https://api.github.com/repos/rapidsai/cudf/pulls/3278","id":335442559,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM1NDQyNTU5","html_url":"https://github.com/rapidsai/cudf/pull/3278","diff_url":"https://github.com/rapidsai/cudf/pull/3278.diff","patch_url":"https://github.com/rapidsai/cudf/pull/3278.patch","issue_url":"https://api.github.com/repos/rapidsai/cudf/issues/3278","number":3278,"state":"open","locked":false,"title":"to_host utility to copy a cudf::column_view to host memory","user":{"login":"devavret","id":3027195,"node_id":"MDQ6VXNlcjMwMjcxOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3027195?v=4","gravatar_id":"","url":"https://api.github.com/users/devavret","html_url":"https://github.com/devavret","followers_url":"https://api.github.com/users/devavret/followers","following_url":"https://api.github.com/users/devavret/following{/other_user}","gists_url":"https://api.github.com/users/devavret/gists{/gist_id}","starred_url":"https://api.github.com/users/devavret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devavret/subscriptions","organizations_url":"https://api.github.com/users/devavret/orgs","repos_url":"https://api.github.com/users/devavret/repos","events_url":"https://api.github.com/users/devavret/events{/privacy}","received_events_url":"https://api.github.com/users/devavret/received_events","type":"User","site_admin":false},"body":"Depends on #3219 \r\n<!--\r\n\r\nThank you for contributing to cuDF :)\r\n\r\nHere are some guidelines to help the review process go smoothly.\r\n\r\n1. Please write a description in this text box of the changes that are being\r\n   made.\r\n\r\n2. Please ensure that you have written units tests for the changes made/features\r\n   added.\r\n\r\n3. There are CI checks in place to enforce that committed code follows our style\r\n   and syntax standards. Please see our contribution guide in `CONTRIBUTING.MD`\r\n   in the project root for more information about the checks we perform and how\r\n   you can run them locally.\r\n\r\n4. If you are closing an issue please use one of the automatic closing words as\r\n   noted here: https://help.github.com/articles/closing-issues-using-keywords/\r\n\r\n5. If your pull request is not ready for review but you want to make use of the\r\n   continuous integration testing facilities please label it with `[WIP]`.\r\n\r\n6. If your pull request is ready to be reviewed without requiring additional\r\n   work on top of it, then remove the `[WIP]` label (if present) and replace\r\n   it with `[REVIEW]`. If assistance is required to complete the functionality,\r\n   for example when the C/C++ code of a feature is complete but Python bindings\r\n   are still required, then add the label `[HELP-REQ]` so that others can triage\r\n   and assist. The additional changes then can be implemented on top of the\r\n   same PR. If the assistance is done by members of the rapidsAI team, then no\r\n   additional actions are required by the creator of the original PR for this,\r\n   otherwise the original author of the PR needs to give permission to the\r\n   person(s) assisting to commit to their personal fork of the project. If that\r\n   doesn't happen then a new PR based on the code of the original PR can be\r\n   opened by the person assisting, which then will be the PR that will be\r\n   merged.\r\n\r\n7. Once all work has been done and review has taken place please do not add\r\n   features or make changes out of the scope of those requested by the reviewer\r\n   (doing this just add delays as already reviewed code ends up having to be\r\n   re-reviewed/it is hard to tell what is new etc!). Further, please do not\r\n   rebase your branch on master/force push/rewrite history, doing any of these\r\n   causes the context of any comments made by reviewers to be lost. If\r\n   conflicts occur against master they should be resolved by merging master\r\n   into the branch used for making the pull request.\r\n\r\nMany thanks in advance for your cooperation!\r\n\r\n-->\r\n","created_at":"2019-11-01T14:15:08Z","updated_at":"2019-11-04T18:35:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f40a396f00af2b3d628bae15f303fd2ccef89e0d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rapidsai/cudf/pulls/3278/commits","review_comments_url":"https://api.github.com/repos/rapidsai/cudf/pulls/3278/comments","review_comment_url":"https://api.github.com/repos/rapidsai/cudf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rapidsai/cudf/issues/3278/comments","statuses_url":"https://api.github.com/repos/rapidsai/cudf/statuses/524777767611263d5dd40324c91e574d55ba6727","head":{"label":"devavret:fea-to-host","ref":"fea-to-host","sha":"524777767611263d5dd40324c91e574d55ba6727","user":{"login":"devavret","id":3027195,"node_id":"MDQ6VXNlcjMwMjcxOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3027195?v=4","gravatar_id":"","url":"https://api.github.com/users/devavret","html_url":"https://github.com/devavret","followers_url":"https://api.github.com/users/devavret/followers","following_url":"https://api.github.com/users/devavret/following{/other_user}","gists_url":"https://api.github.com/users/devavret/gists{/gist_id}","starred_url":"https://api.github.com/users/devavret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devavret/subscriptions","organizations_url":"https://api.github.com/users/devavret/orgs","repos_url":"https://api.github.com/users/devavret/repos","events_url":"https://api.github.com/users/devavret/events{/privacy}","received_events_url":"https://api.github.com/users/devavret/received_events","type":"User","site_admin":false},"repo":{"id":156451871,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY0NTE4NzE=","name":"cudf","full_name":"devavret/cudf","private":false,"owner":{"login":"devavret","id":3027195,"node_id":"MDQ6VXNlcjMwMjcxOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3027195?v=4","gravatar_id":"","url":"https://api.github.com/users/devavret","html_url":"https://github.com/devavret","followers_url":"https://api.github.com/users/devavret/followers","following_url":"https://api.github.com/users/devavret/following{/other_user}","gists_url":"https://api.github.com/users/devavret/gists{/gist_id}","starred_url":"https://api.github.com/users/devavret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devavret/subscriptions","organizations_url":"https://api.github.com/users/devavret/orgs","repos_url":"https://api.github.com/users/devavret/repos","events_url":"https://api.github.com/users/devavret/events{/privacy}","received_events_url":"https://api.github.com/users/devavret/received_events","type":"User","site_admin":false},"html_url":"https://github.com/devavret/cudf","description":"cuDF - GPU DataFrame Library","fork":true,"url":"https://api.github.com/repos/devavret/cudf","forks_url":"https://api.github.com/repos/devavret/cudf/forks","keys_url":"https://api.github.com/repos/devavret/cudf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devavret/cudf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devavret/cudf/teams","hooks_url":"https://api.github.com/repos/devavret/cudf/hooks","issue_events_url":"https://api.github.com/repos/devavret/cudf/issues/events{/number}","events_url":"https://api.github.com/repos/devavret/cudf/events","assignees_url":"https://api.github.com/repos/devavret/cudf/assignees{/user}","branches_url":"https://api.github.com/repos/devavret/cudf/branches{/branch}","tags_url":"https://api.github.com/repos/devavret/cudf/tags","blobs_url":"https://api.github.com/repos/devavret/cudf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devavret/cudf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devavret/cudf/git/refs{/sha}","trees_url":"https://api.github.com/repos/devavret/cudf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devavret/cudf/statuses/{sha}","languages_url":"https://api.github.com/repos/devavret/cudf/languages","stargazers_url":"https://api.github.com/repos/devavret/cudf/stargazers","contributors_url":"https://api.github.com/repos/devavret/cudf/contributors","subscribers_url":"https://api.github.com/repos/devavret/cudf/subscribers","subscription_url":"https://api.github.com/repos/devavret/cudf/subscription","commits_url":"https://api.github.com/repos/devavret/cudf/commits{/sha}","git_commits_url":"https://api.github.com/repos/devavret/cudf/git/commits{/sha}","comments_url":"https://api.github.com/repos/devavret/cudf/comments{/number}","issue_comment_url":"https://api.github.com/repos/devavret/cudf/issues/comments{/number}","contents_url":"https://api.github.com/repos/devavret/cudf/contents/{+path}","compare_url":"https://api.github.com/repos/devavret/cudf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devavret/cudf/merges","archive_url":"https://api.github.com/repos/devavret/cudf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devavret/cudf/downloads","issues_url":"https://api.github.com/repos/devavret/cudf/issues{/number}","pulls_url":"https://api.github.com/repos/devavret/cudf/pulls{/number}","milestones_url":"https://api.github.com/repos/devavret/cudf/milestones{/number}","notifications_url":"https://api.github.com/repos/devavret/cudf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devavret/cudf/labels{/name}","releases_url":"https://api.github.com/repos/devavret/cudf/releases{/id}","deployments_url":"https://api.github.com/repos/devavret/cudf/deployments","created_at":"2018-11-06T21:42:57Z","updated_at":"2018-12-11T18:56:07Z","pushed_at":"2019-11-04T18:35:06Z","git_url":"git://github.com/devavret/cudf.git","ssh_url":"git@github.com:devavret/cudf.git","clone_url":"https://github.com/devavret/cudf.git","svn_url":"https://github.com/devavret/cudf","homepage":"http://rapids.ai","size":36448,"stargazers_count":0,"watchers_count":0,"language":"Cuda","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"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":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rapidsai:branch-0.11","ref":"branch-0.11","sha":"c2cc3c755927befd22366145fa37a1604731920f","user":{"login":"rapidsai","id":43887749,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzODg3NzQ5","avatar_url":"https://avatars2.githubusercontent.com/u/43887749?v=4","gravatar_id":"","url":"https://api.github.com/users/rapidsai","html_url":"https://github.com/rapidsai","followers_url":"https://api.github.com/users/rapidsai/followers","following_url":"https://api.github.com/users/rapidsai/following{/other_user}","gists_url":"https://api.github.com/users/rapidsai/gists{/gist_id}","starred_url":"https://api.github.com/users/rapidsai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapidsai/subscriptions","organizations_url":"https://api.github.com/users/rapidsai/orgs","repos_url":"https://api.github.com/users/rapidsai/repos","events_url":"https://api.github.com/users/rapidsai/events{/privacy}","received_events_url":"https://api.github.com/users/rapidsai/received_events","type":"Organization","site_admin":false},"repo":{"id":90506918,"node_id":"MDEwOlJlcG9zaXRvcnk5MDUwNjkxOA==","name":"cudf","full_name":"rapidsai/cudf","private":false,"owner":{"login":"rapidsai","id":43887749,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzODg3NzQ5","avatar_url":"https://avatars2.githubusercontent.com/u/43887749?v=4","gravatar_id":"","url":"https://api.github.com/users/rapidsai","html_url":"https://github.com/rapidsai","followers_url":"https://api.github.com/users/rapidsai/followers","following_url":"https://api.github.com/users/rapidsai/following{/other_user}","gists_url":"https://api.github.com/users/rapidsai/gists{/gist_id}","starred_url":"https://api.github.com/users/rapidsai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapidsai/subscriptions","organizations_url":"https://api.github.com/users/rapidsai/orgs","repos_url":"https://api.github.com/users/rapidsai/repos","events_url":"https://api.github.com/users/rapidsai/events{/privacy}","received_events_url":"https://api.github.com/users/rapidsai/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rapidsai/cudf","description":"cuDF - GPU DataFrame Library","fork":false,"url":"https://api.github.com/repos/rapidsai/cudf","forks_url":"https://api.github.com/repos/rapidsai/cudf/forks","keys_url":"https://api.github.com/repos/rapidsai/cudf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapidsai/cudf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapidsai/cudf/teams","hooks_url":"https://api.github.com/repos/rapidsai/cudf/hooks","issue_events_url":"https://api.github.com/repos/rapidsai/cudf/issues/events{/number}","events_url":"https://api.github.com/repos/rapidsai/cudf/events","assignees_url":"https://api.github.com/repos/rapidsai/cudf/assignees{/user}","branches_url":"https://api.github.com/repos/rapidsai/cudf/branches{/branch}","tags_url":"https://api.github.com/repos/rapidsai/cudf/tags","blobs_url":"https://api.github.com/repos/rapidsai/cudf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapidsai/cudf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapidsai/cudf/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapidsai/cudf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapidsai/cudf/statuses/{sha}","languages_url":"https://api.github.com/repos/rapidsai/cudf/languages","stargazers_url":"https://api.github.com/repos/rapidsai/cudf/stargazers","contributors_url":"https://api.github.com/repos/rapidsai/cudf/contributors","subscribers_url":"https://api.github.com/repos/rapidsai/cudf/subscribers","subscription_url":"https://api.github.com/repos/rapidsai/cudf/subscription","commits_url":"https://api.github.com/repos/rapidsai/cudf/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapidsai/cudf/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapidsai/cudf/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapidsai/cudf/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapidsai/cudf/contents/{+path}","compare_url":"https://api.github.com/repos/rapidsai/cudf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapidsai/cudf/merges","archive_url":"https://api.github.com/repos/rapidsai/cudf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapidsai/cudf/downloads","issues_url":"https://api.github.com/repos/rapidsai/cudf/issues{/number}","pulls_url":"https://api.github.com/repos/rapidsai/cudf/pulls{/number}","milestones_url":"https://api.github.com/repos/rapidsai/cudf/milestones{/number}","notifications_url":"https://api.github.com/repos/rapidsai/cudf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapidsai/cudf/labels{/name}","releases_url":"https://api.github.com/repos/rapidsai/cudf/releases{/id}","deployments_url":"https://api.github.com/repos/rapidsai/cudf/deployments","created_at":"2017-05-07T03:43:37Z","updated_at":"2019-11-04T16:39:33Z","pushed_at":"2019-11-04T18:35:08Z","git_url":"git://github.com/rapidsai/cudf.git","ssh_url":"git@github.com:rapidsai/cudf.git","clone_url":"https://github.com/rapidsai/cudf.git","svn_url":"https://github.com/rapidsai/cudf","homepage":"http://rapids.ai","size":36415,"stargazers_count":2159,"watchers_count":2159,"language":"Cuda","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":299,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":522,"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":299,"open_issues":522,"watchers":2159,"default_branch":"branch-0.11"}},"_links":{"self":{"href":"https://api.github.com/repos/rapidsai/cudf/pulls/3278"},"html":{"href":"https://github.com/rapidsai/cudf/pull/3278"},"issue":{"href":"https://api.github.com/repos/rapidsai/cudf/issues/3278"},"comments":{"href":"https://api.github.com/repos/rapidsai/cudf/issues/3278/comments"},"review_comments":{"href":"https://api.github.com/repos/rapidsai/cudf/pulls/3278/comments"},"review_comment":{"href":"https://api.github.com/repos/rapidsai/cudf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rapidsai/cudf/pulls/3278/commits"},"statuses":{"href":"https://api.github.com/repos/rapidsai/cudf/statuses/524777767611263d5dd40324c91e574d55ba6727"}},"author_association":"COLLABORATOR"}}
other: {"actor":{"display_login":"devavret"}}