[
https://issues.apache.org/jira/browse/ARROW-8886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Erhardt resolved ARROW-8886.
---------------------------------
Fix Version/s: 1.0.0
Resolution: Fixed
Issue resolved by pull request 7657
[https://github.com/apache/arrow/pull/7657]
> [C#] Decide and implement appropriate behaviour for Array builder resize to
> negative size
> -----------------------------------------------------------------------------------------
>
> Key: ARROW-8886
> URL: https://issues.apache.org/jira/browse/ARROW-8886
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C#
> Affects Versions: 0.17.1
> Reporter: Adam Szmigin
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.0.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> h1. Summary
> Currently, the {{ArrowBuffer.Builder}} class accepts a negative value to the
> {{Resize()}} method, and treats it as though the caller passed zero. This
> was implemented deliberately, as there is an explicit unit test to verify the
> behaviour.
> However, it is also unusual. By way of comparison:
> * The {{System.Array.Resize<T>()}} method throws
> {{ArgumentOutOfRangeException}} if a negative value is passed:
> https://docs.microsoft.com/en-us/dotnet/api/system.array.resize?view=netcore-3.1
> * The Arrow C++ implementation will refuse to accept a negative length:
> https://github.com/apache/arrow/blob/master/cpp/src/arrow/array/builder_base.h#L194
> h1. Acceptance Criteria
> * The behaviour when receiving a negative length to a {{Resize()}} method
> _must_ be agreed upon.
> * Appropriate changes _must_ be made to the codebase in accordance with the
> outcome of the above agreement.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)