OmniSciDB  085a039ca4
 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 248 of file QueryRewrite.cpp.

References SQLTypeInfo::get_size(), and UNREACHABLE.

Referenced by QueryRewriter::rewriteColumnarUpdate().

248  {
249  switch (ti.get_size()) {
250  case 1:
251  return string_id > max_valid_int_value<int8_t>();
252  case 2:
253  return string_id > max_valid_int_value<int16_t>();
254  case 4:
255  return string_id > max_valid_int_value<int32_t>();
256  default:
257  UNREACHABLE();
258  }
259  UNREACHABLE();
260  return false;
261 }
HOST DEVICE int get_size() const
Definition: sqltypes.h:339
#define UNREACHABLE()
Definition: Logger.h:267

+ Here is the call graph for this function:

+ Here is the caller graph for this function: