Skip to content

fix: keep lazy runtime state out of DataArray attrs#66

Merged
hrodmn merged 1 commit into
mainfrom
fix/attrs-state
Jun 1, 2026
Merged

fix: keep lazy runtime state out of DataArray attrs#66
hrodmn merged 1 commit into
mainfrom
fix/attrs-state

Conversation

@hrodmn
Copy link
Copy Markdown
Collaborator

@hrodmn hrodmn commented Jun 1, 2026

Avoid storing the lazycogs backend and DuckDB client in xarray attrs so DataArray.copy(), sortby(), and downstream write paths can deep-copy metadata without trying to pickle live runtime objects.

Recover the backend for lazycogs.explain() from the lazy backing array instead, and preserve explain behavior for sliced and reordered arrays.

resolves #65
resolves #64

Avoid storing the lazycogs backend and DuckDB client in xarray attrs so
DataArray.copy(), sortby(), and downstream write paths can deep-copy metadata
without trying to pickle live runtime objects.

Recover the backend for lazycogs.explain() from the lazy backing array instead,
and preserve explain behavior for sliced and reordered arrays.
@github-actions github-actions Bot added the fix label Jun 1, 2026
@hrodmn hrodmn merged commit fc4b3d0 into main Jun 1, 2026
5 of 6 checks passed
@hrodmn hrodmn deleted the fix/attrs-state branch June 1, 2026 14:35
@hrodmn hrodmn mentioned this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid storing lazy runtime state in DataArray.attrs Error during DataArray.copy

1 participant