Skip to content

Conversation

staticlibs
Copy link
Collaborator

This change exposes the duckdb_query_progress native call as getQueryProgress() method on the statement. Similar to the Statement#cancel() call this new method also expected to be called when execute() is running and also works on the connection (not on the statement itself).

Note, the local option SET enable_progress_bar = true needs to be set to be able to fetch actual progress data.

Testing: new test is added that checks that getQueryProgress() returns valid values.

This change exposes the `duckdb_query_progress` native call as
`getQueryProgress()` method on the statement. Similar to the
`Statement#cancel()` call this new method also expected to be called
when `execute()` is running and also works on the connection (not on
the statement itself).

Note, the local option `SET enable_progress_bar = true` needs to be set
to be able to fetch actual progress data.

Testing: new test is added that checks that `getQueryProgress()`
returns valid values.
@staticlibs
Copy link
Collaborator Author

@lnkuiper I wonder if you would like to take a look at this PR?

Copy link
Contributor

@lnkuiper lnkuiper left a comment

Choose a reason for hiding this comment

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

@staticlibs I have limited JDBC experience, but this looks excellent! Thanks for implementing this so quickly. This is good to go from my side.

@staticlibs staticlibs merged commit e44779f into duckdb:main May 9, 2025
8 checks passed
@staticlibs
Copy link
Collaborator Author

Thanks for the review!

@staticlibs staticlibs deleted the query_progress branch May 9, 2025 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants