OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

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 685 of file StringOpsIR.cpp.

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

Referenced by CodeGenerator::codegenDictStrCmp().

687  {
688  std::vector<int> ret;
689  switch (compare_operator) {
690  case kLT:
691  ret = dict->getCompare(pattern, "<");
692  break;
693  case kLE:
694  ret = dict->getCompare(pattern, "<=");
695  break;
696  case kEQ:
697  case kBW_EQ:
698  ret = dict->getCompare(pattern, "=");
699  break;
700  case kGT:
701  ret = dict->getCompare(pattern, ">");
702  break;
703  case kGE:
704  ret = dict->getCompare(pattern, ">=");
705  break;
706  case kNE:
707  ret = dict->getCompare(pattern, "<>");
708  break;
709  default:
710  std::runtime_error("unsuported operator for string comparision");
711  }
712  return ret;
713 }
Definition: sqldefs.h:34
Definition: sqldefs.h:35
Definition: sqldefs.h:29
std::vector< int32_t > getCompare(const std::string &pattern, const std::string &comp_operator) const
Definition: sqldefs.h:33
Definition: sqldefs.h:31
Definition: sqldefs.h:30
Definition: sqldefs.h:32

+ Here is the call graph for this function:

+ Here is the caller graph for this function: