OmniSciDB  04ee39c94c
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  InIntegerSet
 
class  InValues
 
class  KeyForStringExpr
 
class  LikeExpr
 
class  LikelihoodExpr
 
class  NDVEstimator
 
class  OffsetInFragment
 
struct  OrderEntry
 
class  Query
 
class  RangeTableEntry
 
class  RegexpExpr
 
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 61 of file Analyzer.h.

◆ ExpressionPtr

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

Definition at line 179 of file Analyzer.h.

◆ ExpressionPtrList

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

Definition at line 180 of file Analyzer.h.

◆ ExpressionPtrVector

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

Definition at line 181 of file Analyzer.h.

Function Documentation

◆ Datum_equal()

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

Definition at line 1951 of file Analyzer.cpp.

References Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, SQLTypeInfoCore< TYPE_FACET_PACK >::get_type(), SQLTypeInfoCore< TYPE_FACET_PACK >::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==().

1951  {
1952  switch (ti.get_type()) {
1953  case kBOOLEAN:
1954  return val1.boolval == val2.boolval;
1955  case kCHAR:
1956  case kVARCHAR:
1957  case kTEXT:
1958  return *val1.stringval == *val2.stringval;
1959  case kNUMERIC:
1960  case kDECIMAL:
1961  case kBIGINT:
1962  return val1.bigintval == val2.bigintval;
1963  case kINT:
1964  return val1.intval == val2.intval;
1965  case kSMALLINT:
1966  return val1.smallintval == val2.smallintval;
1967  case kTINYINT:
1968  return val1.tinyintval == val2.tinyintval;
1969  case kFLOAT:
1970  return val1.floatval == val2.floatval;
1971  case kDOUBLE:
1972  return val1.doubleval == val2.doubleval;
1973  case kTIME:
1974  case kTIMESTAMP:
1975  case kDATE:
1976  case kINTERVAL_DAY_TIME:
1977  case kINTERVAL_YEAR_MONTH:
1978  return val1.bigintval == val2.bigintval;
1979  case kPOINT:
1980  case kLINESTRING:
1981  case kPOLYGON:
1982  case kMULTIPOLYGON:
1983  return *val1.stringval == *val2.stringval;
1984  default:
1985  throw std::runtime_error("Unrecognized type for Constant Datum equality: " +
1986  ti.get_type_name());
1987  }
1988  UNREACHABLE();
1989  return false;
1990 }
int8_t tinyintval
Definition: sqltypes.h:123
Definition: sqltypes.h:51
bool boolval
Definition: sqltypes.h:122
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:323
#define UNREACHABLE()
Definition: Logger.h:231
int32_t intval
Definition: sqltypes.h:125
std::string get_type_name() const
Definition: sqltypes.h:426
float floatval
Definition: sqltypes.h:127
int64_t bigintval
Definition: sqltypes.h:126
int16_t smallintval
Definition: sqltypes.h:124
std::string * stringval
Definition: sqltypes.h:131
Definition: sqltypes.h:54
Definition: sqltypes.h:55
Definition: sqltypes.h:43
Definition: sqltypes.h:47
double doubleval
Definition: sqltypes.h:128
+ Here is the call graph for this function:
+ Here is the caller graph for this function: