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 get/delete requests in Presto to accept headers #200

Closed
wants to merge 1 commit into from

Conversation

toru-takahashi
Copy link

Add headers argument in get/delete requests with Presto.

Background

I would like to support Superset as BI tool to connect to Presto.
But, Presto I use requires X-Presto-User header to authenticate.
The current code seems to accept headers at only POST request.
Then, we couldn't pull data by using fetchall() and poll()

This fix accepts headers parameter into these functions.

(Dropbox CLA signed)

@shivarajugowda
Copy link

I also hit this problem lately and as @toru-takahashi mentioned passing the headers to GET calls(as done in the POST call) fixed the problem. Could we consider including the change? The older changes with the more recent tests might be causing the travis-ci errors. If needed I can clean up the fix and resubmit a pull request.

@bkyryliuk
Copy link
Collaborator

@shivarajugowda - please go for it. It also would be great to add some unit tests to the PR. Happy to review it.

@toru-takahashi
Copy link
Author

Looks this issue has been fixed.
https://github.com/dropbox/PyHive/blob/master/pyhive/presto.py#L242-L247

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.

3 participants