Пример #1
0
    public decimal GetDecimal(int columnIndex)
    {
        ColumnSchema column = CheckType(columnIndex,
                                        KuduTypeFlags.Decimal32 |
                                        KuduTypeFlags.Decimal64 |
                                        KuduTypeFlags.Decimal128);

        int scale = column.TypeAttributes !.Scale.GetValueOrDefault();
        ReadOnlySpan <byte> data = GetRowAllocColumn(columnIndex, column.Size);

        return(KuduEncoder.DecodeDecimal(data, column.Type, scale));
    }