GH-36560: [MATLAB] Remove the DeepCopy name-value pair from arrow.array.<Numeric>Array
constructors
#36561
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale for this change
We initially added the
DeepCopy
name-value pair to the numeric array class constructors for testing purposes. WhenDeepCopy=true
, the proxy classes copy the data from the MATLAB array when creating the underlyingstd::shared_ptr<arrow::NumericArray<CType>>
. By default, we don't make a copy and instead store the original array as a property namedMatlabArray
. Doing so keeps the backing memory of the arrow array alive and avoids a copy.What changes are included in this PR?
DeepCopy
is no longer accepted as a name-value pair by the constructors of the numeric array classes.Are these changes tested?
No tests were needed.
Are there any user-facing changes?
This is technically a user facing change, but the MATLAB interface is still experimental and under active development. We don't expect anyone to be affected by this change.
DeepCopy
name-value pair fromarrow.array.<Numeric>Array
constructors #36560