Skip to content

Conversation

@carlopi
Copy link
Contributor

@carlopi carlopi commented Feb 19, 2025

Bumped into this while looking to supporting JavaScript async UDF functionality in duckdb-wasm. This is the only duckdb/duckdb change, other fixes to be added on duckdb-wasm side, afterward it can be properly tested there.

I think this also makes sense in general for DuckDB, where an operator can now properly BLOCK and handle resuming on a side. This is particularly relevant for the poll path, expecially when single threaded (since no other work can happen otherwise).

This is at the moment an untested codepath in duckdb/duckdb CI, I need to add a test.

@carlopi carlopi marked this pull request as ready for review February 19, 2025 08:22
Bumped into this while looking to supporting some JavaScript async UDF functionality.
Require a couple of other changes duckdb-wasm side, but it's viable path.

I think this also makes sense in general for DuckDB, where an operator can now properly BLOCK and handle
resuming on a side.

This is at the moment an untested codepath in duckdb/duckdb CI.
@duckdb-draftbot duckdb-draftbot marked this pull request as draft February 19, 2025 08:29
@carlopi carlopi marked this pull request as ready for review February 19, 2025 08:29
@Tishj
Copy link
Contributor

Tishj commented Feb 19, 2025

As a test I think you want to make use of the DUCKDB_DEBUG_ASYNC_SINK_SOURCE define that we use to test the BLOCKED path for sinks and sources

The idea is that you force the function to block N number of times if that define is set

@duckdb-draftbot duckdb-draftbot marked this pull request as draft February 19, 2025 08:38
@carlopi carlopi marked this pull request as ready for review February 19, 2025 12:08
@Mytherin Mytherin merged commit 0236336 into duckdb:v1.2-histrionicus Feb 21, 2025
50 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

krlmlr added a commit to duckdb/duckdb-r that referenced this pull request Mar 7, 2025
PhysicalTableScan: Adapt to allow async behaviour (duckdb/duckdb#16310)
@carlopi carlopi deleted the in_out_blocking branch August 17, 2025 20:38
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.

3 participants