OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  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  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  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 61 of file Analyzer.h.

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

Definition at line 180 of file Analyzer.h.

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

Definition at line 181 of file Analyzer.h.

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

Definition at line 182 of file Analyzer.h.

Function Documentation

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

Definition at line 2060 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==().

2060  {
2061  switch (ti.get_type()) {
2062  case kBOOLEAN:
2063  return val1.boolval == val2.boolval;
2064  case kCHAR:
2065  case kVARCHAR:
2066  case kTEXT:
2067  return *val1.stringval == *val2.stringval;
2068  case kNUMERIC:
2069  case kDECIMAL:
2070  case kBIGINT:
2071  return val1.bigintval == val2.bigintval;
2072  case kINT:
2073  return val1.intval == val2.intval;
2074  case kSMALLINT:
2075  return val1.smallintval == val2.smallintval;
2076  case kTINYINT:
2077  return val1.tinyintval == val2.tinyintval;
2078  case kFLOAT:
2079  return val1.floatval == val2.floatval;
2080  case kDOUBLE:
2081  return val1.doubleval == val2.doubleval;
2082  case kTIME:
2083  case kTIMESTAMP:
2084  case kDATE:
2085  case kINTERVAL_DAY_TIME:
2086  case kINTERVAL_YEAR_MONTH:
2087  return val1.bigintval == val2.bigintval;
2088  case kPOINT:
2089  case kLINESTRING:
2090  case kPOLYGON:
2091  case kMULTIPOLYGON:
2092  return *val1.stringval == *val2.stringval;
2093  default:
2094  throw std::runtime_error("Unrecognized type for Constant Datum equality: " +
2095  ti.get_type_name());
2096  }
2097  UNREACHABLE();
2098  return false;
2099 }
int8_t tinyintval
Definition: sqltypes.h:206
Definition: sqltypes.h:51
bool boolval
Definition: sqltypes.h:205
#define UNREACHABLE()
Definition: Logger.h:241
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:330
int32_t intval
Definition: sqltypes.h:208
float floatval
Definition: sqltypes.h:210
int64_t bigintval
Definition: sqltypes.h:209
int16_t smallintval
Definition: sqltypes.h:207
std::string * stringval
Definition: sqltypes.h:214
Definition: sqltypes.h:54
Definition: sqltypes.h:55
std::string get_type_name() const
Definition: sqltypes.h:433
Definition: sqltypes.h:43
Definition: sqltypes.h:47
double doubleval
Definition: sqltypes.h:211

+ Here is the call graph for this function:

+ Here is the caller graph for this function: