Open zyxue opened 1 year ago
What do you actually plan to do? Maybe there's an alternative.
We intentionally changed the behaviour to fix a bug where queries which don't return result sets silently swallowed errors. It has the side effect to make the client API easier to use since users no longer need to call fetch
methods to actually start the query. See https://github.com/trinodb/trino-python-client/pull/220 and the release notes/CHANGES.md for that version.
Is it possible to expose a method that does the non-blocking stuff (esp. self._info_uri = status.info_uri
) before the blocking while loop?
Expected behavior
execute
returns soon after it's run so thatinfoUri
can be available for tracking.Actual behavior
executes
is blocked until at least one row is received or query is finished or cancelled (https://github.com/trinodb/trino-python-client/blob/0.326.0/trino/client.py#L819-L821)Steps To Reproduce
Log output
No response
Operating System
NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)"
Trino Python client version
0.319.0
Trino Server version
419
Python version
3.8.13
Are you willing to submit PR?