prestodb / presto-python-client

Python DB-API client for Presto
Apache License 2.0
239 stars 87 forks source link

Fix SET SESSION support by using http_response.headers #70

Closed rzeyde-varada closed 5 years ago

rzeyde-varada commented 5 years ago

Otherwise, running SET SESSION fails with:

AttributeError: 'dict' object has no attribute 'headers'

  .../lib/python2.7/site-packages/prestodb/dbapi.py, line 306:
            return list(self.genall())
  .../lib/python2.7/site-packages/prestodb/client.py, line 465:
                rows = self._query.fetch()
  .../lib/python2.7/site-packages/prestodb/client.py, line 532:
            status = self._request.process(response)
  .../lib/python2.7/site-packages/prestodb/client.py, line 421:
                    response.headers,
rzeyde-varada commented 5 years ago

Ping :)