Class BinaryArray
public class BinaryArray : Array, IArrowArray, IDisposable, IReadOnlyList<byte[]>, IReadOnlyCollection<byte[]>, ICollection<byte[]>, IEnumerable<byte[]>, IEnumerable
- Inheritance
-
BinaryArray
- Implements
-
ICollection<byte[]>IEnumerable<byte[]>
- Derived
- Inherited Members
Constructors
BinaryArray(ArrayData)
public BinaryArray(ArrayData data)
Parameters
data
ArrayData
BinaryArray(ArrowTypeId, ArrayData)
public BinaryArray(ArrowTypeId typeId, ArrayData data)
Parameters
typeId
ArrowTypeIddata
ArrayData
BinaryArray(IArrowType, int, ArrowBuffer, ArrowBuffer, ArrowBuffer, int, int)
public BinaryArray(IArrowType dataType, int length, ArrowBuffer valueOffsetsBuffer, ArrowBuffer dataBuffer, ArrowBuffer nullBitmapBuffer, int nullCount = 0, int offset = 0)
Parameters
dataType
IArrowTypelength
intvalueOffsetsBuffer
ArrowBufferdataBuffer
ArrowBuffernullBitmapBuffer
ArrowBuffernullCount
intoffset
int
Properties
ValueBuffer
public ArrowBuffer ValueBuffer { get; }
Property Value
ValueOffsets
public ReadOnlySpan<int> ValueOffsets { get; }
Property Value
ValueOffsetsBuffer
public ArrowBuffer ValueOffsetsBuffer { get; }
Property Value
Values
public ReadOnlySpan<byte> Values { get; }
Property Value
Methods
Accept(IArrowArrayVisitor)
public override void Accept(IArrowArrayVisitor visitor)
Parameters
visitor
IArrowArrayVisitor
GetBytes(int)
Get the collection of bytes, as a read-only span, at a given index in the array.
public ReadOnlySpan<byte> GetBytes(int index)
Parameters
index
intIndex at which to get bytes.
Returns
- ReadOnlySpan<byte>
Returns a ReadOnlySpan<T> object.
Remarks
Note that this method cannot reliably identify null values, which are indistinguishable from empty byte collection values when seen in the context of this method's return type of ReadOnlySpan<T>. Use the IsNull(int) method or the GetBytes(int, out bool) overload instead to reliably determine null values.
Exceptions
- ArgumentOutOfRangeException
If the index is negative or beyond the length of the array.
GetBytes(int, out bool)
Get the collection of bytes, as a read-only span, at a given index in the array.
public ReadOnlySpan<byte> GetBytes(int index, out bool isNull)
Parameters
index
intIndex at which to get bytes.
isNull
boolSet to true if the value at the given index is null.
Returns
- ReadOnlySpan<byte>
Returns a ReadOnlySpan<T> object.
Exceptions
- ArgumentOutOfRangeException
If the index is negative or beyond the length of the array.
GetValueLength(int)
public int GetValueLength(int index)
Parameters
index
int
Returns
GetValueOffset(int)
[Obsolete("This method has been deprecated. Please use ValueOffsets[index] instead.")]
public int GetValueOffset(int index)
Parameters
index
int