OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Column< TextEncodingDict > Struct Template Reference

#include <heavydbTypes.h>

+ Collaboration diagram for Column< TextEncodingDict >:

Public Member Functions

DEVICE TextEncodingDictoperator[] (const unsigned int index) const
 
DEVICE int64_t size () const
 
DEVICE bool isNull (int64_t index) const
 
DEVICE void setNull (int64_t index)
 
DEVICE const std::string getString (int64_t index) const
 
DEVICE const TextEncodingDict getStringId (const std::string &str)
 
DEVICE Column< TextEncodingDict > & operator= (const Column< TextEncodingDict > &other)
 

Public Attributes

TextEncodingDictptr_
 
int64_t size_
 
StringDictionaryProxystring_dict_proxy_
 

Detailed Description

template<>
struct Column< TextEncodingDict >

Definition at line 501 of file heavydbTypes.h.

Member Function Documentation

DEVICE const std::string Column< TextEncodingDict >::getString ( int64_t  index) const
inline

Definition at line 530 of file heavydbTypes.h.

References Column< T >::isNull(), and Column< T >::ptr_.

Referenced by ct_binding_str_length__cpu_(), and ct_substr__cpu_().

530  {
531  return isNull(index) ? "" : string_dict_proxy_->getString(ptr_[index].value);
532  }
std::string getString(int32_t string_id) const
StringDictionaryProxy * string_dict_proxy_
Definition: heavydbTypes.h:506
TextEncodingDict * ptr_
Definition: heavydbTypes.h:502
DEVICE bool isNull(int64_t index) const
Definition: heavydbTypes.h:524

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DEVICE const TextEncodingDict Column< TextEncodingDict >::getStringId ( const std::string &  str)
inline

Definition at line 533 of file heavydbTypes.h.

Referenced by ct_string_concat__cpu_(), ct_substr__cpu_(), and ct_synthesize_new_dict__cpu_().

533  {
535  }
StringDictionaryProxy * string_dict_proxy_
Definition: heavydbTypes.h:506
int32_t getOrAddTransient(const std::string &str)

+ Here is the caller graph for this function:

DEVICE bool Column< TextEncodingDict >::isNull ( int64_t  index) const
inline

Definition at line 524 of file heavydbTypes.h.

References is_null(), and Column< T >::ptr_.

524 { return is_null(ptr_[index].value); }
CONSTEXPR DEVICE bool is_null(const T &value)
TextEncodingDict * ptr_
Definition: heavydbTypes.h:502

+ Here is the call graph for this function:

DEVICE Column<TextEncodingDict>& Column< TextEncodingDict >::operator= ( const Column< TextEncodingDict > &  other)
inline

Definition at line 539 of file heavydbTypes.h.

References Column< T >::ptr_, ptr_, Column< T >::size(), size(), and TextEncodingDict.

539  {
540 #ifndef __CUDACC__
541  if (size() == other.size()) {
542  memcpy(ptr_, other.ptr_, other.size() * sizeof(TextEncodingDict));
543  } else {
544  throw std::runtime_error("cannot copy assign columns with different sizes");
545  }
546 #else
547  if (size() == other.size()) {
548  for (unsigned int i = 0; i < size(); i++) {
549  ptr_[i] = other[i];
550  }
551  } else {
552  // TODO: set error
553  }
554 #endif
555  return *this;
556  }
TextEncodingDict * ptr_
Definition: heavydbTypes.h:502
DEVICE int64_t size() const
Definition: heavydbTypes.h:522

+ Here is the call graph for this function:

DEVICE TextEncodingDict& Column< TextEncodingDict >::operator[] ( const unsigned int  index) const
inline

Definition at line 510 of file heavydbTypes.h.

References DEVICE, Column< T >::ptr_, set_null(), and Column< T >::size_.

510  {
511  if (index >= size_) {
512 #ifndef __CUDACC__
513  throw std::runtime_error("column buffer index is out of range");
514 #else
515  static DEVICE TextEncodingDict null_value;
516  set_null(null_value.value);
517  return null_value;
518 #endif
519  }
520  return ptr_[index];
521  }
#define DEVICE
CONSTEXPR DEVICE void set_null(T &value)
TextEncodingDict * ptr_
Definition: heavydbTypes.h:502

+ Here is the call graph for this function:

DEVICE void Column< TextEncodingDict >::setNull ( int64_t  index)
inline

Definition at line 526 of file heavydbTypes.h.

References Column< T >::ptr_, and set_null().

Referenced by ct_binding_str_equals__cpu_(), and ct_string_concat__cpu_().

526 { set_null(ptr_[index].value); }
CONSTEXPR DEVICE void set_null(T &value)
TextEncodingDict * ptr_
Definition: heavydbTypes.h:502

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DEVICE int64_t Column< TextEncodingDict >::size ( ) const
inline

Definition at line 522 of file heavydbTypes.h.

References Column< T >::size_.

Referenced by ct_binding_dict_encoded1__cpu_1(), ct_binding_dict_encoded2__cpu_1(), ct_binding_dict_encoded3__cpu_1(), ct_binding_str_length__cpu_(), ct_substr__cpu_(), operator=(), and row_copier_text().

522 { return size_; }

+ Here is the caller graph for this function:

Member Data Documentation

int64_t Column< TextEncodingDict >::size_

Definition at line 503 of file heavydbTypes.h.

Referenced by get_column_metadata(), and get_column_min_max().

Definition at line 506 of file heavydbTypes.h.

Referenced by supported_ml_frameworks__cpu_().


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