{"action":"closed","number":133,"pull_request":{"url":"https://api.github.com/repos/druid-io/pydruid/pulls/133","id":195302924,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MzAyOTI0","html_url":"https://github.com/druid-io/pydruid/pull/133","diff_url":"https://github.com/druid-io/pydruid/pull/133.diff","patch_url":"https://github.com/druid-io/pydruid/pull/133.patch","issue_url":"https://api.github.com/repos/druid-io/pydruid/issues/133","number":133,"state":"closed","locked":false,"title":"Fix empty result","user":{"login":"betodealmeida","id":1534870,"node_id":"MDQ6VXNlcjE1MzQ4NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1534870?v=4","gravatar_id":"","url":"https://api.github.com/users/betodealmeida","html_url":"https://github.com/betodealmeida","followers_url":"https://api.github.com/users/betodealmeida/followers","following_url":"https://api.github.com/users/betodealmeida/following{/other_user}","gists_url":"https://api.github.com/users/betodealmeida/gists{/gist_id}","starred_url":"https://api.github.com/users/betodealmeida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betodealmeida/subscriptions","organizations_url":"https://api.github.com/users/betodealmeida/orgs","repos_url":"https://api.github.com/users/betodealmeida/repos","events_url":"https://api.github.com/users/betodealmeida/events{/privacy}","received_events_url":"https://api.github.com/users/betodealmeida/received_events","type":"User","site_admin":false},"body":"The DB API will stream the results from Druid, yielding data as soon as it's read from the network. In order to get the cursor description describing the results, the first row is read, the cursor is set, and the row is chained back to the results.\r\n\r\nUnfortunately, this fails when there are no rows, raising a `StopIteration` exception. I changed the code to return an empty list instead. I also added two unit tests for the cursor, that can be expanded in the future.","created_at":"2018-06-15T23:27:56Z","updated_at":"2018-06-19T05:47:03Z","closed_at":"2018-06-19T05:47:03Z","merged_at":"2018-06-19T05:47:03Z","merge_commit_sha":"cbfcb7bc4aa659c35898eb266b705c4a97cd6ea0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/druid-io/pydruid/pulls/133/commits","review_comments_url":"https://api.github.com/repos/druid-io/pydruid/pulls/133/comments","review_comment_url":"https://api.github.com/repos/druid-io/pydruid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/druid-io/pydruid/issues/133/comments","statuses_url":"https://api.github.com/repos/druid-io/pydruid/statuses/a6ea468b9d1908e9f726fe6b77e9d961ffb29eea","head":{"label":"betodealmeida:fix_empty_rows","ref":"fix_empty_rows","sha":"a6ea468b9d1908e9f726fe6b77e9d961ffb29eea","user":{"login":"betodealmeida","id":1534870,"node_id":"MDQ6VXNlcjE1MzQ4NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1534870?v=4","gravatar_id":"","url":"https://api.github.com/users/betodealmeida","html_url":"https://github.com/betodealmeida","followers_url":"https://api.github.com/users/betodealmeida/followers","following_url":"https://api.github.com/users/betodealmeida/following{/other_user}","gists_url":"https://api.github.com/users/betodealmeida/gists{/gist_id}","starred_url":"https://api.github.com/users/betodealmeida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betodealmeida/subscriptions","organizations_url":"https://api.github.com/users/betodealmeida/orgs","repos_url":"https://api.github.com/users/betodealmeida/repos","events_url":"https://api.github.com/users/betodealmeida/events{/privacy}","received_events_url":"https://api.github.com/users/betodealmeida/received_events","type":"User","site_admin":false},"repo":{"id":116187333,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYxODczMzM=","name":"pydruid","full_name":"betodealmeida/pydruid","owner":{"login":"betodealmeida","id":1534870,"node_id":"MDQ6VXNlcjE1MzQ4NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1534870?v=4","gravatar_id":"","url":"https://api.github.com/users/betodealmeida","html_url":"https://github.com/betodealmeida","followers_url":"https://api.github.com/users/betodealmeida/followers","following_url":"https://api.github.com/users/betodealmeida/following{/other_user}","gists_url":"https://api.github.com/users/betodealmeida/gists{/gist_id}","starred_url":"https://api.github.com/users/betodealmeida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betodealmeida/subscriptions","organizations_url":"https://api.github.com/users/betodealmeida/orgs","repos_url":"https://api.github.com/users/betodealmeida/repos","events_url":"https://api.github.com/users/betodealmeida/events{/privacy}","received_events_url":"https://api.github.com/users/betodealmeida/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/betodealmeida/pydruid","description":"A Python connector for Druid","fork":true,"url":"https://api.github.com/repos/betodealmeida/pydruid","forks_url":"https://api.github.com/repos/betodealmeida/pydruid/forks","keys_url":"https://api.github.com/repos/betodealmeida/pydruid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/betodealmeida/pydruid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/betodealmeida/pydruid/teams","hooks_url":"https://api.github.com/repos/betodealmeida/pydruid/hooks","issue_events_url":"https://api.github.com/repos/betodealmeida/pydruid/issues/events{/number}","events_url":"https://api.github.com/repos/betodealmeida/pydruid/events","assignees_url":"https://api.github.com/repos/betodealmeida/pydruid/assignees{/user}","branches_url":"https://api.github.com/repos/betodealmeida/pydruid/branches{/branch}","tags_url":"https://api.github.com/repos/betodealmeida/pydruid/tags","blobs_url":"https://api.github.com/repos/betodealmeida/pydruid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/betodealmeida/pydruid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/betodealmeida/pydruid/git/refs{/sha}","trees_url":"https://api.github.com/repos/betodealmeida/pydruid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/betodealmeida/pydruid/statuses/{sha}","languages_url":"https://api.github.com/repos/betodealmeida/pydruid/languages","stargazers_url":"https://api.github.com/repos/betodealmeida/pydruid/stargazers","contributors_url":"https://api.github.com/repos/betodealmeida/pydruid/contributors","subscribers_url":"https://api.github.com/repos/betodealmeida/pydruid/subscribers","subscription_url":"https://api.github.com/repos/betodealmeida/pydruid/subscription","commits_url":"https://api.github.com/repos/betodealmeida/pydruid/commits{/sha}","git_commits_url":"https://api.github.com/repos/betodealmeida/pydruid/git/commits{/sha}","comments_url":"https://api.github.com/repos/betodealmeida/pydruid/comments{/number}","issue_comment_url":"https://api.github.com/repos/betodealmeida/pydruid/issues/comments{/number}","contents_url":"https://api.github.com/repos/betodealmeida/pydruid/contents/{+path}","compare_url":"https://api.github.com/repos/betodealmeida/pydruid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/betodealmeida/pydruid/merges","archive_url":"https://api.github.com/repos/betodealmeida/pydruid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/betodealmeida/pydruid/downloads","issues_url":"https://api.github.com/repos/betodealmeida/pydruid/issues{/number}","pulls_url":"https://api.github.com/repos/betodealmeida/pydruid/pulls{/number}","milestones_url":"https://api.github.com/repos/betodealmeida/pydruid/milestones{/number}","notifications_url":"https://api.github.com/repos/betodealmeida/pydruid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/betodealmeida/pydruid/labels{/name}","releases_url":"https://api.github.com/repos/betodealmeida/pydruid/releases{/id}","deployments_url":"https://api.github.com/repos/betodealmeida/pydruid/deployments","created_at":"2018-01-03T22:15:14Z","updated_at":"2018-01-03T22:15:16Z","pushed_at":"2018-06-15T23:25:51Z","git_url":"git://github.com/betodealmeida/pydruid.git","ssh_url":"git@github.com:betodealmeida/pydruid.git","clone_url":"https://github.com/betodealmeida/pydruid.git","svn_url":"https://github.com/betodealmeida/pydruid","homepage":"","size":446,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"druid-io:master","ref":"master","sha":"6c6176e0e5714c241e1c38902f0478f94b281a0f","user":{"login":"druid-io","id":4203474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMDM0NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/4203474?v=4","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"repo":{"id":12421065,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQyMTA2NQ==","name":"pydruid","full_name":"druid-io/pydruid","owner":{"login":"druid-io","id":4203474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMDM0NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/4203474?v=4","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/druid-io/pydruid","description":"A Python connector for Druid","fork":false,"url":"https://api.github.com/repos/druid-io/pydruid","forks_url":"https://api.github.com/repos/druid-io/pydruid/forks","keys_url":"https://api.github.com/repos/druid-io/pydruid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/druid-io/pydruid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/druid-io/pydruid/teams","hooks_url":"https://api.github.com/repos/druid-io/pydruid/hooks","issue_events_url":"https://api.github.com/repos/druid-io/pydruid/issues/events{/number}","events_url":"https://api.github.com/repos/druid-io/pydruid/events","assignees_url":"https://api.github.com/repos/druid-io/pydruid/assignees{/user}","branches_url":"https://api.github.com/repos/druid-io/pydruid/branches{/branch}","tags_url":"https://api.github.com/repos/druid-io/pydruid/tags","blobs_url":"https://api.github.com/repos/druid-io/pydruid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/druid-io/pydruid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/druid-io/pydruid/git/refs{/sha}","trees_url":"https://api.github.com/repos/druid-io/pydruid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/druid-io/pydruid/statuses/{sha}","languages_url":"https://api.github.com/repos/druid-io/pydruid/languages","stargazers_url":"https://api.github.com/repos/druid-io/pydruid/stargazers","contributors_url":"https://api.github.com/repos/druid-io/pydruid/contributors","subscribers_url":"https://api.github.com/repos/druid-io/pydruid/subscribers","subscription_url":"https://api.github.com/repos/druid-io/pydruid/subscription","commits_url":"https://api.github.com/repos/druid-io/pydruid/commits{/sha}","git_commits_url":"https://api.github.com/repos/druid-io/pydruid/git/commits{/sha}","comments_url":"https://api.github.com/repos/druid-io/pydruid/comments{/number}","issue_comment_url":"https://api.github.com/repos/druid-io/pydruid/issues/comments{/number}","contents_url":"https://api.github.com/repos/druid-io/pydruid/contents/{+path}","compare_url":"https://api.github.com/repos/druid-io/pydruid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/druid-io/pydruid/merges","archive_url":"https://api.github.com/repos/druid-io/pydruid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/druid-io/pydruid/downloads","issues_url":"https://api.github.com/repos/druid-io/pydruid/issues{/number}","pulls_url":"https://api.github.com/repos/druid-io/pydruid/pulls{/number}","milestones_url":"https://api.github.com/repos/druid-io/pydruid/milestones{/number}","notifications_url":"https://api.github.com/repos/druid-io/pydruid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/druid-io/pydruid/labels{/name}","releases_url":"https://api.github.com/repos/druid-io/pydruid/releases{/id}","deployments_url":"https://api.github.com/repos/druid-io/pydruid/deployments","created_at":"2013-08-28T00:52:10Z","updated_at":"2018-06-13T21:15:32Z","pushed_at":"2018-06-19T05:47:03Z","git_url":"git://github.com/druid-io/pydruid.git","ssh_url":"git@github.com:druid-io/pydruid.git","clone_url":"https://github.com/druid-io/pydruid.git","svn_url":"https://github.com/druid-io/pydruid","homepage":"","size":437,"stargazers_count":193,"watchers_count":193,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":87,"open_issues":31,"watchers":193,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/druid-io/pydruid/pulls/133"},"html":{"href":"https://github.com/druid-io/pydruid/pull/133"},"issue":{"href":"https://api.github.com/repos/druid-io/pydruid/issues/133"},"comments":{"href":"https://api.github.com/repos/druid-io/pydruid/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/druid-io/pydruid/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/druid-io/pydruid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/druid-io/pydruid/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/druid-io/pydruid/statuses/a6ea468b9d1908e9f726fe6b77e9d961ffb29eea"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"mistercrunch","id":487433,"node_id":"MDQ6VXNlcjQ4NzQzMw==","avatar_url":"https://avatars1.githubusercontent.com/u/487433?v=4","gravatar_id":"","url":"https://api.github.com/users/mistercrunch","html_url":"https://github.com/mistercrunch","followers_url":"https://api.github.com/users/mistercrunch/followers","following_url":"https://api.github.com/users/mistercrunch/following{/other_user}","gists_url":"https://api.github.com/users/mistercrunch/gists{/gist_id}","starred_url":"https://api.github.com/users/mistercrunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistercrunch/subscriptions","organizations_url":"https://api.github.com/users/mistercrunch/orgs","repos_url":"https://api.github.com/users/mistercrunch/repos","events_url":"https://api.github.com/users/mistercrunch/events{/privacy}","received_events_url":"https://api.github.com/users/mistercrunch/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":53,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"mistercrunch"}}