OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{QueryRewrite.cpp} Namespace Reference

Functions

bool check_string_id_overflow (const int32_t string_id, const SQLTypeInfo &ti)
 

Function Documentation

bool anonymous_namespace{QueryRewrite.cpp}::check_string_id_overflow ( const int32_t  string_id,
const SQLTypeInfo ti 
)

Definition at line 272 of file QueryRewrite.cpp.

References SQLTypeInfo::get_size(), and UNREACHABLE.

Referenced by QueryRewriter::rewriteColumnarUpdate().

272  {
273  switch (ti.get_size()) {
274  case 1:
275  return string_id > max_valid_int_value<int8_t>();
276  case 2:
277  return string_id > max_valid_int_value<int16_t>();
278  case 4:
279  return string_id > max_valid_int_value<int32_t>();
280  default:
281  UNREACHABLE();
282  }
283  UNREACHABLE();
284  return false;
285 }
HOST DEVICE int get_size() const
Definition: sqltypes.h:393
#define UNREACHABLE()
Definition: Logger.h:337

+ Here is the call graph for this function:

+ Here is the caller graph for this function: