OmniSciDB  471d68cefb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Analyzer Namespace Reference

Namespaces

 anonymous_namespace{Analyzer.cpp}
 

Classes

class  Expr
 
class  ColumnVar
 
class  ExpressionTuple
 
class  Var
 
class  Constant
 
class  UOper
 
class  BinOper
 
class  RangeOper
 
class  Subquery
 
class  InValues
 
class  InIntegerSet
 
class  CharLengthExpr
 
class  KeyForStringExpr
 
class  SampleRatioExpr
 
class  LowerExpr
 Expression class for the LOWER (lowercase) string function. The "arg" constructor parameter must be an expression that resolves to a string datatype (e.g. TEXT). More...
 
class  CardinalityExpr
 
class  LikeExpr
 
class  RegexpExpr
 
class  WidthBucketExpr
 
class  LikelihoodExpr
 
class  AggExpr
 
class  CaseExpr
 
class  ExtractExpr
 
class  DateaddExpr
 
class  DatediffExpr
 
class  DatetruncExpr
 
class  FunctionOper
 
class  FunctionOperWithCustomTypeHandling
 
class  OffsetInFragment
 
struct  OrderEntry
 
class  WindowFunction
 
class  ArrayExpr
 
class  GeoUOper
 
class  GeoBinOper
 
class  TargetEntry
 
class  Query
 
class  GeoExpr
 
class  GeoColumnVar
 
class  GeoConstant
 
class  GeoOperator
 
class  GeoTransformOperator
 
class  RangeTableEntry
 
class  Estimator
 
class  NDVEstimator
 
class  LargeNDVEstimator
 

Typedefs

using DomainSet = std::list< const Expr * >
 
using ExpressionPtr = std::shared_ptr< Analyzer::Expr >
 
using ExpressionPtrList = std::list< ExpressionPtr >
 
using ExpressionPtrVector = std::vector< ExpressionPtr >
 

Functions

bool Datum_equal (const SQLTypeInfo &ti, Datum val1, Datum val2)
 

Typedef Documentation

using Analyzer::DomainSet = typedef std::list<const Expr*>

Definition at line 60 of file Analyzer.h.

using Analyzer::ExpressionPtr = typedef std::shared_ptr<Analyzer::Expr>

Definition at line 179 of file Analyzer.h.

using Analyzer::ExpressionPtrList = typedef std::list<ExpressionPtr>

Definition at line 180 of file Analyzer.h.

using Analyzer::ExpressionPtrVector = typedef std::vector<ExpressionPtr>

Definition at line 181 of file Analyzer.h.

Function Documentation

bool Analyzer::Datum_equal ( const SQLTypeInfo ti,
Datum  val1,
Datum  val2 
)

Definition at line 2139 of file Analyzer.cpp.

References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), Datum::intval, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, Datum::smallintval, Datum::stringval, Datum::tinyintval, and UNREACHABLE.

Referenced by Analyzer::Constant::operator==().

2139  {
2140  switch (ti.get_type()) {
2141  case kBOOLEAN:
2142  return val1.boolval == val2.boolval;
2143  case kCHAR:
2144  case kVARCHAR:
2145  case kTEXT:
2146  return *val1.stringval == *val2.stringval;
2147  case kNUMERIC:
2148  case kDECIMAL:
2149  case kBIGINT:
2150  return val1.bigintval == val2.bigintval;
2151  case kINT:
2152  return val1.intval == val2.intval;
2153  case kSMALLINT:
2154  return val1.smallintval == val2.smallintval;
2155  case kTINYINT:
2156  return val1.tinyintval == val2.tinyintval;
2157  case kFLOAT:
2158  return val1.floatval == val2.floatval;
2159  case kDOUBLE:
2160  return val1.doubleval == val2.doubleval;
2161  case kTIME:
2162  case kTIMESTAMP:
2163  case kDATE:
2164  case kINTERVAL_DAY_TIME:
2165  case kINTERVAL_YEAR_MONTH:
2166  return val1.bigintval == val2.bigintval;
2167  case kPOINT:
2168  case kLINESTRING:
2169  case kPOLYGON:
2170  case kMULTIPOLYGON:
2171  return *val1.stringval == *val2.stringval;
2172  default:
2173  throw std::runtime_error("Unrecognized type for Constant Datum equality: " +
2174  ti.get_type_name());
2175  }
2176  UNREACHABLE();
2177  return false;
2178 }
int8_t tinyintval
Definition: sqltypes.h:212
Definition: sqltypes.h:49
int8_t boolval
Definition: sqltypes.h:211
#define UNREACHABLE()
Definition: Logger.h:253
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:329
int32_t intval
Definition: sqltypes.h:214
float floatval
Definition: sqltypes.h:216
int64_t bigintval
Definition: sqltypes.h:215
int16_t smallintval
Definition: sqltypes.h:213
std::string * stringval
Definition: sqltypes.h:220
Definition: sqltypes.h:52
Definition: sqltypes.h:53
std::string get_type_name() const
Definition: sqltypes.h:432
Definition: sqltypes.h:41
Definition: sqltypes.h:45
double doubleval
Definition: sqltypes.h:217

+ Here is the call graph for this function:

+ Here is the caller graph for this function: