Skip to content

Enable rs streaming and DB pinning for DuckLake #276

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

Merged
merged 1 commit into from
Jun 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/main/java/org/duckdb/DuckDBDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class DuckDBDriver implements java.sql.Driver {

static final String DUCKDB_URL_PREFIX = "jdbc:duckdb:";
static final String MEMORY_DB = ":memory:";
private static final String DUCKLAKE_URL_PREFIX = DUCKDB_URL_PREFIX + "ducklake:";

static final ScheduledThreadPoolExecutor scheduler;

Expand Down Expand Up @@ -102,6 +103,12 @@ public Connection connect(String url, Properties info) throws SQLException {
// to be established.
props.remove("path");

// DuckLake connection
if (pp.shortUrl.startsWith(DUCKLAKE_URL_PREFIX)) {
setDefaultOptionValue(props, JDBC_PIN_DB, true);
setDefaultOptionValue(props, JDBC_STREAM_RESULTS, true);
}

// Pin DB option
String pinDbOptStr = removeOption(props, JDBC_PIN_DB);
boolean pinDBOpt = isStringTruish(pinDbOptStr, false);
Expand Down