Skip to content

Add support to propagate args to the connection and other code clean ups#23

Merged
wudidapaopao merged 2 commits into
chdb-io:mainfrom
ahmedriza:feature/propagate-session-arguments
May 3, 2026
Merged

Add support to propagate args to the connection and other code clean ups#23
wudidapaopao merged 2 commits into
chdb-io:mainfrom
ahmedriza:feature/propagate-session-arguments

Conversation

@ahmedriza

@ahmedriza ahmedriza commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Add support for propagating Session arguments to the chdb connection. This is essential when TLS configuration is required (for example when using the remoteSecure table function).

Clean up code in SessionBuilder::build, Connection::open, remove unmaintainted dev dependency tempdir (replaced with tempfile) and add more tests.

@CLAassistant

CLAassistant commented Apr 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ahmedriza

ahmedriza commented Apr 4, 2026

Copy link
Copy Markdown
Contributor Author

Reverted the tempdir removal. It looks like tempfile is causing SIGSEGV when loading libchdb.so in integration tests on Linux. Doesn't happen on Mac OS. I am not entirely sure why.

Also, note that the same thing happens on the current main branch too, if we try to use tempfile instead of tempdir. So it has nothing to do with any changes on this branch. In fact, the SIGSEGV happens before any Rust code is executed at all.

@wudidapaopao

Copy link
Copy Markdown
Contributor

Thanks for contributing!

@austin-barrington

Copy link
Copy Markdown
Contributor

Connection::open prepends CHDB_PROGRAM_NAME ("clickhouse") itself so any existing caller doing the previously-documented Connection::open(&["clickhouse", "--path=/tmp/db"]) will now produce argv ["clickhouse", "clickhouse", "--path=/tmp/db"].

This will either be handled by the clickhouse client or not, but worth noting

@wudidapaopao wudidapaopao merged commit d243121 into chdb-io:main May 3, 2026
2 checks passed
@wudidapaopao

Copy link
Copy Markdown
Contributor

Connection::open prepends CHDB_PROGRAM_NAME ("clickhouse") itself so any existing caller doing the previously-documented Connection::open(&["clickhouse", "--path=/tmp/db"]) will now produce argv ["clickhouse", "clickhouse", "--path=/tmp/db"].

This will either be handled by the clickhouse client or not, but worth noting

Thanks for pointing this out. This works with the current chDB C API: the second "clickhouse" is effectively ignored and "--path=/tmp/db" is still parsed correctly. But I agree it is redundant.

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.

4 participants