Skip to content

Conversation

@IvyZX
Copy link
Collaborator

@IvyZX IvyZX commented Sep 24, 2025

This allows us to make sharding changes to the underlying array before passing it around by reference.

_value = value

object.__setattr__(self, 'raw_value', _value)
object.__setattr__(self, 'raw_value', value)
Copy link
Collaborator

Choose a reason for hiding this comment

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

With this change we shouldn't allow Ref's to be passed as an input, can we raise if is_array_ref(value) here and then maybe remove the same check bellow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Discussed offline and we concluded each variable should own its own array/ref and don't allow sharing.

Implemented and changed mutable_array_test to reflect it.

@copybara-service copybara-service bot merged commit a9dccc0 into google:main Sep 26, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants