Skip to content

Cache arrow schema for streaming types#423

Merged
evertlammerts merged 2 commits intoduckdb:v1.5-variegatafrom
evertlammerts:fix/arrow-pycapsule-connection-lifetime
Apr 9, 2026
Merged

Cache arrow schema for streaming types#423
evertlammerts merged 2 commits intoduckdb:v1.5-variegatafrom
evertlammerts:fix/arrow-pycapsule-connection-lifetime

Conversation

@evertlammerts
Copy link
Copy Markdown
Collaborator

Fixes https://github.com/duckdblabs/duckdb-internal/issues/8834

Fetching the arrow schema now tries to start a transaction if there is no valid client context (duckdb/duckdb#21927). This needed for the geoparquet arrow extension. Since streams are lazy, the connection is often already closed when a stream is consumed.

This fix caches the schema in favor of keeping the connection open for the lifetime of the streams. This is part of a larger discussion on how to handle connection state in lazy arrow streams and it's likely that we want to solve this differently in 2.0.

@evertlammerts evertlammerts merged commit 6f161de into duckdb:v1.5-variegata Apr 9, 2026
15 checks passed
@evertlammerts evertlammerts deleted the fix/arrow-pycapsule-connection-lifetime branch April 9, 2026 13:29
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.

1 participant