Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion trino/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def process(self, http_response) -> TrinoStatus:
for name in get_header_values(
http_response.headers, constants.HEADER_DEALLOCATED_PREPARE
):
self._client_session.prepared_statements.pop(name)
self._client_session.prepared_statements.pop(name, None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a debug log or a warnings.warn here since ideally this should not be happenning at all. We should try to collect when this happens and why and fix it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful information to log would be the statement we are trying to deallocate, the current state of the prepared_statements dict and the response headers we received.


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

Expand Down