OmniSciDB  04ee39c94c
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 195 of file StringOpsIR.cpp.

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

Referenced by CodeGenerator::codegenDictStrCmp().

197  {
198  std::vector<int> ret;
199  switch (compare_operator) {
200  case kLT:
201  ret = dict->getCompare(pattern, "<");
202  break;
203  case kLE:
204  ret = dict->getCompare(pattern, "<=");
205  break;
206  case kEQ:
207  case kBW_EQ:
208  ret = dict->getCompare(pattern, "=");
209  break;
210  case kGT:
211  ret = dict->getCompare(pattern, ">");
212  break;
213  case kGE:
214  ret = dict->getCompare(pattern, ">=");
215  break;
216  case kNE:
217  ret = dict->getCompare(pattern, "<>");
218  break;
219  default:
220  std::runtime_error("unsuported operator for string comparision");
221  }
222  return ret;
223 }
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: