Add explicit .pl(lazy=True) overload by J-Meyers · Pull Request #172 · duckdb/duckdb-python

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@J-Meyers

Copy link Copy Markdown

Contributor

@J-Meyers J-Meyers commented

Nov 9, 2025

Followed: python/mypy#8634

Prior to this mypy would complain when using .pl(lazy=True).collect() this will prevent that

@evertlammerts

Copy link Copy Markdown

Collaborator

Hey @J-Meyers , thanks for the PR. I think the third (Union) overload is not necessary?

@J-Meyers

Copy link Copy Markdown

Contributor Author

J-Meyers commented

Nov 10, 2025

via email

I think it still is necessary if for some reason the value of lazy is determined at runtime instead of being a simple literal. One case if this could be of you had some wrapper function around the calls to duckdb that took lazy as an argument, then that could return either lazy frames or regular.

________________________________ From: Evert Lammerts ***@***.***> Sent: Monday, November 10, 2025 4:09:09 AM To: duckdb/duckdb-python ***@***.***> Cc: Julian Meyers ***@***.***>; Mention ***@***.***> Subject: Re: [duckdb/duckdb-python] Add explicit .pl(lazy=True) overload (PR #172) [https://avatars.githubusercontent.com/u/2683350?s=20&v=4]evertlammerts left a comment (duckdb/duckdb-python#172)<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_duckdb_duckdb-2Dpython_pull_172-23issuecomment-2D3510607924&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=MdlGNggs4ba2ijajU3oxJJgnT7XUUcVtAcqALzH8Cc4&m=z7ONwbMan0UnXCBdhxWWdlc5X5zfUoiJ46gCykRlbv-J07Y5j6xrH74DE1-aXsCm&s=1Yc9bQBX6rtfc7J3_sVaKEgW_9SrH3Xe2ZWjpLzpShQ&e=> Hey @J-Meyers<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_J-2DMeyers&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=MdlGNggs4ba2ijajU3oxJJgnT7XUUcVtAcqALzH8Cc4&m=z7ONwbMan0UnXCBdhxWWdlc5X5zfUoiJ46gCykRlbv-J07Y5j6xrH74DE1-aXsCm&s=Qh1rh7REFMFudNkVCuZzCS8q1aVmd89KVI7IlIuvs60&e=> , thanks for the PR. I think the third (Union) overload is not necessary? — Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_duckdb_duckdb-2Dpython_pull_172-23issuecomment-2D3510607924&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=MdlGNggs4ba2ijajU3oxJJgnT7XUUcVtAcqALzH8Cc4&m=z7ONwbMan0UnXCBdhxWWdlc5X5zfUoiJ46gCykRlbv-J07Y5j6xrH74DE1-aXsCm&s=1Yc9bQBX6rtfc7J3_sVaKEgW_9SrH3Xe2ZWjpLzpShQ&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AM453PKN6V6RR7DMFOCUXVD34BP3ZAVCNFSM6AAAAACLRUCDNSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMJQGYYDOOJSGQ&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=MdlGNggs4ba2ijajU3oxJJgnT7XUUcVtAcqALzH8Cc4&m=z7ONwbMan0UnXCBdhxWWdlc5X5zfUoiJ46gCykRlbv-J07Y5j6xrH74DE1-aXsCm&s=qA6Jfc-oDmaZFW5tHoRvtH62wmNEZAcgEJl83t5u9WI&e=>. You are receiving this because you were mentioned.

Copy link Copy Markdown

Collaborator

@evertlammerts evertlammerts left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@evertlammerts evertlammerts merged commit 7ccc8e9 into duckdb:v1.4-andium

Nov 10, 2025

3 of 14 checks passed

@J-Meyers J-Meyers deleted the pl_lazy_typing branch

November 10, 2025 15:45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@evertlammerts evertlammerts evertlammerts approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@J-Meyers @evertlammerts