17 #ifndef TARGET_VALUE_CONVERTERS_IMPL_H_
18 #define TARGET_VALUE_CONVERTERS_IMPL_H_
31 if (std::is_floating_point<T>::value) {
32 return static_cast<T>(inline_fp_null_array_value<T>());
34 return static_cast<T>(inline_int_null_array_value<T>());
38 template <
typename SOURCE_TYPE,
typename RETURN_TYPE,
typename CHECKED_CAST_TYPE>
39 RETURN_TYPE
checked_cast(SOURCE_TYPE val,
bool check_null, RETURN_TYPE null_value) {
40 if (!std::is_same<SOURCE_TYPE, CHECKED_CAST_TYPE>::value) {
43 CHECKED_CAST_TYPE castedVal = boost::numeric_cast<CHECKED_CAST_TYPE>(val);
44 if (check_null && castedVal == null_value) {
45 throw std::runtime_error(
"Overflow or underflow");
48 throw std::runtime_error(
"Overflow or underflow");
52 return static_cast<RETURN_TYPE
>(val);
55 template <
typename SOURCE_TYPE,
typename TARGET_TYPE>
57 using ColumnDataPtr = std::unique_ptr<TARGET_TYPE, CheckedMallocDeleter<TARGET_TYPE>>;
59 using CasterFunc = std::function<TARGET_TYPE(SOURCE_TYPE, bool, TARGET_TYPE)>;
72 TARGET_TYPE nullValue,
73 SOURCE_TYPE nullCheckValue,
98 reinterpret_cast<TARGET_TYPE*>(
checked_malloc(num_rows *
sizeof(TARGET_TYPE))));
104 reinterpret_cast<TARGET_TYPE*>(
checked_malloc(num_rows *
sizeof(TARGET_TYPE))));
109 typename ElementsBufferColumnPtr::pointer columnData,
120 columnData[row] =
static_cast<TARGET_TYPE
>(val);
136 std::unique_ptr<std::vector<std::pair<size_t, ElementsBufferColumnPtr>>>&
138 std::unique_ptr<std::vector<ArrayDatum>>::pointer arrayData) {
139 for (
size_t row = 0; row < array_buffer->size(); row++) {
140 auto& element = (array_buffer->at(row));
142 if (element.second) {
144 int8_t* arrayDataPtr =
reinterpret_cast<int8_t*
>(data.release());
146 ArrayDatum(element.first *
sizeof(TARGET_TYPE), arrayDataPtr, is_null);
154 insertData.
data.push_back(dataBlock);
159 template <
typename TARGET_TYPE>
184 TARGET_TYPE nullValue,
185 int64_t nullCheckValue,
204 const auto source_cat =
208 source_cat->getMetadataForDict(std::abs(source_dict_key.
dict_id),
true);
213 for (
unsigned index = 0; index < transient_vecmap.size(); ++index) {
215 std::string
const& str = *transient_vecmap[index];
216 auto const new_id = target_dict_desc_->stringDict->getOrAdd(str);
224 CHECK(target_dict_desc_);
235 return std::make_unique<std::vector<int32_t>>(num_rows);
240 typename ElementsBufferColumnPtr::pointer columnBuffer,
248 (*columnBuffer)[row] = (int32_t)val;
268 throw std::runtime_error(
"Unexpected negative source ID");
276 reinterpret_cast<TARGET_TYPE*>(
279 std::vector<int32_t>* bufferPtr =
280 reinterpret_cast<std::vector<int32_t>*
>(buffer.get());
281 TARGET_TYPE* columnDataPtr =
reinterpret_cast<TARGET_TYPE*
>(data.get());
283 for (
size_t i = 0; i < bufferPtr->size(); i++) {
288 columnDataPtr[i] =
static_cast<TARGET_TYPE
>(id);
295 for (
size_t i = 0; i < bufferPtr->size(); i++) {
296 auto src_id = (*bufferPtr)[i];
299 }
else if (src_id < 0) {
302 columnDataPtr[i] =
static_cast<TARGET_TYPE
>(src_id);
307 std::vector<int32_t> dest_ids;
308 dest_ids.resize(bufferPtr->size());
324 for (
size_t i = 0; i < dest_ids.size(); i++) {
325 auto id = dest_ids[i];
329 if (std::is_signed<TARGET_TYPE>::value) {
331 throw std::runtime_error(
332 "Maximum number of unique strings (" +
334 ") reached in target dictionary");
337 if (
id >= std::numeric_limits<TARGET_TYPE>::max()) {
338 throw std::runtime_error(
339 "Maximum number of unique strings (" +
341 ") reached in target column's dict encoding");
344 columnDataPtr[i] =
static_cast<TARGET_TYPE
>(id);
354 std::unique_ptr<std::vector<std::pair<size_t, ElementsBufferColumnPtr>>>&
356 std::unique_ptr<std::vector<ArrayDatum>>::pointer arrayData) {
358 for (
size_t row = 0; row < array_buffer->size(); row++) {
359 auto& element = (array_buffer->at(row));
361 if (element.second) {
364 int8_t* arrayDataPtr =
reinterpret_cast<int8_t*
>(data.release());
366 ArrayDatum(element.first *
sizeof(TARGET_TYPE), arrayDataPtr, is_null);
370 std::vector<std::vector<int32_t>> srcArrayIds(array_buffer->size());
371 std::vector<std::vector<int32_t>> destArrayIds(0);
373 for (
size_t row = 0; row < array_buffer->size(); row++) {
374 auto& element = (array_buffer->at(row));
375 if (element.second) {
376 srcArrayIds[row] = *(element.second.get());
385 for (
size_t row = 0; row < array_buffer->size(); row++) {
386 auto& element = (array_buffer->at(row));
388 if (element.second) {
389 *(element.second.get()) = destArrayIds[row];
390 int8_t* arrayDataPtr =
reinterpret_cast<int8_t*
>(&(element.second->at(0)));
391 (*arrayData)[row] =
ArrayDatum(element.first *
sizeof(TARGET_TYPE),
411 insertData.
data.push_back(dataBlock);
435 if (0 != source_dict_key.
dict_id) {
436 const auto source_cat =
439 const auto source_dict_desc =
440 source_cat->getMetadataForDict(std::abs(source_dict_key.
dict_id),
true);
441 CHECK(source_dict_desc);
457 column_data_ = std::make_unique<std::vector<std::string>>(num_rows);
466 if (std::numeric_limits<int32_t>::min() == val) {
467 (*column_data_)[row] = std::string(
"");
471 (*column_data_)[row] = strVal;
474 (*column_data_)[row] = strVal;
476 CHECK_EQ(val, inline_int_null_value<int32_t>());
477 std::string nullStr =
"";
478 (*column_data_)[row] = nullStr;
487 const auto db_str_p = checked_get<std::string>(row, db_p,
STRING_ACCESSOR);
489 if (
nullptr != db_str_p) {
490 (*column_data_)[row] = *db_str_p;
492 (*column_data_)[row] = std::string(
"");
507 insertData.
data.push_back(dataBlock);
512 template <
typename ELEMENT_CONVERTER>
515 std::vector<std::pair<size_t, typename ELEMENT_CONVERTER::ElementsBufferColumnPtr>>>
530 std::unique_ptr<ELEMENT_CONVERTER> element_converter,
558 column_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
560 std::pair<size_t, typename ELEMENT_CONVERTER::ElementsBufferColumnPtr>>>(
565 const auto arrayValue =
568 if (arrayValue->is_initialized()) {
569 const auto& vec = arrayValue->get();
574 throw std::runtime_error(
575 "Incorrect number of array elements for fixed length array column");
580 typename ELEMENT_CONVERTER::ElementsBufferColumnPtr elementBuffer =
583 int elementIndex = 0;
584 for (
const auto& scalarValue : vec) {
586 elementIndex++, elementBuffer.get(), &scalarValue);
597 throw std::runtime_error(
"NULL assignment of non null column not allowed");
603 (*column_data_)[row].is_null =
is_null;
618 insertData.
data.push_back(dataBlock);
646 column_data_ = std::make_unique<std::vector<std::string>>(num_rows);
654 const std::shared_ptr<std::vector<double>>& coords) {
655 const auto compressed_coords_vector =
658 uint8_t* compressed_coords_array =
reinterpret_cast<uint8_t*
>(
659 checked_malloc(
sizeof(uint8_t) * compressed_coords_vector.size()));
660 memcpy(compressed_coords_array,
661 &compressed_coords_vector[0],
662 compressed_coords_vector.size());
664 return ArrayDatum((
int)compressed_coords_vector.size(),
665 reinterpret_cast<int8_t*
>(compressed_coords_array),
672 if (geoValue->is_initialized()) {
673 const auto geo = geoValue->get();
674 const auto geoPoint =
677 (*column_data_)[row] =
"";
681 (*column_data_)[row] =
"";
682 auto coords = std::make_shared<std::vector<double>>();
686 coords_datum.is_null =
true;
687 (*signed_compressed_coords_data_)[row] = coords_datum;
697 insertData.
data.emplace_back(logical);
700 insertData.
data.emplace_back(coords);
706 const std::shared_ptr<std::vector<double>>& coords) {
707 std::vector<double> bounds(4);
708 constexpr
auto DOUBLE_MAX = std::numeric_limits<double>::max();
709 constexpr
auto DOUBLE_MIN = std::numeric_limits<double>::lowest();
714 auto size_coords = coords->size();
716 for (
size_t i = 0; i < size_coords; i += 2) {
717 double x = (*coords)[i];
718 double y = (*coords)[i + 1];
720 bounds[0] = std::min(bounds[0], x);
721 bounds[1] = std::min(bounds[1], y);
722 bounds[2] = std::max(bounds[2], x);
723 bounds[3] = std::max(bounds[3], y);
728 template <
typename ELEM_TYPE>
731 reinterpret_cast<ELEM_TYPE*
>(
checked_malloc(
sizeof(ELEM_TYPE) * vector.size()));
732 memcpy(array, vector.data(), vector.size() *
sizeof(ELEM_TYPE));
735 (
int)(vector.size() *
sizeof(ELEM_TYPE)),
reinterpret_cast<int8_t*
>(array),
false);
738 template <
typename ELEM_TYPE>
766 bounds_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
772 const auto geoValue =
775 if (geoValue->is_initialized()) {
776 const auto geo = geoValue->get();
777 const auto geoMultiPoint =
780 (*column_data_)[row] =
"";
786 (*column_data_)[row] =
"";
787 (*signed_compressed_coords_data_)[row] =
ArrayDatum(0,
nullptr,
true);
788 std::vector<double> bounds = {
791 bounds_datum.is_null =
true;
792 (*bounds_data_)[row] = bounds_datum;
803 insertData.
data.emplace_back(bounds);
831 bounds_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
837 const auto geoValue =
840 if (geoValue->is_initialized()) {
841 const auto geo = geoValue->get();
842 const auto geoLinestring =
845 (*column_data_)[row] =
"";
851 (*column_data_)[row] =
"";
852 (*signed_compressed_coords_data_)[row] =
ArrayDatum(0,
nullptr,
true);
853 std::vector<double> bounds = {
856 bounds_datum.is_null =
true;
857 (*bounds_data_)[row] = bounds_datum;
868 insertData.
data.emplace_back(bounds);
902 bounds_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
909 const auto geoValue =
912 if (geoValue->is_initialized()) {
913 const auto geo = geoValue->get();
914 const auto geoMultiLinestring = checked_get<GeoMultiLineStringTargetValue>(
917 (*column_data_)[row] =
"";
918 (*signed_compressed_coords_data_)[row] =
920 (*linestring_sizes_data_)[row] =
926 (*column_data_)[row] =
"";
927 (*signed_compressed_coords_data_)[row] =
ArrayDatum(0,
nullptr,
true);
928 (*linestring_sizes_data_)[row] =
ArrayDatum(0,
nullptr,
true);
929 std::vector<double> bounds = {
932 bounds_datum.is_null =
true;
933 (*bounds_data_)[row] = bounds_datum;
945 insertData.
data.emplace_back(linestringSizes);
948 insertData.
data.emplace_back(bounds);
981 bounds_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
987 const auto geoValue =
990 if (geoValue->is_initialized()) {
991 const auto geo = geoValue->get();
995 (*column_data_)[row] =
"";
1002 (*column_data_)[row] =
"";
1003 (*signed_compressed_coords_data_)[row] =
ArrayDatum(0,
nullptr,
true);
1004 (*ring_sizes_data_)[row] =
ArrayDatum(0,
nullptr,
true);
1005 std::vector<double> bounds = {
1008 bounds_datum.is_null =
true;
1009 (*bounds_data_)[row] = bounds_datum;
1021 insertData.
data.emplace_back(ringSizes);
1024 insertData.
data.emplace_back(bounds);
1063 bounds_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
1069 const auto geoValue =
1072 if (geoValue->is_initialized()) {
1073 const auto geo = geoValue->get();
1074 const auto geoMultiPoly =
1077 (*column_data_)[row] =
"";
1079 (*ring_sizes_data_)[row] =
to_array_datum(geoMultiPoly->ring_sizes);
1080 (*poly_rings_data_)[row] =
to_array_datum(geoMultiPoly->poly_rings);
1085 (*column_data_)[row] =
"";
1086 (*signed_compressed_coords_data_)[row] =
ArrayDatum(0,
nullptr,
true);
1087 (*ring_sizes_data_)[row] =
ArrayDatum(0,
nullptr,
true);
1088 (*poly_rings_data_)[row] =
ArrayDatum(0,
nullptr,
true);
1089 std::vector<double> bounds = {
1092 bounds_datum.is_null =
true;
1093 (*bounds_data_)[row] = bounds_datum;
1106 insertData.
data.emplace_back(ringSizes);
1109 insertData.
data.emplace_back(polyRings);
1112 insertData.
data.emplace_back(bounds);
std::unique_ptr< std::vector< ArrayDatum > > ring_sizes_data_
TARGET_TYPE fixed_array_null_value_
ArrayDatum to_array_datum(const std::vector< ELEM_TYPE > &vector)
std::unique_ptr< std::vector< ArrayDatum > > bounds_data_
std::unique_ptr< TARGET_TYPE, CheckedMallocDeleter< TARGET_TYPE >> ColumnDataPtr
std::unique_ptr< std::vector< int32_t >> ElementsBufferColumnPtr
StringDictionaryProxy * literals_source_dict_
void convertToColumnarFormatFromDict(size_t row, const TargetValue *value)
void allocateColumnarData(size_t num_rows) override
std::unique_ptr< std::vector< ArrayDatum > > bounds_data_
HOST DEVICE int get_size() const
~StringValueConverter() override
const std::vector< std::string const * > & getTransientVector() const
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
class for a per-database catalog. also includes metadata for the current database and the current use...
std::vector< std::string > * stringsPtr
const ColumnDescriptor * ring_sizes_solumn_descriptor_
std::vector< ArrayDatum > * arraysPtr
size_t fixed_array_elements_count_
constexpr auto DOUBLE_MAX
void allocateColumnarData(size_t num_rows) override
~GeoPolygonValueConverter() override
void processArrayBuffer(std::unique_ptr< std::vector< std::pair< size_t, ElementsBufferColumnPtr >>> &array_buffer, std::unique_ptr< std::vector< ArrayDatum >>::pointer arrayData)
boost_variant_accessor< int64_t > SOURCE_TYPE_ACCESSOR
const ColumnDescriptor * bounds_column_descriptor_
ArrayValueConverter(const ColumnDescriptor *cd, size_t num_rows, std::unique_ptr< ELEMENT_CONVERTER > element_converter, bool do_check_null)
~NumericValueConverter() override
void populateFixedArrayNullSentinel(size_t num_rows)
const DictDescriptor * source_dict_desc_
const ColumnDescriptor * bounds_column_descriptor_
SQLTypeInfo element_type_info_
const ColumnDescriptor * linestring_sizes_column_descriptor_
void convertToColumnarFormat(size_t row, const TargetValue *value) override
void convertToColumnarFormat(size_t row, const ScalarTargetValue *scalarValue)
void convertToColumnarFormat(size_t row, const TargetValue *value) override
std::unique_ptr< std::vector< ArrayDatum > > bounds_data_
void allocateColumnarData(size_t num_rows) override
const ColumnDescriptor * column_descriptor_
CasterFunc checked_caster_
~DictionaryValueConverter() override
std::string getString(int32_t string_id) const
ArrayDatum toCompressedCoords(const std::shared_ptr< std::vector< double >> &coords)
ElementsBufferColumnPtr column_buffer_
std::vector< double > compute_bounds_of_coords(const std::shared_ptr< std::vector< double >> &coords)
std::unique_ptr< std::vector< ArrayDatum > > poly_rings_data_
static void populate_string_ids(std::vector< int32_t > &dest_ids, StringDictionary *dest_dict, const std::vector< int32_t > &source_ids, const StringDictionary *source_dict, const std::vector< std::string const * > &transient_string_vec={})
Populates provided dest_ids vector with string ids corresponding to given source strings.
void processArrayBuffer(std::unique_ptr< std::vector< std::pair< size_t, ElementsBufferColumnPtr >>> &array_buffer, std::unique_ptr< std::vector< ArrayDatum >>::pointer arrayData)
std::function< TARGET_TYPE(int64_t, bool, TARGET_TYPE)> CasterFunc
const ColumnDescriptor * bounds_column_descriptor_
ElementsBufferColumnPtr allocateColumnarBuffer(size_t num_rows)
~ArrayValueConverter() override
void convertElementToColumnarFormat(size_t row, typename ElementsBufferColumnPtr::pointer columnData, const ScalarTargetValue *scalarValue)
const DictDescriptor * target_dict_desc_
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
const StringDictionaryProxy * literals_dict_
void convertToColumnarFormat(size_t row, const ScalarTargetValue *scalarValue)
void allocateColumnarData(size_t num_rows) override
std::shared_ptr< StringDictionary > stringDict
boost_variant_accessor< GeoMultiPointTargetValue > GEO_MULTIPOINT_VALUE_ACCESSOR
boost_variant_accessor< ScalarTargetValue > SCALAR_TARGET_VALUE_ACCESSOR
boost_variant_accessor< GeoLineStringTargetValue > GEO_LINESTRING_VALUE_ACCESSOR
std::conditional_t< is_cuda_compiler(), DeviceArrayDatum, HostArrayDatum > ArrayDatum
GeoPointValueConverter(const Catalog_Namespace::Catalog &cat, size_t num_rows, const ColumnDescriptor *logicalColumnDescriptor)
~GeoMultiLinestringValueConverter() override
std::vector< uint8_t > compress_coords(const std::vector< double > &coords, const SQLTypeInfo &ti)
boost_variant_accessor< NullableString > NULLABLE_STRING_ACCESSOR
static SysCatalog & instance()
std::unique_ptr< std::vector< std::string > > column_data_
CONSTEXPR DEVICE bool is_null(const T &value)
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
void convertToColumnarFormatFromString(size_t row, const TargetValue *value)
void * checked_malloc(const size_t size)
boost_variant_accessor< GeoMultiPolyTargetValue > GEO_MULTI_POLY_VALUE_ACCESSOR
const ColumnDescriptor * bounds_column_descriptor_
boost_variant_accessor< GeoPolyTargetValue > GEO_POLY_VALUE_ACCESSOR
boost_variant_accessor< std::string > STRING_ACCESSOR
const ColumnDescriptor * ring_sizes_column_descriptor_
std::unique_ptr< std::vector< ArrayDatum > > ring_sizes_data_
void finalizeDataBlocksForInsertData() override
GeoLinestringValueConverter(const Catalog_Namespace::Catalog &cat, size_t num_rows, const ColumnDescriptor *logicalColumnDescriptor)
const ColumnDescriptor * getMetadataForColumn(int tableId, const std::string &colName) const
int getDatabaseId() const
static int32_t transientIndexToId(unsigned const index)
std::unique_ptr< std::vector< ArrayDatum > > linestring_sizes_data_
GeoMultiPointValueConverter(const Catalog_Namespace::Catalog &cat, size_t num_rows, const ColumnDescriptor *logicalColumnDescriptor)
const DictDescriptor * getMetadataForDict(int dict_ref, bool loadDict=true) const
specifies the content in-memory of a row in the column metadata table
StringValueConverter(const ColumnDescriptor *cd, size_t num_rows, bool dictEncoded, const shared::StringDictKey &source_dict_key, StringDictionaryProxy *literals_dict)
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
const int32_t buffer_null_sentinal_
GeoMultiPolygonValueConverter(const Catalog_Namespace::Catalog &cat, size_t num_rows, const ColumnDescriptor *logicalColumnDescriptor)
void convertToColumnarFormat(size_t row, const TargetValue *value) override
std::unique_ptr< ELEMENT_CONVERTER > element_converter_
T get_fixed_array_null_value()
void convertToColumnarFormat(size_t row, const TargetValue *value) override
std::shared_ptr< Catalog > getCatalog(const std::string &dbName)
void finalizeDataBlocksForInsertData() override
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
void setValueCaster(CasterFunc caster)
std::vector< DataBlockPtr > data
the number of rows being inserted
int32_t getOrAdd(const std::string &str) noexcept
boost_variant_accessor< GeoMultiLineStringTargetValue > GEO_MULTILINESTRING_VALUE_ACCESSOR
void allocateColumnarData(size_t num_rows) override
int32_t convertTransientStringIdToPermanentId(int32_t &transient_string_id)
void convertToColumnarFormat(size_t row, const TargetValue *value) override
~GeoLinestringValueConverter() override
std::unique_ptr< std::vector< std::string > > column_data_
typename NumericValueConverter< int64_t, TARGET_TYPE >::ColumnDataPtr ElementsDataColumnPtr
ColumnDataPtr ElementsBufferColumnPtr
std::unordered_map< int32_t, int32_t > literals_lookup_
RETURN_TYPE checked_cast(SOURCE_TYPE val, bool check_null, RETURN_TYPE null_value)
const ColumnDescriptor * coords_column_descriptor_
void allocateColumnarData(size_t num_rows) override
std::string getString(int32_t string_id) const
constexpr auto DOUBLE_MIN
std::unique_ptr< std::vector< ArrayDatum > > bounds_data_
void allocateColumnarData(size_t num_rows) override
boost_variant_accessor< GeoTargetValue > GEO_VALUE_ACCESSOR
ColumnDataPtr column_data_
#define NULL_ARRAY_DOUBLE
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
static void populate_string_array_ids(std::vector< std::vector< int32_t >> &dest_array_ids, StringDictionary *dest_dict, const std::vector< std::vector< int32_t >> &source_array_ids, const StringDictionary *source_dict)
NumericValueConverter< int64_t, TARGET_TYPE >::ColumnDataPtr processBuffer(ElementsBufferColumnPtr buffer)
std::unique_ptr< std::vector< std::pair< size_t, typename ELEMENT_CONVERTER::ElementsBufferColumnPtr > > > column_buffer_
boost_variant_accessor< GeoTargetValue > GEO_TARGET_VALUE_ACCESSOR
GeoMultiLinestringValueConverter(const Catalog_Namespace::Catalog &cat, size_t num_rows, const ColumnDescriptor *logicalColumnDescriptor)
Descriptor for a dictionary for a string columne.
const ColumnDescriptor * bounds_column_descriptor_
void convertToColumnarFormat(size_t row, const TargetValue *value) override
~GeoMultiPolygonValueConverter() override
void convertToColumnarFormat(size_t row, const TargetValue *value) override
The data to be inserted using the fragment manager.
boost::variant< ScalarTargetValue, ArrayTargetValue, GeoTargetValue, GeoTargetValuePtr > TargetValue
std::unique_ptr< std::vector< ArrayDatum > > column_data_
SOURCE_TYPE null_check_value_
void convertElementToColumnarFormat(size_t row, typename ElementsBufferColumnPtr::pointer columnBuffer, const ScalarTargetValue *scalarValue)
void allocateColumnarData(size_t num_rows) override
void allocateColumnarData(size_t num_rows) override
void convertToColumnarFormat(size_t row, const TargetValue *value) override
ElementsBufferColumnPtr allocateColumnarBuffer(size_t num_rows)
void convertToColumnarFormat(size_t row, const TargetValue *value) override
int8_t * fixed_array_null_sentinel_
std::unique_ptr< std::vector< ArrayDatum > > bounds_data_
boost_variant_accessor< ArrayTargetValue > ARRAY_VALUE_ACCESSOR
void convertToColumnarFormat(size_t row, const TargetValue *value) override
boost_variant_accessor< GeoPointTargetValue > GEO_POINT_VALUE_ACCESSOR
const ColumnDescriptor * ring_sizes_column_descriptor_
boost_variant_accessor< SOURCE_TYPE > SOURCE_TYPE_ACCESSOR
std::vector< int > columnIds
identifies the table into which the data is being inserted
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
~GeoPointValueConverter() override
~GeoMultiPointValueConverter() override
GeoPolygonValueConverter(const Catalog_Namespace::Catalog &cat, size_t num_rows, const ColumnDescriptor *logicalColumnDescriptor)
StringDictionary * source_dict_
std::unique_ptr< std::vector< ArrayDatum > > signed_compressed_coords_data_
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
StringDictionaryProxy * source_dict_proxy_
NumericValueConverter(const ColumnDescriptor *cd, size_t num_rows, TARGET_TYPE nullValue, SOURCE_TYPE nullCheckValue, bool doNullCheck)
const shared::StringDictKey & getStringDictKey() const
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)
boost::variant< int64_t, double, float, NullableString > ScalarTargetValue