Skip to content

Remove the public Array::data_mut accessor - #11574

Merged
connortsui20 merged 1 commit into
developfrom
ct/unsafe-array-data-mut
Nov 17, 2026
Merged

connortsui20 merged 1 commit into
developfrom
ct/unsafe-array-data-mut

Conversation

@connortsui20

@connortsui20 connortsui20 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Array::data_mut lets callers replace the entire encoding payload while the array keeps its original dtype, length, child slots, and cached statistics. For example, replacing the payload with a shorter buffer leaves the array reporting its original length.

#7677 added the method to advance the chunked builder's cursor in place. #8967 moved that caller to the crate-private with_data_mut helper. The public method is now unused in the workspace and is removed.

@connortsui20

Copy link
Copy Markdown
Member Author

We can also just remove this? It doesn't seem like anyone uses this function

@connortsui20
connortsui20 marked this pull request as ready for review November 17, 2026 21:27
@robert3005

Copy link
Copy Markdown
Contributor

It's used in chunked array canonical function, one caller in the codebase - I think there's a better way to express this that would let us remove it.

@robert3005

Copy link
Copy Markdown
Contributor

You're correct @connortsui20 delete it

@robert3005

Copy link
Copy Markdown
Contributor

I have migrated the users to with_data_mut which is pub(crate)

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20
connortsui20 force-pushed the ct/unsafe-array-data-mut branch from fe69bae to 5d85de0 Compare November 17, 2026 21:38
@connortsui20 connortsui20 changed the title Make Array::data_mut unsafe Remove Array::data_mut Nov 17, 2026
@connortsui20 connortsui20 changed the title Remove Array::data_mut Remove the public Array::data_mut accessor Nov 17, 2026
@connortsui20
connortsui20 enabled stacked auto-merge (squash) November 17, 2026 21:41
@connortsui20
connortsui20 merged commit e85b7d8 into develop Nov 17, 2026
116 of 125 checks passed
@connortsui20
connortsui20 deleted the ct/unsafe-array-data-mut branch November 17, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants