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

refactor(duckdb): pass temp_directory through as-is to duckdb.connect #10433

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

NickCrews
Copy link
Contributor

@NickCrews NickCrews commented Nov 4, 2024

Let's make the pass-through from ibis to duckdb more transparent, so you get closer to the same behavior as when using import duckdb; duckdb.connect().

I considered also removing the nicety of creating the temp_dir for users, but decided to keep it.
Now, we only create parent. duckdb will make dir itself only if it needs. This means that for low-memory loads,
a dir might never be needed. This better matches duckdb's behavior.
Also, adjust our test to really check for the end desired behavior, not an implementation detail
of if WE create the dir.

Related to #6974

BREAKING CHANGE: Special handling of the temp_directory argument passed to Ibis is removed in favor of passing the argument through directly to duckdb.connect. Interior nodes of directory trees must be created, e.g., using Path.mkdir(exists_ok=True, parents=True), mkdir -p, etc.

@github-actions github-actions bot added the duckdb The DuckDB backend label Nov 4, 2024
@github-actions github-actions bot added tests Issues or PRs related to tests sql Backends that generate SQL labels Nov 4, 2024
NickCrews added a commit to NickCrews/ibis that referenced this pull request Nov 4, 2024
NickCrews added a commit to NickCrews/ibis that referenced this pull request Nov 4, 2024
Also, only create parent of the temp dir. duckdb will make dir itself only if it needs. Maybe the user can avoid a temp dir
if they are only doing low-memory stuff.

fixes ibis-project#10433
ibis/backends/duckdb/__init__.py Outdated Show resolved Hide resolved
@cpcloud cpcloud added this to the 10.0 milestone Nov 11, 2024
…ect`

BREAKING CHANGE: Special handling of the `temp_directory` argument passed to Ibis is removed in favor of passing the argument through directly to `duckdb.connect`. Interior nodes of directory trees must be created, e.g., using `Path.mkdir(exists_ok=True, parents=True)`, `mkdir -p`, etc.
@cpcloud cpcloud changed the title feat(duckdb): use duckdb's default temp_directory refactor(duckdb): pass temp_directory through as-is to duckdb.connect Nov 11, 2024
@cpcloud cpcloud marked this pull request as ready for review November 11, 2024 13:56
@cpcloud cpcloud enabled auto-merge (rebase) November 11, 2024 13:56
@cpcloud cpcloud merged commit 4ea041f into ibis-project:main Nov 11, 2024
78 checks passed
@NickCrews NickCrews added the breaking change Changes that introduce an API break at any level label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Changes that introduce an API break at any level duckdb The DuckDB backend sql Backends that generate SQL tests Issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants