OmniSciDB
a5dc49c757
|
#include <TargetValueConvertersImpl.h>
Public Types | |
using | ElementsDataColumnPtr = typename NumericValueConverter< int64_t, TARGET_TYPE >::ColumnDataPtr |
using | ElementsBufferColumnPtr = std::unique_ptr< std::vector< int32_t >> |
Public Types inherited from NumericValueConverter< int64_t, TARGET_TYPE > | |
using | ColumnDataPtr = std::unique_ptr< TARGET_TYPE, CheckedMallocDeleter< TARGET_TYPE >> |
using | ElementsBufferColumnPtr = ColumnDataPtr |
using | CasterFunc = std::function< TARGET_TYPE(int64_t, bool, TARGET_TYPE)> |
Public Member Functions | |
DictionaryValueConverter (const shared::StringDictKey &source_dict_key, const ColumnDescriptor *targetDescriptor, const Catalog_Namespace::Catalog &target_cat, size_t num_rows, TARGET_TYPE nullValue, int64_t nullCheckValue, bool doNullCheck, StringDictionaryProxy *literals_dict, StringDictionaryProxy *source_dict_proxy) | |
~DictionaryValueConverter () override | |
ElementsBufferColumnPtr | allocateColumnarBuffer (size_t num_rows) |
void | convertElementToColumnarFormat (size_t row, typename ElementsBufferColumnPtr::pointer columnBuffer, const ScalarTargetValue *scalarValue) |
void | convertToColumnarFormat (size_t row, const ScalarTargetValue *scalarValue) |
void | convertToColumnarFormat (size_t row, const TargetValue *value) override |
int32_t | convertTransientStringIdToPermanentId (int32_t &transient_string_id) |
NumericValueConverter< int64_t, TARGET_TYPE >::ColumnDataPtr | processBuffer (ElementsBufferColumnPtr buffer) |
void | processArrayBuffer (std::unique_ptr< std::vector< std::pair< size_t, ElementsBufferColumnPtr >>> &array_buffer, std::unique_ptr< std::vector< ArrayDatum >>::pointer arrayData) |
void | finalizeDataBlocksForInsertData () override |
void | addDataBlocksToInsertData (Fragmenter_Namespace::InsertData &insertData) override |
Public Member Functions inherited from NumericValueConverter< int64_t, TARGET_TYPE > | |
NumericValueConverter (const ColumnDescriptor *cd, size_t num_rows, TARGET_TYPE nullValue, int64_tnullCheckValue, bool doNullCheck) | |
~NumericValueConverter () override | |
void | setValueCaster (CasterFunc caster) |
void | populateFixedArrayNullSentinel (size_t num_rows) |
void | allocateColumnarData (size_t num_rows) override |
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) override |
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) override |
Public Member Functions inherited from TargetValueConverter | |
TargetValueConverter (const ColumnDescriptor *cd) | |
virtual | ~TargetValueConverter () |
Definition at line 160 of file TargetValueConvertersImpl.h.
using DictionaryValueConverter< TARGET_TYPE >::ElementsBufferColumnPtr = std::unique_ptr<std::vector<int32_t>> |
Definition at line 164 of file TargetValueConvertersImpl.h.
using DictionaryValueConverter< TARGET_TYPE >::ElementsDataColumnPtr = typename NumericValueConverter<int64_t, TARGET_TYPE>::ColumnDataPtr |
Definition at line 162 of file TargetValueConvertersImpl.h.
|
inline |
Definition at line 180 of file TargetValueConvertersImpl.h.
References DictionaryValueConverter< TARGET_TYPE >::allocateColumnarBuffer(), DictionaryValueConverter< TARGET_TYPE >::buffer_null_sentinal_, CHECK, CHECK_EQ, DictionaryValueConverter< TARGET_TYPE >::column_buffer_, ColumnDescriptor::columnType, shared::StringDictKey::db_id, shared::StringDictKey::dict_id, Catalog_Namespace::SysCatalog::getCatalog(), Catalog_Namespace::Catalog::getDatabaseId(), Catalog_Namespace::Catalog::getMetadataForDict(), SQLTypeInfo::getStringDictKey(), StringDictionaryProxy::getTransientVector(), Catalog_Namespace::SysCatalog::instance(), DictionaryValueConverter< TARGET_TYPE >::literals_dict_, DictionaryValueConverter< TARGET_TYPE >::literals_lookup_, DictionaryValueConverter< TARGET_TYPE >::source_dict_desc_, DictionaryValueConverter< TARGET_TYPE >::source_dict_proxy_, DictionaryValueConverter< TARGET_TYPE >::target_dict_desc_, StringDictionaryProxy::transientIndexToId(), and DictionaryValueConverter< TARGET_TYPE >::use_literals_.
|
inlineoverride |
Definition at line 231 of file TargetValueConvertersImpl.h.
|
inlineoverridevirtual |
Implements TargetValueConverter.
Definition at line 407 of file TargetValueConvertersImpl.h.
References NumericValueConverter< int64_t, TARGET_TYPE >::column_data_, TargetValueConverter::column_descriptor_, ColumnDescriptor::columnId, Fragmenter_Namespace::InsertData::columnIds, Fragmenter_Namespace::InsertData::data, DictionaryValueConverter< TARGET_TYPE >::finalizeDataBlocksForInsertData(), and DataBlockPtr::numbersPtr.
|
inline |
Definition at line 233 of file TargetValueConvertersImpl.h.
References CHECK.
Referenced by DictionaryValueConverter< TARGET_TYPE >::DictionaryValueConverter().
|
inline |
Definition at line 238 of file TargetValueConvertersImpl.h.
References DictionaryValueConverter< TARGET_TYPE >::buffer_null_sentinal_, NumericValueConverter< int64_t, TARGET_TYPE >::do_null_check_, NumericValueConverter< int64_t, TARGET_TYPE >::null_check_value_, and NumericValueConverter< int64_t, TARGET_TYPE >::SOURCE_TYPE_ACCESSOR.
Referenced by DictionaryValueConverter< TARGET_TYPE >::convertToColumnarFormat().
|
inline |
Definition at line 252 of file TargetValueConvertersImpl.h.
References DictionaryValueConverter< TARGET_TYPE >::column_buffer_, and DictionaryValueConverter< TARGET_TYPE >::convertElementToColumnarFormat().
Referenced by DictionaryValueConverter< TARGET_TYPE >::convertToColumnarFormat().
|
inlineoverridevirtual |
Implements TargetValueConverter.
Definition at line 256 of file TargetValueConvertersImpl.h.
References DictionaryValueConverter< TARGET_TYPE >::convertToColumnarFormat(), and TargetValueConverter::SCALAR_TARGET_VALUE_ACCESSOR.
|
inline |
Definition at line 263 of file TargetValueConvertersImpl.h.
References StringDictionaryProxy::getOrAdd(), StringDictionaryProxy::getString(), and DictionaryValueConverter< TARGET_TYPE >::source_dict_proxy_.
Referenced by DictionaryValueConverter< TARGET_TYPE >::processBuffer().
|
inlineoverridevirtual |
Reimplemented from TargetValueConverter.
Definition at line 400 of file TargetValueConvertersImpl.h.
References DictionaryValueConverter< TARGET_TYPE >::column_buffer_, NumericValueConverter< int64_t, TARGET_TYPE >::column_data_, and DictionaryValueConverter< TARGET_TYPE >::processBuffer().
Referenced by DictionaryValueConverter< TARGET_TYPE >::addDataBlocksToInsertData().
|
inline |
Definition at line 353 of file TargetValueConvertersImpl.h.
References is_null(), StringDictionary::populate_string_array_ids(), DictionaryValueConverter< TARGET_TYPE >::processBuffer(), DictionaryValueConverter< TARGET_TYPE >::source_dict_desc_, DictDescriptor::stringDict, DictionaryValueConverter< TARGET_TYPE >::target_dict_desc_, and DictionaryValueConverter< TARGET_TYPE >::use_literals_.
|
inline |
Definition at line 272 of file TargetValueConvertersImpl.h.
References DictionaryValueConverter< TARGET_TYPE >::buffer_null_sentinal_, checked_malloc(), DictionaryValueConverter< TARGET_TYPE >::convertTransientStringIdToPermanentId(), DictDescriptor::dictRef, StringDictionaryProxy::getTransientVector(), DictionaryValueConverter< TARGET_TYPE >::literals_lookup_, NumericValueConverter< int64_t, TARGET_TYPE >::null_value_, StringDictionary::populate_string_ids(), DictionaryValueConverter< TARGET_TYPE >::source_dict_desc_, DictionaryValueConverter< TARGET_TYPE >::source_dict_proxy_, DictDescriptor::stringDict, DictionaryValueConverter< TARGET_TYPE >::target_dict_desc_, to_string(), and DictionaryValueConverter< TARGET_TYPE >::use_literals_.
Referenced by DictionaryValueConverter< TARGET_TYPE >::finalizeDataBlocksForInsertData(), and DictionaryValueConverter< TARGET_TYPE >::processArrayBuffer().
const int32_t DictionaryValueConverter< TARGET_TYPE >::buffer_null_sentinal_ = std::numeric_limits<int32_t>::min() |
ElementsBufferColumnPtr DictionaryValueConverter< TARGET_TYPE >::column_buffer_ |
const StringDictionaryProxy* DictionaryValueConverter< TARGET_TYPE >::literals_dict_ |
Definition at line 175 of file TargetValueConvertersImpl.h.
Referenced by DictionaryValueConverter< TARGET_TYPE >::DictionaryValueConverter().
std::unordered_map<int32_t, int32_t> DictionaryValueConverter< TARGET_TYPE >::literals_lookup_ |
Definition at line 177 of file TargetValueConvertersImpl.h.
Referenced by DictionaryValueConverter< TARGET_TYPE >::DictionaryValueConverter(), and DictionaryValueConverter< TARGET_TYPE >::processBuffer().
const DictDescriptor* DictionaryValueConverter< TARGET_TYPE >::source_dict_desc_ |
StringDictionaryProxy* DictionaryValueConverter< TARGET_TYPE >::source_dict_proxy_ |
const DictDescriptor* DictionaryValueConverter< TARGET_TYPE >::target_dict_desc_ |
bool DictionaryValueConverter< TARGET_TYPE >::use_literals_ |