OmniSciDB  a5dc49c757
 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 195 of file QueryRewrite.cpp.

References SQLTypeInfo::get_size(), and UNREACHABLE.

Referenced by QueryRewriter::rewriteColumnarUpdate().

195  {
196  switch (ti.get_size()) {
197  case 1:
198  return string_id > max_valid_int_value<int8_t>();
199  case 2:
200  return string_id > max_valid_int_value<int16_t>();
201  case 4:
202  return string_id > max_valid_int_value<int32_t>();
203  default:
204  UNREACHABLE();
205  }
206  UNREACHABLE();
207  return false;
208 }
HOST DEVICE int get_size() const
Definition: sqltypes.h:403
#define UNREACHABLE()
Definition: Logger.h:338

+ Here is the call graph for this function:

+ Here is the caller graph for this function: