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

test(duckdb): add test for chunk_size param in to_pyarrow_batches #10480

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

anjakefala
Copy link
Contributor

Description of changes

Added test to finish off #10445

@github-actions github-actions bot added tests Issues or PRs related to tests duckdb The DuckDB backend labels Nov 12, 2024
"age": np.random.randint(20, 70, size=500000),
}
)
batches = t.to_pyarrow_batches(chunk_size=100_000)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
batches = t.to_pyarrow_batches(chunk_size=100_000)
batches = con.to_pyarrow_batches(t, chunk_size=100_000)

You need to use con here, otherwise you'll implicitly set the default backend, which is what's currently causing CI to fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll absolutely change it! When does using the table implicitly set the default backend?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever you don't explicitly use a backend instance like con. Something has to do the compute, and if you haven't specified that thing explicitly by constructing a backend instance and then using it, or by calling ibis.set_backend(<some backend instance>) then Ibis is going to pick the default backend (DuckDB).

ibis/backends/duckdb/tests/test_client.py Outdated Show resolved Hide resolved
ibis/backends/duckdb/tests/test_client.py Outdated Show resolved Hide resolved
ibis/backends/duckdb/tests/test_client.py Outdated Show resolved Hide resolved
@anjakefala anjakefala requested a review from cpcloud November 13, 2024 21:03
@cpcloud cpcloud added this to the 10.0 milestone Nov 14, 2024
@cpcloud cpcloud added the ecosystem External projects or activities label Nov 14, 2024
@cpcloud cpcloud merged commit 9446ab6 into ibis-project:main Nov 14, 2024
77 checks passed
@anjakefala anjakefala deleted the kef/test_10443 branch November 14, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duckdb The DuckDB backend ecosystem External projects or activities tests Issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants