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

enh: Add backend argument to lazy #1889

Closed
MarcoGorelli opened this issue Jan 28, 2025 · 1 comment · Fixed by #1914
Closed

enh: Add backend argument to lazy #1889

MarcoGorelli opened this issue Jan 28, 2025 · 1 comment · Fixed by #1914
Labels
api design enhancement New feature or request

Comments

@MarcoGorelli
Copy link
Member

Similar to #1888

I think lazy could have a backend: ModuleType | Implementation | LazyBackend argument, so all of the following could be supported:

df: nw.DataFrame
df.lazy('duckdb')
df.lazy(duckdb)
df.lazy(nw.Implementation.DUCKDB)

LazyBackend could be Literal['polars', 'dask', 'duckdb', 'pyspark']. There may be some combinations of eager to lazy backends on which we'd have to raise, but in most cases we can probably manage by going via PyArrow

Ultimately, I think

nw.from_dict(data, backend='pyarrow').lazy('duckdb')

would be pretty ergonomic and useful

@MarcoGorelli MarcoGorelli added enhancement New feature or request api design labels Jan 28, 2025
@raisadz
Copy link
Contributor

raisadz commented Jan 29, 2025

I would like to take this issue if no one else has started working on it yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api design enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants