OmniSciDB  94e8789169
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 201 of file QueryRewrite.cpp.

References SQLTypeInfo::get_size(), and UNREACHABLE.

Referenced by QueryRewriter::rewriteColumnarUpdate().

201  {
202  switch (ti.get_size()) {
203  case 1:
204  return string_id > max_valid_int_value<int8_t>();
205  case 2:
206  return string_id > max_valid_int_value<int16_t>();
207  case 4:
208  return string_id > max_valid_int_value<int32_t>();
209  default:
210  UNREACHABLE();
211  }
212  UNREACHABLE();
213  return false;
214 }
HOST DEVICE int get_size() const
Definition: sqltypes.h:321
#define UNREACHABLE()
Definition: Logger.h:241

+ Here is the call graph for this function:

+ Here is the caller graph for this function: