OmniSciDB  8a228a1076
anonymous_namespace{QueryRewrite.cpp} Namespace Reference

Functions

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

Function Documentation

◆ check_string_id_overflow()

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

Definition at line 200 of file QueryRewrite.cpp.

References SQLTypeInfo::get_size(), and UNREACHABLE.

Referenced by QueryRewriter::rewriteColumnarUpdate().

200  {
201  switch (ti.get_size()) {
202  case 1:
203  return string_id > max_valid_int_value<int8_t>();
204  case 2:
205  return string_id > max_valid_int_value<int16_t>();
206  case 4:
207  return string_id > max_valid_int_value<int32_t>();
208  default:
209  UNREACHABLE();
210  }
211  UNREACHABLE();
212  return false;
213 }
#define UNREACHABLE()
Definition: Logger.h:241
HOST DEVICE int get_size() const
Definition: sqltypes.h:269
+ Here is the call graph for this function:
+ Here is the caller graph for this function: