Table of Contents

Class VariantType

Namespace
Apache.Arrow
Assembly
Apache.Arrow.dll

Extension type representing Parquet Variant values. The underlying storage is a struct with a required metadata binary field and at least one of:

  • value: binary — the variant value bytes (possibly residual when shredded).
  • typed_value: T — a typed column populated by variant shredding, where T is an Arrow primitive, struct, or list per the Parquet variant shredding spec.

Use IsShredded to check for shredded layouts. Decoding shredded values requires Apache.Arrow.Operations.Shredding.

public class VariantType : ExtensionType, IArrowType
Inheritance
VariantType
Implements
Inherited Members
Extension Methods

Constructors

VariantType()

public VariantType()

Fields

Default

public static VariantType Default

Field Value

VariantType

Properties

ExtensionMetadata

Serialized extension metadata. May be null or empty.

public override string ExtensionMetadata { get; }

Property Value

string

HasTypedValueColumn

True if the storage layout has a typed_value field (shredded).

public bool HasTypedValueColumn { get; }

Property Value

bool

HasValueColumn

True if the storage layout has a value binary field (unshredded or partially shredded). False for fully shredded layouts that omit the column.

public bool HasValueColumn { get; }

Property Value

bool

IsShredded

True if the storage layout includes any shredding (has a typed_value column).

public bool IsShredded { get; }

Property Value

bool

Name

The canonical extension type name (e.g. "arrow.uuid").

public override string Name { get; }

Property Value

string

TypedValueField

The typed_value field when HasTypedValueColumn is true; otherwise null.

public Field TypedValueField { get; }

Property Value

Field

Methods

CreateArray(IArrowArray)

Create the appropriate ExtensionArray wrapper for a storage array.

public override ExtensionArray CreateArray(IArrowArray storageArray)

Parameters

storageArray IArrowArray

Returns

ExtensionArray