OmniSciDB  085a039ca4
 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  CardinalityExpr
 
class  LikeExpr
 
class  RegexpExpr
 
class  WidthBucketExpr
 
class  LikelihoodExpr
 
class  AggExpr
 
class  CaseExpr
 
class  ExtractExpr
 
class  DateaddExpr
 
class  DatediffExpr
 
class  DatetruncExpr
 
class  StringOper
 Expression class for string functions The "arg" constructor parameter must be an expression that resolves to a string datatype (e.g. TEXT). More...
 
class  LowerStringOper
 
class  UpperStringOper
 
class  InitCapStringOper
 
class  ReverseStringOper
 
class  RepeatStringOper
 
class  ConcatStringOper
 
class  PadStringOper
 
class  TrimStringOper
 
class  SubstringStringOper
 
class  OverlayStringOper
 
class  ReplaceStringOper
 
class  SplitPartStringOper
 
class  RegexpReplaceStringOper
 
class  RegexpSubstrStringOper
 
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 LiteralArgMap = std::map< size_t, std::pair< SQLTypes, Datum >>
 
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 64 of file Analyzer.h.

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

Definition at line 186 of file Analyzer.h.

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

Definition at line 187 of file Analyzer.h.

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

Definition at line 188 of file Analyzer.h.

using Analyzer::LiteralArgMap = typedef std::map<size_t, std::pair<SQLTypes, Datum>>

Definition at line 3900 of file Analyzer.cpp.

Function Documentation

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

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

2174  {
2175  switch (ti.get_type()) {
2176  case kBOOLEAN:
2177  return val1.boolval == val2.boolval;
2178  case kCHAR:
2179  case kVARCHAR:
2180  case kTEXT:
2181  return *val1.stringval == *val2.stringval;
2182  case kNUMERIC:
2183  case kDECIMAL:
2184  case kBIGINT:
2185  return val1.bigintval == val2.bigintval;
2186  case kINT:
2187  return val1.intval == val2.intval;
2188  case kSMALLINT:
2189  return val1.smallintval == val2.smallintval;
2190  case kTINYINT:
2191  return val1.tinyintval == val2.tinyintval;
2192  case kFLOAT:
2193  return val1.floatval == val2.floatval;
2194  case kDOUBLE:
2195  return val1.doubleval == val2.doubleval;
2196  case kTIME:
2197  case kTIMESTAMP:
2198  case kDATE:
2199  case kINTERVAL_DAY_TIME:
2200  case kINTERVAL_YEAR_MONTH:
2201  return val1.bigintval == val2.bigintval;
2202  case kPOINT:
2203  case kLINESTRING:
2204  case kPOLYGON:
2205  case kMULTIPOLYGON:
2206  return *val1.stringval == *val2.stringval;
2207  default:
2208  throw std::runtime_error("Unrecognized type for Constant Datum equality: " +
2209  ti.get_type_name());
2210  }
2211  UNREACHABLE();
2212  return false;
2213 }
int8_t tinyintval
Definition: sqltypes.h:212
Definition: sqltypes.h:49
int8_t boolval
Definition: sqltypes.h:211
#define UNREACHABLE()
Definition: Logger.h:267
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:443
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: