OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
import_export::ImporterUtils Class Reference

#include <Importer.h>

Static Public Member Functions

static ArrayDatum composeNullArray (const SQLTypeInfo &ti)
 
static ArrayDatum composeNullPointCoords (const SQLTypeInfo &coords_ti, const SQLTypeInfo &geo_ti)
 

Detailed Description

Definition at line 86 of file Importer.h.

Member Function Documentation

ArrayDatum import_export::ImporterUtils::composeNullArray ( const SQLTypeInfo ti)
static

Definition at line 435 of file Importer.cpp.

References import_export::NullArray().

Referenced by import_export::TypedImportBuffer::addDictEncodedStringArray(), composeNullPointCoords(), foreign_storage::ParquetArrayImportEncoder::getNullArrayDatum(), DBHandler::insert_data(), and foreign_storage::GeospatialEncoder::processNullGeoElement().

435  {
436  return NullArray(ti);
437 }
ArrayDatum NullArray(const SQLTypeInfo &ti)
Definition: Importer.cpp:411

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ArrayDatum import_export::ImporterUtils::composeNullPointCoords ( const SQLTypeInfo coords_ti,
const SQLTypeInfo geo_ti 
)
static

Definition at line 439 of file Importer.cpp.

References CHECK, checked_malloc(), composeNullArray(), Geospatial::compress_coords(), SQLTypeInfo::get_comp_param(), SQLTypeInfo::get_compression(), kDOUBLE, kENCODING_GEOINT, NULL_ARRAY_DOUBLE, NULL_DOUBLE, and SQLTypeInfo::set_subtype().

Referenced by DBHandler::insert_data().

440  {
441  if (geo_ti.get_compression() == kENCODING_GEOINT) {
442  CHECK(geo_ti.get_comp_param() == 32);
443  std::vector<double> null_point_coords = {NULL_ARRAY_DOUBLE, NULL_DOUBLE};
444  auto compressed_null_coords = Geospatial::compress_coords(null_point_coords, geo_ti);
445  const size_t len = compressed_null_coords.size();
446  int8_t* buf = (int8_t*)checked_malloc(len);
447  memcpy(buf, compressed_null_coords.data(), len);
448  return ArrayDatum(len, buf, false);
449  }
450  auto modified_ti = coords_ti;
451  modified_ti.set_subtype(kDOUBLE);
453 }
#define NULL_DOUBLE
static ArrayDatum composeNullArray(const SQLTypeInfo &ti)
Definition: Importer.cpp:435
HOST DEVICE void set_subtype(SQLTypes st)
Definition: sqltypes.h:430
std::conditional_t< is_cuda_compiler(), DeviceArrayDatum, HostArrayDatum > ArrayDatum
Definition: sqltypes.h:208
std::vector< uint8_t > compress_coords(const std::vector< double > &coords, const SQLTypeInfo &ti)
Definition: Compression.cpp:52
void * checked_malloc(const size_t size)
Definition: checked_alloc.h:45
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:337
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:338
#define NULL_ARRAY_DOUBLE
#define CHECK(condition)
Definition: Logger.h:222

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: