Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty result #133

Merged
merged 2 commits into from
Jun 19, 2018
Merged

Conversation

betodealmeida
Copy link
Contributor

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.

Unfortunately, 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.

@mistercrunch mistercrunch merged commit cbfcb7b into druid-io:master Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants