OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{ArrowImporter.h}::ArrowValue< float > Struct Template Reference

#include <ArrowImporter.h>

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

Public Types

using VALUE_TYPE = float
 

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< float >
 ArrowValueBase (const DataBufferBase &data, const float &v)
 
int64_t resolve_time (const float &v, std::enable_if_t< enabled > *=0) const
 
int64_t resolve_time (const float &v, std::enable_if_t<!enabled > *=0) const
 

Additional Inherited Members

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

Detailed Description

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

Definition at line 309 of file ArrowImporter.h.

Member Typedef Documentation

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

Definition at line 310 of file ArrowImporter.h.

Constructor & Destructor Documentation

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

Definition at line 311 of file ArrowImporter.h.

Member Function Documentation

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

Definition at line 314 of file ArrowImporter.h.

314  {
315  const auto ti = data.cd->columnType;
316  DATA_TYPE v = ti.is_decimal() ? this->v * pow(10, ti.get_scale()) : this->v;
317  if (!(std::numeric_limits<DATA_TYPE>::lowest() < v &&
318  v <= std::numeric_limits<DATA_TYPE>::max())) {
319  data_conversion_error<DATA_TYPE>(v, data.cd, data.bad_rows_tracker);
320  }
321  return v;
322  }
import_export::BadRowsTracker *const bad_rows_tracker
SQLTypeInfo columnType
anonymous_namespace{ArrowImporter.h}::ArrowValue< float >::operator const std::string ( ) const
inlineexplicit

Definition at line 327 of file ArrowImporter.h.

References to_string().

327 { return std::to_string(v); }
std::string to_string(char const *&&v)

+ Here is the call graph for this function:

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

Definition at line 324 of file ArrowImporter.h.

324  {
325  return v;
326  }

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