Struct ShreddedArray
- Namespace
- Apache.Arrow.Operations.Shredding
- Assembly
- Apache.Arrow.Operations.dll
Reader for a single row of a shredded-array slot. The underlying storage
is a list of element groups (each a {value, typed_value} struct).
public ref struct ShreddedArray
- Inherited Members
Properties
ElementCount
The number of shredded elements at this row. Only valid when IsTypedList is true.
public int ElementCount { get; }
Property Value
Exceptions
- InvalidOperationException
If the array is stored as a residual.
IsTypedList
True when the typed list is populated at this row (the array is stored element-by-element in the shredded column).
public bool IsTypedList { get; }
Property Value
Methods
GetElement(int)
Gets a ShreddedVariant reader for the element at position
index. Only valid when IsTypedList is true.
public ShreddedVariant GetElement(int index)
Parameters
indexint
Returns
ToVariantValue()
Materializes the array into a VariantValue. If the typed list is null at this row, falls back to the residual binary (the array was stored unshredded for this row). When neither is populated, the slot encodes a variant null — consistent with ShreddedObject and ShreddedVariant.
public VariantValue ToVariantValue()
Returns
TryGetResidualReader(out VariantReader)
If the array is stored as a residual at this row (not shredded), returns
a VariantReader over the residual bytes. Callers can then
inspect the array via VariantArrayReader.
public bool TryGetResidualReader(out VariantReader reader)
Parameters
readerVariantReader