You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/07/07 12:40:00 UTC
[jira] [Updated] (ARROW-8886) [C#] Decide and implement appropriate
behaviour for Array builder resize to negative size
[ https://issues.apache.org/jira/browse/ARROW-8886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ARROW-8886:
----------------------------------
Labels: pull-request-available (was: )
> [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
> Time Spent: 10m
> 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)