You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
System.ArgumentOutOfRangeException
Specified argument was out of the range of valid values.
at Apache.Arrow.PrimitiveArray`1.get_Values() in /home/adam/dev/arrow/csharp/src/Apache.Arrow/Arrays/PrimitiveArray.cs:line 34
at Apache.Arrow.Tests.CDataInterfaceDataTests.RoundTripArrayWithOffset() in /home/adam/dev/arrow/csharp/test/Apache.Arrow.Tests/CDataInterfaceDataTests.cs:line 83
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
The problem is that when importing the buffers, we assume the buffer length is at least array.length * typeByteWidth (see ImportFixedWidthBuffers), but really it should be (array.length + array.offset) * typeByteWidth. This example is for a fixed width array type, but other more complex array types appear to have the same problem.
I don't have any immediate plans to fix this myself, but noticed this problem as part of looking at #43266.
Component(s)
C#
The text was updated successfully, but these errors were encountered:
…rface (#44117)
### What changes are included in this PR?
Changes to the C Data importer to correctly handle nonzero offsets.
### Are these changes tested?
Yes
### Are there any user-facing changes?
No
Closes#43267
* GitHub Issue: #43267
Authored-by: Curt Hagenlocher <[email protected]>
Signed-off-by: Curt Hagenlocher <[email protected]>
Describe the bug, including details regarding any error messages, version, and platform.
Code to reproduce the problem as an XUnit test:
This throws:
The problem is that when importing the buffers, we assume the buffer length is at least
array.length * typeByteWidth
(see ImportFixedWidthBuffers), but really it should be(array.length + array.offset) * typeByteWidth
. This example is for a fixed width array type, but other more complex array types appear to have the same problem.I don't have any immediate plans to fix this myself, but noticed this problem as part of looking at #43266.
Component(s)
C#
The text was updated successfully, but these errors were encountered: