Skip to content

Commit

Permalink
Add support for 'None' on response data
Browse files Browse the repository at this point in the history
  • Loading branch information
avibhstarburst committed Jan 30, 2024
1 parent ca38d29 commit 0dc4427
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion trino/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ def process(self, http_response) -> TrinoStatus:

self._next_uri = response.get("nextUri")

data = response.get("data", [])
if not data:
data = []
return TrinoStatus(
id=response["id"],
stats=response["stats"],
Expand All @@ -641,7 +644,7 @@ def process(self, http_response) -> TrinoStatus:
next_uri=self._next_uri,
update_type=response.get("updateType"),
update_count=response.get("updateCount"),
rows=response.get("data", []),
rows=data,
columns=response.get("columns"),
)

Expand Down

0 comments on commit 0dc4427

Please sign in to comment.