OmniSciDB  a5dc49c757
 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 85 of file Importer.h.

Member Function Documentation

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

Definition at line 395 of file Importer.cpp.

References import_export::NullArray().

Referenced by import_export::TypedImportBuffer::addDictEncodedStringArray(), data_conversion::StringViewToArrayEncoder< ScalarEncoderType >::appendArrayDatums(), composeNullPointCoords(), foreign_storage::ParquetArrayImportEncoder::getNullArrayDatum(), DBHandler::insert_data(), and foreign_storage::GeospatialEncoder::processNullGeoElement().

395  {
396  return NullArray(ti);
397 }
ArrayDatum NullArray(const SQLTypeInfo &ti)
Definition: Importer.cpp:371

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

400  {
401  if (geo_ti.get_compression() == kENCODING_GEOINT) {
402  CHECK(geo_ti.get_comp_param() == 32);
403  std::vector<double> null_point_coords = {NULL_ARRAY_DOUBLE, NULL_DOUBLE};
404  auto compressed_null_coords = Geospatial::compress_coords(null_point_coords, geo_ti);
405  const size_t len = compressed_null_coords.size();
406  int8_t* buf = (int8_t*)checked_malloc(len);
407  memcpy(buf, compressed_null_coords.data(), len);
408  return ArrayDatum(len, buf, false);
409  }
410  auto modified_ti = coords_ti;
411  modified_ti.set_subtype(kDOUBLE);
413 }
#define NULL_DOUBLE
static ArrayDatum composeNullArray(const SQLTypeInfo &ti)
Definition: Importer.cpp:395
HOST DEVICE void set_subtype(SQLTypes st)
Definition: sqltypes.h:471
std::conditional_t< is_cuda_compiler(), DeviceArrayDatum, HostArrayDatum > ArrayDatum
Definition: sqltypes.h:229
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:399
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:402
#define NULL_ARRAY_DOUBLE
#define CHECK(condition)
Definition: Logger.h:291

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