OmniSciDB  c07336695a
TextConverterFactory Struct Reference

Public Member Functions

std::unique_ptr< TargetValueConverteroperator() (ConverterCreateParameter param)
 

Detailed Description

Definition at line 115 of file TargetValueConvertersFactories.cpp.

Member Function Documentation

◆ operator()()

std::unique_ptr<TargetValueConverter> TextConverterFactory::operator() ( ConverterCreateParameter  param)
inline

Definition at line 116 of file TargetValueConvertersFactories.cpp.

References ConverterCreateParameter::cat, ColumnDescriptor::columnType, DictionaryConverterFactory< TARGET_TYPE >::create(), SQLTypeInfoCore< TYPE_FACET_PACK >::get_comp_param(), SQLTypeInfoCore< TYPE_FACET_PACK >::get_compression(), SQLTypeInfoCore< TYPE_FACET_PACK >::get_size(), TargetMetaInfo::get_type_info(), kENCODING_DICT, kENCODING_NONE, ConverterCreateParameter::literals_dictionary, ConverterCreateParameter::num_rows, ConverterCreateParameter::source, and ConverterCreateParameter::target.

116  {
118  bool dictEncodedSource =
120  auto sourceDictId = param.source.get_type_info().get_comp_param();
121  return std::make_unique<StringValueConverter>(param.cat,
122  param.target,
123  param.num_rows,
124  dictEncodedSource,
125  sourceDictId,
126  param.literals_dictionary);
127  } else if (param.target->columnType.get_compression() == kENCODING_DICT) {
128  auto size = param.target->columnType.get_size();
129  if (4 == size) {
131  return factory.create(param);
132  } else if (2 == size) {
134  return factory.create(param);
135  } else if (1 == size) {
137  return factory.create(param);
138  }
139  }
140 
141  throw std::runtime_error("Unsupported text column type");
142  }
const Catalog_Namespace::Catalog & cat
HOST DEVICE int get_size() const
Definition: sqltypes.h:329
StringDictionaryProxy * literals_dictionary
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:327
std::unique_ptr< ConverterType > create(ConverterCreateParameter param)
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:328
SQLTypeInfo columnType
const SQLTypeInfo & get_type_info() const
+ Here is the call graph for this function:

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