OmniSciDB  8a228a1076
Analyzer Namespace Reference

Namespaces

 anonymous_namespace{Analyzer.cpp}
 

Classes

class  AggExpr
 
class  ArrayExpr
 
class  BinOper
 
class  CardinalityExpr
 
class  CaseExpr
 
class  CharLengthExpr
 
class  ColumnVar
 
class  Constant
 
class  DateaddExpr
 
class  DatediffExpr
 
class  DatetruncExpr
 
class  Estimator
 
class  Expr
 
class  ExpressionTuple
 
class  ExtractExpr
 
class  FunctionOper
 
class  FunctionOperWithCustomTypeHandling
 
class  GeoBinOper
 
class  GeoUOper
 
class  InIntegerSet
 
class  InValues
 
class  KeyForStringExpr
 
class  LargeNDVEstimator
 
class  LikeExpr
 
class  LikelihoodExpr
 
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  NDVEstimator
 
class  OffsetInFragment
 
struct  OrderEntry
 
class  Query
 
class  RangeTableEntry
 
class  RegexpExpr
 
class  SampleRatioExpr
 
class  Subquery
 
class  TargetEntry
 
class  UOper
 
class  Var
 
class  WindowFunction
 

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

◆ DomainSet

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

Definition at line 62 of file Analyzer.h.

◆ ExpressionPtr

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

Definition at line 181 of file Analyzer.h.

◆ ExpressionPtrList

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

Definition at line 182 of file Analyzer.h.

◆ ExpressionPtrVector

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

Definition at line 183 of file Analyzer.h.

Function Documentation

◆ Datum_equal()

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

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

2062  {
2063  switch (ti.get_type()) {
2064  case kBOOLEAN:
2065  return val1.boolval == val2.boolval;
2066  case kCHAR:
2067  case kVARCHAR:
2068  case kTEXT:
2069  return *val1.stringval == *val2.stringval;
2070  case kNUMERIC:
2071  case kDECIMAL:
2072  case kBIGINT:
2073  return val1.bigintval == val2.bigintval;
2074  case kINT:
2075  return val1.intval == val2.intval;
2076  case kSMALLINT:
2077  return val1.smallintval == val2.smallintval;
2078  case kTINYINT:
2079  return val1.tinyintval == val2.tinyintval;
2080  case kFLOAT:
2081  return val1.floatval == val2.floatval;
2082  case kDOUBLE:
2083  return val1.doubleval == val2.doubleval;
2084  case kTIME:
2085  case kTIMESTAMP:
2086  case kDATE:
2087  case kINTERVAL_DAY_TIME:
2088  case kINTERVAL_YEAR_MONTH:
2089  return val1.bigintval == val2.bigintval;
2090  case kPOINT:
2091  case kLINESTRING:
2092  case kPOLYGON:
2093  case kMULTIPOLYGON:
2094  return *val1.stringval == *val2.stringval;
2095  default:
2096  throw std::runtime_error("Unrecognized type for Constant Datum equality: " +
2097  ti.get_type_name());
2098  }
2099  UNREACHABLE();
2100  return false;
2101 }
int8_t tinyintval
Definition: sqltypes.h:135
Definition: sqltypes.h:51
bool boolval
Definition: sqltypes.h:134
#define UNREACHABLE()
Definition: Logger.h:241
int32_t intval
Definition: sqltypes.h:137
float floatval
Definition: sqltypes.h:139
int64_t bigintval
Definition: sqltypes.h:138
int16_t smallintval
Definition: sqltypes.h:136
std::string * stringval
Definition: sqltypes.h:143
Definition: sqltypes.h:54
Definition: sqltypes.h:55
std::string get_type_name() const
Definition: sqltypes.h:362
Definition: sqltypes.h:43
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:259
Definition: sqltypes.h:47
double doubleval
Definition: sqltypes.h:140
+ Here is the call graph for this function:
+ Here is the caller graph for this function: