Table of Contents

Class Decimal256Array

Namespace
Apache.Arrow
Assembly
Apache.Arrow.dll
public class Decimal256Array : FixedSizeBinaryArray, IArrowArray, IDisposable, IReadOnlyList<byte[]>, IReadOnlyCollection<byte[]>, IEnumerable<byte[]>, IReadOnlyList<SqlDecimal?>, IReadOnlyCollection<SqlDecimal?>, IEnumerable<SqlDecimal?>, IReadOnlyList<string?>, IReadOnlyCollection<string?>, IEnumerable<string?>, IEnumerable
Inheritance
Decimal256Array
Implements
Inherited Members

Constructors

Decimal256Array(ArrayData)

public Decimal256Array(ArrayData data)

Parameters

data ArrayData

Properties

ByteWidth

public int ByteWidth { get; }

Property Value

int

Precision

public int Precision { get; }

Property Value

int

Scale

public int Scale { get; }

Property Value

int

Methods

Accept(IArrowArrayVisitor)

public override void Accept(IArrowArrayVisitor visitor)

Parameters

visitor IArrowArrayVisitor

GetString(int)

public string? GetString(int index)

Parameters

index int

Returns

string

GetValue(int)

Gets the decimal value at the index of the array. May throw an exception if the value can't be expressed as a decimal. See TryGetValue(int, out decimal?) for details.

public decimal? GetValue(int index)

Parameters

index int

Returns

decimal?

ToList(bool)

public IList<decimal?> ToList(bool includeNulls = false)

Parameters

includeNulls bool

Returns

IList<decimal?>

TryGetSqlDecimal(int, out SqlDecimal?)

public bool TryGetSqlDecimal(int index, out SqlDecimal? value)

Parameters

index int
value SqlDecimal?

Returns

bool

TryGetValue(int, out decimal?)

Gets the decimal value at the index of the array. Returns false if the value can't be expressed as a decimal. decimal is a 128-bit floating point value with a 5 bit base-10 exponent and a 96-bit base-10 mantissa. Decimal256 is a fixed point 256 bit value where up to 256 bits can be used for the mantissa, and both the number of bits and the exponent are determined by the array's type (which is out-of-band). This means that a Decimal256Type whose precision minus scale is greater than 28 might produce an overflow when stored as a .NET decimal. It may also cause rounding for precisions greater than 28. These will silently succeed.

public bool TryGetValue(int index, out decimal? value)

Parameters

index int
value decimal?

Returns

bool