-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add conn.query_progress() method #16927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
51e645f
to
834fe2d
Compare
(As is probably pretty clear from the history above and below, I have no idea what I'm doing with this CI pipeline. Please bear with me while I step on a series of rakes.) |
Thanks for the PR! I think the only related failure is the format check - we're having some issues with other CI failures due to some external stuff. |
834fe2d
to
9e9017e
Compare
Yeah, I've stuffed something up with whitespace in the generated files, I'll try and get it submitted properly. |
9e9017e
to
689ef28
Compare
689ef28
to
5848a06
Compare
5848a06
to
cb61b32
Compare
I think I've used more CPU cycles on CI than the entire Apollo program used for the moon landings, sorry about that! But hopefully maybe it'll work this time ... |
I'd also considered whether this should return a tuple of (rows processed, rows total) instead of just a percentage. A bonus issue to mention is that this implementation only works if progress bars are active for the cursor, which can be a bit confusing, especially given #16964 these settings aren't shared between cursors. There might be a better way to do this, too. |
Woohoo! Finally got this thing to pass all its tests, which was an adventure. @Mytherin & @Tishj this very simple approach works well for my purposes, where there's a supervisor thread and all I want is a visual progress reassurance. Is it acceptable to the project though or should I be pursuing other approaches to try and get something mergeable? |
No? Yes? Maybe? @Tishj this just seemed like the simplest way but if you hate it I can go back and try to get one of the other approaches working instead. |
Thanks! |
Add conn.query_progress() method (duckdb/duckdb#16927)
Add conn.query_progress() method (duckdb/duckdb#16927)
Add conn.query_progress() method (duckdb/duckdb#16927) 7A6E pre>
Add conn.query_progress() method (duckdb/duckdb#16927)
This is an alternative PR to Tishj#26 which adds a
conn.query_progress()
method which can be run from a supervisory thread, similar to how you'd useconn.interrupt()
which was added in #7895 and this PR follows that one pretty closely.