OmniSciDB  04ee39c94c
anonymous_namespace{ArrowImporter.h}::ArrowValue< double > Struct Template Reference

#include <ArrowImporter.h>

+ Inheritance diagram for anonymous_namespace{ArrowImporter.h}::ArrowValue< double >:
+ Collaboration diagram for anonymous_namespace{ArrowImporter.h}::ArrowValue< double >:

Public Types

using VALUE_TYPE = double
 

Public Member Functions

 ArrowValue (const DataBufferBase &data, const VALUE_TYPE &v)
 
template<typename DATA_TYPE , typename = enable_if_integral<DATA_TYPE>>
 operator const DATA_TYPE () const
 
template<typename DATA_TYPE , typename = enable_if_floating<DATA_TYPE>>
 operator DATA_TYPE () const
 
 operator const std::string () const
 
- Public Member Functions inherited from anonymous_namespace{ArrowImporter.h}::ArrowValueBase< double >
 ArrowValueBase (const DataBufferBase &data, const double &v)
 
int64_t resolve_time (const double &v, std::enable_if_t< enabled > *=0) const
 
int64_t resolve_time (const double &v, std::enable_if_t<!enabled > *=0) const
 

Additional Inherited Members

- Public Attributes inherited from anonymous_namespace{ArrowImporter.h}::ArrowValueBase< double >
const DataBufferBasedata
 
const double v
 
const int32_t dimension
 

Detailed Description

template<>
struct anonymous_namespace{ArrowImporter.h}::ArrowValue< double >

Definition at line 328 of file ArrowImporter.h.

Member Typedef Documentation

◆ VALUE_TYPE

using anonymous_namespace{ArrowImporter.h}::ArrowValue< double >::VALUE_TYPE = double

Definition at line 329 of file ArrowImporter.h.

Constructor & Destructor Documentation

◆ ArrowValue()

anonymous_namespace{ArrowImporter.h}::ArrowValue< double >::ArrowValue ( const DataBufferBase data,
const VALUE_TYPE v 
)
inline

Definition at line 330 of file ArrowImporter.h.

Member Function Documentation

◆ operator const DATA_TYPE()

template<typename DATA_TYPE , typename = enable_if_integral<DATA_TYPE>>
anonymous_namespace{ArrowImporter.h}::ArrowValue< double >::operator const DATA_TYPE ( ) const
inlineexplicit

Definition at line 333 of file ArrowImporter.h.

References v().

333  {
334  const auto ti = data.cd->columnType;
335  DATA_TYPE v = ti.is_decimal() ? this->v * pow(10, ti.get_scale()) : this->v;
336  if (!(std::numeric_limits<DATA_TYPE>::lowest() < v &&
337  v <= std::numeric_limits<DATA_TYPE>::max())) {
338  data_conversion_error<DATA_TYPE>(v, data.cd, data.bad_rows_tracker);
339  }
340  return v;
341  }
Importer_NS::BadRowsTracker *const bad_rows_tracker
SQLTypeInfo columnType
+ Here is the call graph for this function:

◆ operator const std::string()

anonymous_namespace{ArrowImporter.h}::ArrowValue< double >::operator const std::string ( ) const
inlineexplicit

Definition at line 352 of file ArrowImporter.h.

References to_string(), and v().

352 { return std::to_string(v); }
std::string to_string(char const *&&v)
+ Here is the call graph for this function:

◆ operator DATA_TYPE()

template<typename DATA_TYPE , typename = enable_if_floating<DATA_TYPE>>
anonymous_namespace{ArrowImporter.h}::ArrowValue< double >::operator DATA_TYPE ( ) const
inlineexplicit

Definition at line 343 of file ArrowImporter.h.

References v().

343  {
344  if (std::is_same<DATA_TYPE, float>::value) {
345  if (!(std::numeric_limits<float>::lowest() < v &&
346  v <= std::numeric_limits<float>::max())) {
347  data_conversion_error<float>(v, data.cd, data.bad_rows_tracker);
348  }
349  }
350  return v;
351  }
Importer_NS::BadRowsTracker *const bad_rows_tracker
+ Here is the call graph for this function:

The documentation for this struct was generated from the following file: