Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.17.1
Description
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
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.
Attachments
Issue Links
- links to