Table of Contents

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

IEnumerable<string>

Methods

GetField(string)

Gets the shredded reader for a named field. The field must exist in the schema.

public ShreddedVariant GetField(string name)

Parameters

name string

Returns

ShreddedVariant

Exceptions

KeyNotFoundException

If name is 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

VariantValue

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

name string
field ShreddedVariant

Returns

bool

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

reader VariantReader

Returns

bool