-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Feature][connector-jdbc] Support source and sink of duckdb #10285
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
Open
chl-wxp
wants to merge
31
commits into
apache:dev
Choose a base branch
from
chl-wxp:feature/add-jdbc-duckdb
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,408
−1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
….4.0 (apache#9941) Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Contributor
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.





DuckDB Connector Notes / Known Limitations
This PR intentionally does not add DuckDB end-to-end (E2E) tests.
The decision is based on DuckDB’s embedded nature and the following concrete limitations.
1. DuckDB database file is process-scoped
A DuckDB database file is process-scoped.
A single
.dbfile can only be opened by one process at a time.If multiple processes attempt to open the same database file, DuckDB will throw runtime errors.
2. Only one connection per process is effectively supported
Within a single process, DuckDB effectively supports only one active connection.
Maintaining multiple concurrent connections in the same process may lead to exceptions or undefined behavior.
3. Primary key and unique key metadata cannot be reliably retrieved
DuckDB does not provide a stable or reliable way to retrieve primary key or unique constraint information via JDBC metadata.
Currently:
DatabaseMetaDatadoes not consistently expose primary key or unique constraint informationAs a result, features that depend on schema constraints cannot be safely implemented.
4. Column length metadata derived from SQL is severely incomplete
When deriving schema metadata from SQL queries (e.g., via
ResultSetMetaData),column length and precision information is often missing or highly incomplete.
This limits the usefulness of metadata-driven schema inference.
5. Identifier case behavior
DuckDB behaves as follows for table identifiers:
Example:
6. UPSERT is not supported
DuckDB currently does not support UPSERT in a way that can be used by SeaTunnel
(e.g., no compatible MERGE or INSERT ... ON CONFLICT support for the connector’s upsert abstraction).
Therefore, this PR does not implement upsert for DuckDB.
7.Why no DuckDB E2E tests are added
DuckDB is an embedded database, not a standalone service.
Introducing DuckDB via Docker in E2E tests has limited practical value because: