Struct ShreddedObject
- Namespace
- Apache.Arrow.Operations.Shredding
- Assembly
- Apache.Arrow.Operations.dll
Reader for a single row of a shredded-object slot. Provides field-wise access to both typed sub-columns and residual unshredded fields.
public ref struct ShreddedObject
- Inherited Members
Properties
FieldNames
The names of the shredded fields, in schema order.
public IEnumerable<string> FieldNames { get; }
Property Value
Methods
GetField(string)
Gets the shredded reader for a named field. The field must exist in the schema.
public ShreddedVariant GetField(string name)
Parameters
namestring
Returns
Exceptions
- KeyNotFoundException
If
nameis not a shredded field.
ToVariantValue()
Materializes the whole shredded object into a VariantValue,
merging typed-column fields with residual unshredded fields. When the
typed_value column is null at this row, the residual is returned
as-is (it may be any variant type, not just an object).
public VariantValue ToVariantValue()
Returns
TryGetField(string, out ShreddedVariant)
Tries to get a reader for a shredded sub-field by name. Returns false if
name isn't a shredded field (it may still exist in the
residual — use TryGetResidualReader(out VariantReader) to inspect).
public bool TryGetField(string name, out ShreddedVariant field)
Parameters
namestringfieldShreddedVariant
Returns
TryGetResidualReader(out VariantReader)
If the object's residual binary is populated at this row, returns a VariantReader over it. The residual holds whatever fields were not shredded (or, for a non-object row, the whole value).
public bool TryGetResidualReader(out VariantReader reader)
Parameters
readerVariantReader