OmniSciDB  471d68cefb
 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 84 of file Importer.h.

Member Function Documentation

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

Definition at line 410 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().

410  {
411  return NullArray(ti);
412 }
ArrayDatum NullArray(const SQLTypeInfo &ti)
Definition: Importer.cpp:388

+ 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 414 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().

415  {
416  if (geo_ti.get_compression() == kENCODING_GEOINT) {
417  CHECK(geo_ti.get_comp_param() == 32);
418  std::vector<double> null_point_coords = {NULL_ARRAY_DOUBLE, NULL_DOUBLE};
419  auto compressed_null_coords = Geospatial::compress_coords(null_point_coords, geo_ti);
420  const size_t len = compressed_null_coords.size();
421  int8_t* buf = (int8_t*)checked_malloc(len);
422  memcpy(buf, compressed_null_coords.data(), len);
423  return ArrayDatum(len, buf, false);
424  }
425  auto modified_ti = coords_ti;
426  modified_ti.set_subtype(kDOUBLE);
428 }
#define NULL_DOUBLE
static ArrayDatum composeNullArray(const SQLTypeInfo &ti)
Definition: Importer.cpp:410
HOST DEVICE void set_subtype(SQLTypes st)
Definition: sqltypes.h:420
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:209

+ 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: