trino-python-client icon indicating copy to clipboard operation
trino-python-client copied to clipboard

Send query heartbeat while downloading results

Open wendigo opened this issue 8 months ago • 3 comments

Describe the feature

https://github.com/trinodb/trino/pull/25267

Describe alternatives you've considered

No response

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

wendigo avatar Apr 24 '25 11:04 wendigo

@wendigo Does this result in queries failing midway? Should it be considered as a bug?

hashhar avatar May 29 '25 09:05 hashhar

@hashhar if the client is slow then yeah, it can fail in between

wendigo avatar May 29 '25 09:05 wendigo

would be awesome to get some momentum here, I took a look at the java impl of this (I am not fluent in java) and have a very rough idea of how I can implement but a little unsure what endpoint I need to actually send requests to while the downloading is happening.

I am hoping to implement streaming a result set back from trino into a file that is downloaded by users through some [W|A]SGI framework in python for some context.

Alternatively, this could be implemented by clients today by paginating using OFFSET in queries to consume query results in chunks but this could result in inconsistent responses if data the user is querying changes in between requests.

jayceslesar avatar Jul 20 '25 01:07 jayceslesar