Struct NumericValueConverter

template<typename SOURCE_TYPE, typename TARGET_TYPE>
struct NumericValueConverter : public TargetValueConverter

Public Types

template<>
using ColumnDataPtr = std::unique_ptr<TARGET_TYPE, CheckedMallocDeleter<TARGET_TYPE>>
template<>
using ElementsBufferColumnPtr = ColumnDataPtr
template<>
using CasterFunc = std::function<TARGET_TYPE(SOURCE_TYPE, bool, TARGET_TYPE)>

Public Functions

NumericValueConverter(const ColumnDescriptor *cd, size_t num_rows, TARGET_TYPE nullValue, SOURCE_TYPE nullCheckValue, bool doNullCheck)
~NumericValueConverter()
void setValueCaster(CasterFunc caster)
void populateFixedArrayNullSentinel(size_t num_rows)
void allocateColumnarData(size_t num_rows)
ElementsBufferColumnPtr allocateColumnarBuffer(size_t num_rows)
void convertElementToColumnarFormat(size_t row, typename ElementsBufferColumnPtr::pointer columnData, const ScalarTargetValue *scalarValue)
void convertToColumnarFormat(size_t row, const ScalarTargetValue *scalarValue)
void convertToColumnarFormat(size_t row, const TargetValue *value)
void processArrayBuffer(std::unique_ptr<std::vector<std::pair<size_t, ElementsBufferColumnPtr>>> &array_buffer, std::unique_ptr<std::vector<ArrayDatum>>::pointer arrayData)
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData)

Public Members

ColumnDataPtr column_data_
TARGET_TYPE null_value_
SOURCE_TYPE null_check_value_
bool do_null_check_
TARGET_TYPE fixed_array_null_value_
CasterFunc checked_caster_ = nullptr
boost_variant_accessor<SOURCE_TYPE> SOURCE_TYPE_ACCESSOR