Table of Contents

Class Decimal128Array

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

Constructors

Decimal128Array(ArrayData)

public Decimal128Array(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

GetSqlDecimal(int)

public SqlDecimal? GetSqlDecimal(int index)

Parameters

index int

Returns

SqlDecimal?

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?>

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. Decimal128 is a fixed point 128 bit value where up to 128 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 Decimal128Type 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. By contrast, SqlDecimal can store a decimal128 value with full fidelity.

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

Parameters

index int
value decimal?

Returns

bool