Skip to content
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

Streaming write for DuckDB TableProvider #6

Conversation

sgrebnov
Copy link
Collaborator

@sgrebnov sgrebnov commented Jul 5, 2024

PR implements streaming write support for the DuckDB TableProvider, which is critical for handling large volumes of data that cannot be stored entirely in memory before writing to a DuckDB file-based TableProvider.

Since DuckDB transactions are not Sync, they cannot be used in the asynchronous context required for stream reading. To address this, a separate Tokio task has been created for synchronous DuckDB writing. A tokio channel with blocking_recv is used to propagate RecordBatches for writing.

@sgrebnov sgrebnov force-pushed the sgrebnov/duckdb-streaming-write branch from f97a781 to a023db7 Compare July 5, 2024 08:00
@sgrebnov sgrebnov marked this pull request as draft July 5, 2024 18:19
@sgrebnov sgrebnov force-pushed the sgrebnov/duckdb-streaming-write branch from 26589b5 to f0d147e Compare July 5, 2024 18:19
@phillipleblanc phillipleblanc self-assigned this Jul 8, 2024
@phillipleblanc phillipleblanc self-requested a review July 8, 2024 01:06
@phillipleblanc phillipleblanc added the enhancement New feature or request label Jul 8, 2024
@phillipleblanc phillipleblanc merged commit 6b900aa into datafusion-contrib:main Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants