Skip to content

Copy storage when constructing StringArray from StringArray - #103

Open
quinnj wants to merge 1 commit into
mainfrom
fix/string-array-copy
Open

quinnj wants to merge 1 commit into
mainfrom
fix/string-array-copy

Conversation

@quinnj

@quinnj quinnj commented Sep 22, 2026

Copy link
Copy Markdown
Member

Constructing StringArray from another StringArray returned the same mutable object or shared its storage. Changing the new array therefore changed the source.

Add a specialized constructor that copies the converted storage. Explicit convert calls retain their documented no-copy behavior. The copy preserves missing values and unassigned slots without reading them.

Refs #53.

Validation: the new tests failed on the original implementation; all 210 tests pass on Julia 1.12.6. Tests cover inferred and explicit element types, WeakRefString views, vector/matrix mutation isolation, missing/unassigned entries, and unchanged storage sharing through convert.

Co-authored by Codex

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