OmniSciDB  6686921089
 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 230 of file QueryRewrite.cpp.

References SQLTypeInfo::get_size(), and UNREACHABLE.

Referenced by QueryRewriter::rewriteColumnarUpdate().

230  {
231  switch (ti.get_size()) {
232  case 1:
233  return string_id > max_valid_int_value<int8_t>();
234  case 2:
235  return string_id > max_valid_int_value<int16_t>();
236  case 4:
237  return string_id > max_valid_int_value<int32_t>();
238  default:
239  UNREACHABLE();
240  }
241  UNREACHABLE();
242  return false;
243 }
HOST DEVICE int get_size() const
Definition: sqltypes.h:339
#define UNREACHABLE()
Definition: Logger.h:253

+ Here is the call graph for this function:

+ Here is the caller graph for this function: