OmniSciDB  8a228a1076
anonymous_namespace{StringOpsIR.cpp} Namespace Reference

Functions

std::vector< int32_t > get_compared_ids (const StringDictionaryProxy *dict, const SQLOps compare_operator, const std::string &pattern)
 

Function Documentation

◆ get_compared_ids()

std::vector<int32_t> anonymous_namespace{StringOpsIR.cpp}::get_compared_ids ( const StringDictionaryProxy dict,
const SQLOps  compare_operator,
const std::string &  pattern 
)

Definition at line 230 of file StringOpsIR.cpp.

References StringDictionaryProxy::getCompare(), kBW_EQ, kEQ, kGE, kGT, kLE, kLT, and kNE.

Referenced by CodeGenerator::codegenDictStrCmp().

232  {
233  std::vector<int> ret;
234  switch (compare_operator) {
235  case kLT:
236  ret = dict->getCompare(pattern, "<");
237  break;
238  case kLE:
239  ret = dict->getCompare(pattern, "<=");
240  break;
241  case kEQ:
242  case kBW_EQ:
243  ret = dict->getCompare(pattern, "=");
244  break;
245  case kGT:
246  ret = dict->getCompare(pattern, ">");
247  break;
248  case kGE:
249  ret = dict->getCompare(pattern, ">=");
250  break;
251  case kNE:
252  ret = dict->getCompare(pattern, "<>");
253  break;
254  default:
255  std::runtime_error("unsuported operator for string comparision");
256  }
257  return ret;
258 }
Definition: sqldefs.h:35
Definition: sqldefs.h:36
Definition: sqldefs.h:30
Definition: sqldefs.h:34
Definition: sqldefs.h:32
Definition: sqldefs.h:31
Definition: sqldefs.h:33
std::vector< int32_t > getCompare(const std::string &pattern, const std::string &comp_operator) const
+ Here is the call graph for this function:
+ Here is the caller graph for this function: