{"action":"created","comment":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/45307232","id":45307232,"diff_hunk":"@@ -468,6 +468,41 @@ def test_writing_use_header(self):\n         self.assertItemsEqual(csv_values,\n                               [['a', 'b'], ['1', '10'], ['2', '20'], ['3', '30']])\n \n+    def test_reading_counter(self):\n+        \"\"\"\n+        Test that COPY can read a CSV of COUNTER by:\n+\n+        - creating a table,\n+        - writing a CSV with COUNTER data with header,\n+        - importing the contents of the CSV file using COPY with header,\n+        - checking that the contents of the table are the written values.\n+        \"\"\"\n+        self.prepare()\n+        self.session.execute(\"\"\"\n+            CREATE TABLE testcounter (\n+                a int primary key,\n+                b counter\n+            )\"\"\")\n+\n+        self.tempfile = NamedTemporaryFile(delete=False)\n+\n+        data = [[1, 20], [2, 40], [3, 60], [4, 80]]\n+\n+        with open(self.tempfile.name, 'w') as csvfile:\n+            writer = csv.DictWriter(csvfile, fieldnames=['a', 'b'])\n+            writer.writeheader()\n+            for a, b in data:\n+                writer.writerow({'a': a, 'b': b})\n+            csvfile.close\n+\n+        cmds = \"COPY ks.testheader FROM '{name}'\".format(name=self.tempfile.name)","path":"cqlsh_tests/cqlsh_copy_tests.py","position":null,"original_position":31,"commit_id":"2c01d33cf720d2ad125298cc818faf86f1c01953","original_commit_id":"bf601b54287c86c0960d1c88a3a2b6768326a883","user":{"login":"jasonstack","id":4034006,"avatar_url":"https://avatars.githubusercontent.com/u/4034006?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonstack","html_url":"https://github.com/jasonstack","followers_url":"https://api.github.com/users/jasonstack/followers","following_url":"https://api.github.com/users/jasonstack/following{/other_user}","gists_url":"https://api.github.com/users/jasonstack/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonstack/subscriptions","organizations_url":"https://api.github.com/users/jasonstack/orgs","repos_url":"https://api.github.com/users/jasonstack/repos","events_url":"https://api.github.com/users/jasonstack/events{/privacy}","received_events_url":"https://api.github.com/users/jasonstack/received_events","type":"User","site_admin":false},"body":"thank you. fixed.","created_at":"2015-11-19T06:46:25Z","updated_at":"2015-11-19T06:46:25Z","html_url":"https://github.com/riptano/cassandra-dtest/pull/670#discussion_r45307232","pull_request_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/670","_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/45307232"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/670#discussion_r45307232"},"pull_request":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/670"}}},"pull_request":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/670","id":51089294,"html_url":"https://github.com/riptano/cassandra-dtest/pull/670","diff_url":"https://github.com/riptano/cassandra-dtest/pull/670.diff","patch_url":"https://github.com/riptano/cassandra-dtest/pull/670.patch","issue_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/670","number":670,"state":"open","locked":false,"title":"CASSANDRA-9043: Add test case for COPY from COUNTER csv","user":{"login":"jasonstack","id":4034006,"avatar_url":"https://avatars.githubusercontent.com/u/4034006?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonstack","html_url":"https://github.com/jasonstack","followers_url":"https://api.github.com/users/jasonstack/followers","following_url":"https://api.github.com/users/jasonstack/following{/other_user}","gists_url":"https://api.github.com/users/jasonstack/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonstack/subscriptions","organizations_url":"https://api.github.com/users/jasonstack/orgs","repos_url":"https://api.github.com/users/jasonstack/repos","events_url":"https://api.github.com/users/jasonstack/events{/privacy}","received_events_url":"https://api.github.com/users/jasonstack/received_events","type":"User","site_admin":false},"body":"CASSANDRA-9043: Add test case for COPY from COUNTER csv","created_at":"2015-11-18T14:18:29Z","updated_at":"2015-11-19T06:46:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48ae9a895d6929898f2035d5fb783057998d95b0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/670/commits","review_comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/670/comments","review_comment_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/670/comments","statuses_url":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/2c01d33cf720d2ad125298cc818faf86f1c01953","head":{"label":"jasonstack:CASSANDRA-9043-test","ref":"CASSANDRA-9043-test","sha":"2c01d33cf720d2ad125298cc818faf86f1c01953","user":{"login":"jasonstack","id":4034006,"avatar_url":"https://avatars.githubusercontent.com/u/4034006?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonstack","html_url":"https://github.com/jasonstack","followers_url":"https://api.github.com/users/jasonstack/followers","following_url":"https://api.github.com/users/jasonstack/following{/other_user}","gists_url":"https://api.github.com/users/jasonstack/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonstack/subscriptions","organizations_url":"https://api.github.com/users/jasonstack/orgs","repos_url":"https://api.github.com/users/jasonstack/repos","events_url":"https://api.github.com/users/jasonstack/events{/privacy}","received_events_url":"https://api.github.com/users/jasonstack/received_events","type":"User","site_admin":false},"repo":{"id":46406629,"name":"cassandra-dtest","full_name":"jasonstack/cassandra-dtest","owner":{"login":"jasonstack","id":4034006,"avatar_url":"https://avatars.githubusercontent.com/u/4034006?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonstack","html_url":"https://github.com/jasonstack","followers_url":"https://api.github.com/users/jasonstack/followers","following_url":"https://api.github.com/users/jasonstack/following{/other_user}","gists_url":"https://api.github.com/users/jasonstack/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonstack/subscriptions","organizations_url":"https://api.github.com/users/jasonstack/orgs","repos_url":"https://api.github.com/users/jasonstack/repos","events_url":"https://api.github.com/users/jasonstack/events{/privacy}","received_events_url":"https://api.github.com/users/jasonstack/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasonstack/cassandra-dtest","description":"Cassandra Distributed Tests","fork":true,"url":"https://api.github.com/repos/jasonstack/cassandra-dtest","forks_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/forks","keys_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/teams","hooks_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/hooks","issue_events_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/issues/events{/number}","events_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/events","assignees_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/assignees{/user}","branches_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/branches{/branch}","tags_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/tags","blobs_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/statuses/{sha}","languages_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/languages","stargazers_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/stargazers","contributors_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/contributors","subscribers_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/subscribers","subscription_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/subscription","commits_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/contents/{+path}","compare_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/merges","archive_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/downloads","issues_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/issues{/number}","pulls_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/pulls{/number}","milestones_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/milestones{/number}","notifications_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/labels{/name}","releases_url":"https://api.github.com/repos/jasonstack/cassandra-dtest/releases{/id}","created_at":"2015-11-18T08:52:25Z","updated_at":"2015-11-18T08:52:27Z","pushed_at":"2015-11-19T06:45:24Z","git_url":"git://github.com/jasonstack/cassandra-dtest.git","ssh_url":"git@github.com:jasonstack/cassandra-dtest.git","clone_url":"https://github.com/jasonstack/cassandra-dtest.git","svn_url":"https://github.com/jasonstack/cassandra-dtest","homepage":"","size":12907,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"riptano:master","ref":"master","sha":"3218c5e03a9680d06093f87e0e8bec271bfe4e6a","user":{"login":"riptano","id":275430,"avatar_url":"https://avatars.githubusercontent.com/u/275430?v=3","gravatar_id":"","url":"https://api.github.com/users/riptano","html_url":"https://github.com/riptano","followers_url":"https://api.github.com/users/riptano/followers","following_url":"https://api.github.com/users/riptano/following{/other_user}","gists_url":"https://api.github.com/users/riptano/gists{/gist_id}","starred_url":"https://api.github.com/users/riptano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riptano/subscriptions","organizations_url":"https://api.github.com/users/riptano/orgs","repos_url":"https://api.github.com/users/riptano/repos","events_url":"https://api.github.com/users/riptano/events{/privacy}","received_events_url":"https://api.github.com/users/riptano/received_events","type":"Organization","site_admin":false},"repo":{"id":2674774,"name":"cassandra-dtest","full_name":"riptano/cassandra-dtest","owner":{"login":"riptano","id":275430,"avatar_url":"https://avatars.githubusercontent.com/u/275430?v=3","gravatar_id":"","url":"https://api.github.com/users/riptano","html_url":"https://github.com/riptano","followers_url":"https://api.github.com/users/riptano/followers","following_url":"https://api.github.com/users/riptano/following{/other_user}","gists_url":"https://api.github.com/users/riptano/gists{/gist_id}","starred_url":"https://api.github.com/users/riptano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riptano/subscriptions","organizations_url":"https://api.github.com/users/riptano/orgs","repos_url":"https://api.github.com/users/riptano/repos","events_url":"https://api.github.com/users/riptano/events{/privacy}","received_events_url":"https://api.github.com/users/riptano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/riptano/cassandra-dtest","description":"Cassandra Distributed Tests","fork":false,"url":"https://api.github.com/repos/riptano/cassandra-dtest","forks_url":"https://api.github.com/repos/riptano/cassandra-dtest/forks","keys_url":"https://api.github.com/repos/riptano/cassandra-dtest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riptano/cassandra-dtest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riptano/cassandra-dtest/teams","hooks_url":"https://api.github.com/repos/riptano/cassandra-dtest/hooks","issue_events_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/events{/number}","events_url":"https://api.github.com/repos/riptano/cassandra-dtest/events","assignees_url":"https://api.github.com/repos/riptano/cassandra-dtest/assignees{/user}","branches_url":"https://api.github.com/repos/riptano/cassandra-dtest/branches{/branch}","tags_url":"https://api.github.com/repos/riptano/cassandra-dtest/tags","blobs_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/refs{/sha}","trees_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/{sha}","languages_url":"https://api.github.com/repos/riptano/cassandra-dtest/languages","stargazers_url":"https://api.github.com/repos/riptano/cassandra-dtest/stargazers","contributors_url":"https://api.github.com/repos/riptano/cassandra-dtest/contributors","subscribers_url":"https://api.github.com/repos/riptano/cassandra-dtest/subscribers","subscription_url":"https://api.github.com/repos/riptano/cassandra-dtest/subscription","commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/commits{/sha}","git_commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/commits{/sha}","comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/comments{/number}","issue_comment_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/comments{/number}","contents_url":"https://api.github.com/repos/riptano/cassandra-dtest/contents/{+path}","compare_url":"https://api.github.com/repos/riptano/cassandra-dtest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riptano/cassandra-dtest/merges","archive_url":"https://api.github.com/repos/riptano/cassandra-dtest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riptano/cassandra-dtest/downloads","issues_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues{/number}","pulls_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls{/number}","milestones_url":"https://api.github.com/repos/riptano/cassandra-dtest/milestones{/number}","notifications_url":"https://api.github.com/repos/riptano/cassandra-dtest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riptano/cassandra-dtest/labels{/name}","releases_url":"https://api.github.com/repos/riptano/cassandra-dtest/releases{/id}","created_at":"2011-10-30T11:15:44Z","updated_at":"2015-11-18T08:52:25Z","pushed_at":"2015-11-19T06:45:25Z","git_url":"git://github.com/riptano/cassandra-dtest.git","ssh_url":"git@github.com:riptano/cassandra-dtest.git","clone_url":"https://github.com/riptano/cassandra-dtest.git","svn_url":"https://github.com/riptano/cassandra-dtest","homepage":"","size":13144,"stargazers_count":68,"watchers_count":68,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":54,"forks":48,"open_issues":54,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/670"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/670"},"issue":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/670"},"comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/670/comments"},"review_comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/670/comments"},"review_comment":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/670/commits"},"statuses":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/2c01d33cf720d2ad125298cc818faf86f1c01953"}}}}