OmniSciDB  2c44a3935d
ExpressionRange.h File Reference
#include "../Analyzer/Analyzer.h"
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/optional.hpp>
+ Include dependency graph for ExpressionRange.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ExpressionRange
 

Typedefs

using checked_int64_t = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 64, 64, boost::multiprecision::signed_magnitude, boost::multiprecision::checked, void > >
 

Enumerations

enum  ExpressionRangeType {
  ExpressionRangeType::Invalid, ExpressionRangeType::Integer, ExpressionRangeType::Float, ExpressionRangeType::Double,
  ExpressionRangeType::Null
}
 

Functions

template<typename T >
getMin (const ExpressionRange &other)
 
template<typename T >
getMax (const ExpressionRange &other)
 
template<typename T >
get_value_from_datum (const Datum datum, const SQLTypes type_info) noexcept
 
template<>
int64_t getMin< int64_t > (const ExpressionRange &e)
 
template<>
float getMin< float > (const ExpressionRange &e)
 
template<>
double getMin< double > (const ExpressionRange &e)
 
template<>
int64_t getMax< int64_t > (const ExpressionRange &e)
 
template<>
float getMax< float > (const ExpressionRange &e)
 
template<>
double getMax< double > (const ExpressionRange &e)
 
template<>
int64_t get_value_from_datum (const Datum datum, const SQLTypes type_info) noexcept
 
template<>
double get_value_from_datum (const Datum datum, const SQLTypes type_info) noexcept
 
void apply_int_qual (const Datum const_datum, const SQLTypes const_type, const SQLOps sql_op, ExpressionRange &qual_range)
 
void apply_fp_qual (const Datum const_datum, const SQLTypes const_type, const SQLOps sql_op, ExpressionRange &qual_range)
 
void apply_hpt_qual (const Datum const_datum, const SQLTypes const_type, const int32_t const_dimen, const int32_t col_dimen, const SQLOps sql_op, ExpressionRange &qual_range)
 
ExpressionRange apply_simple_quals (const Analyzer::ColumnVar *, const ExpressionRange &, const boost::optional< std::list< std::shared_ptr< Analyzer::Expr >>>=boost::none)
 
ExpressionRange getLeafColumnRange (const Analyzer::ColumnVar *, const std::vector< InputTableInfo > &, const Executor *, const bool is_outer_join_proj)
 
ExpressionRange getExpressionRange (const Analyzer::Expr *, const std::vector< InputTableInfo > &, const Executor *, boost::optional< std::list< std::shared_ptr< Analyzer::Expr >>>=boost::none)
 

Typedef Documentation

◆ checked_int64_t

using checked_int64_t = boost::multiprecision::number< boost::multiprecision::cpp_int_backend<64, 64, boost::multiprecision::signed_magnitude, boost::multiprecision::checked, void> >

Definition at line 29 of file ExpressionRange.h.

Enumeration Type Documentation

◆ ExpressionRangeType

Function Documentation

◆ apply_fp_qual()

void apply_fp_qual ( const Datum  const_datum,
const SQLTypes  const_type,
const SQLOps  sql_op,
ExpressionRange qual_range 
)

Definition at line 73 of file ExpressionRange.cpp.

References kEQ, kGE, kGT, kLE, and kLT.

Referenced by apply_simple_quals(), and get_value_from_datum().

76  {
77  double const_val = get_value_from_datum<double>(const_datum, const_type);
78  switch (sql_op) {
79  case kGT:
80  case kGE:
81  qual_range.setFpMin(std::max(qual_range.getFpMin(), const_val));
82  break;
83  case kLT:
84  case kLE:
85  qual_range.setFpMax(std::min(qual_range.getFpMax(), const_val));
86  break;
87  case kEQ:
88  qual_range.setFpMin(std::max(qual_range.getFpMin(), const_val));
89  qual_range.setFpMax(std::min(qual_range.getFpMax(), const_val));
90  break;
91  default: // there may be other operators, but don't do anything with them
92  break;
93  }
94 }
Definition: sqldefs.h:35
Definition: sqldefs.h:36
double getFpMin() const
Definition: sqldefs.h:30
Definition: sqldefs.h:34
void setFpMax(const double fp_max)
double getFpMax() const
Definition: sqldefs.h:33
void setFpMin(const double fp_min)
+ Here is the caller graph for this function:

◆ apply_hpt_qual()

void apply_hpt_qual ( const Datum  const_datum,
const SQLTypes  const_type,
const int32_t  const_dimen,
const int32_t  col_dimen,
const SQLOps  sql_op,
ExpressionRange qual_range 
)

Definition at line 123 of file ExpressionRange.cpp.

References apply_int_qual(), Datum::bigintval, CHECK, and DateTimeUtils::get_timestamp_precision_scale().

Referenced by apply_simple_quals(), and get_value_from_datum().

128  {
129  CHECK(const_dimen != col_dimen);
130  Datum datum{0};
131  if (const_dimen > col_dimen) {
132  datum.bigintval =
133  get_value_from_datum<int64_t>(const_datum, const_type) /
134  DateTimeUtils::get_timestamp_precision_scale(const_dimen - col_dimen);
135  } else {
136  datum.bigintval =
137  get_value_from_datum<int64_t>(const_datum, const_type) *
138  DateTimeUtils::get_timestamp_precision_scale(col_dimen - const_dimen);
139  }
140  apply_int_qual(datum, const_type, sql_op, qual_range);
141 }
void apply_int_qual(const Datum const_datum, const SQLTypes const_type, const SQLOps sql_op, ExpressionRange &qual_range)
int64_t bigintval
Definition: sqltypes.h:136
#define CHECK(condition)
Definition: Logger.h:197
constexpr int64_t get_timestamp_precision_scale(const int32_t dimen)
Definition: DateTimeUtils.h:51
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply_int_qual()

void apply_int_qual ( const Datum  const_datum,
const SQLTypes  const_type,
const SQLOps  sql_op,
ExpressionRange qual_range 
)

Definition at line 96 of file ExpressionRange.cpp.

References ExpressionRange::getIntMax(), ExpressionRange::getIntMin(), kEQ, kGE, kGT, kLE, kLT, ExpressionRange::setIntMax(), and ExpressionRange::setIntMin().

Referenced by apply_hpt_qual(), apply_simple_quals(), and get_value_from_datum().

99  {
100  int64_t const_val = get_value_from_datum<int64_t>(const_datum, const_type);
101  switch (sql_op) {
102  case kGT:
103  qual_range.setIntMin(std::max(qual_range.getIntMin(), const_val + 1));
104  break;
105  case kGE:
106  qual_range.setIntMin(std::max(qual_range.getIntMin(), const_val));
107  break;
108  case kLT:
109  qual_range.setIntMax(std::min(qual_range.getIntMax(), const_val - 1));
110  break;
111  case kLE:
112  qual_range.setIntMax(std::min(qual_range.getIntMax(), const_val));
113  break;
114  case kEQ:
115  qual_range.setIntMin(std::max(qual_range.getIntMin(), const_val));
116  qual_range.setIntMax(std::min(qual_range.getIntMax(), const_val));
117  break;
118  default: // there may be other operators, but don't do anything with them
119  break;
120  }
121 }
Definition: sqldefs.h:35
Definition: sqldefs.h:36
Definition: sqldefs.h:30
void setIntMin(const int64_t int_min)
int64_t getIntMax() const
int64_t getIntMin() const
Definition: sqldefs.h:34
void setIntMax(const int64_t int_max)
Definition: sqldefs.h:33
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply_simple_quals()

ExpressionRange apply_simple_quals ( const Analyzer::ColumnVar ,
const ExpressionRange ,
const boost::optional< std::list< std::shared_ptr< Analyzer::Expr >>>  = boost::none 
)

Definition at line 143 of file ExpressionRange.cpp.

References apply_fp_qual(), apply_hpt_qual(), apply_int_qual(), Double, Float, Analyzer::ColumnVar::get_column_id(), Analyzer::ColumnVar::get_table_id(), and ExpressionRange::getType().

Referenced by get_value_from_datum(), and getExpressionRange().

146  {
147  if (!simple_quals) {
148  return col_range;
149  }
150  ExpressionRange qual_range(col_range);
151  for (auto const& itr : simple_quals.get()) {
152  auto qual_bin_oper = dynamic_cast<Analyzer::BinOper*>(itr.get());
153  if (!qual_bin_oper) {
154  continue;
155  }
156  const Analyzer::Expr* left_operand = qual_bin_oper->get_left_operand();
157  auto qual_col = dynamic_cast<const Analyzer::ColumnVar*>(left_operand);
158  if (!qual_col) {
159  // Check for possibility that column is wrapped in a cast
160  // Presumes that only simple casts (i.e. timestamp to timestamp or int to int) have
161  // been passed through by BinOper::normalize_simple_predicate
162  auto u_expr = dynamic_cast<const Analyzer::UOper*>(left_operand);
163  if (!u_expr) {
164  continue;
165  }
166  qual_col = dynamic_cast<const Analyzer::ColumnVar*>(u_expr->get_operand());
167  if (!qual_col) {
168  continue;
169  }
170  }
171  if (qual_col->get_table_id() != col_expr->get_table_id() ||
172  qual_col->get_column_id() != col_expr->get_column_id()) {
173  continue;
174  }
175  const Analyzer::Expr* right_operand = qual_bin_oper->get_right_operand();
176  auto qual_const = dynamic_cast<const Analyzer::Constant*>(right_operand);
177  if (!qual_const) {
178  continue;
179  }
180  if (qual_range.getType() == ExpressionRangeType::Float ||
181  qual_range.getType() == ExpressionRangeType::Double) {
182  apply_fp_qual(qual_const->get_constval(),
183  qual_const->get_type_info().get_type(),
184  qual_bin_oper->get_optype(),
185  qual_range);
186  } else if ((qual_col->get_type_info().is_timestamp() ||
187  qual_const->get_type_info().is_timestamp()) &&
188  (qual_col->get_type_info().get_dimension() !=
189  qual_const->get_type_info().get_dimension())) {
190  apply_hpt_qual(qual_const->get_constval(),
191  qual_const->get_type_info().get_type(),
192  qual_const->get_type_info().get_dimension(),
193  qual_col->get_type_info().get_dimension(),
194  qual_bin_oper->get_optype(),
195  qual_range);
196  } else {
197  apply_int_qual(qual_const->get_constval(),
198  qual_const->get_type_info().get_type(),
199  qual_bin_oper->get_optype(),
200  qual_range);
201  }
202  }
203  return qual_range;
204 }
void apply_hpt_qual(const Datum const_datum, const SQLTypes const_type, const int32_t const_dimen, const int32_t col_dimen, const SQLOps sql_op, ExpressionRange &qual_range)
void apply_int_qual(const Datum const_datum, const SQLTypes const_type, const SQLOps sql_op, ExpressionRange &qual_range)
void apply_fp_qual(const Datum const_datum, const SQLTypes const_type, const SQLOps sql_op, ExpressionRange &qual_range)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_value_from_datum() [1/3]

template<typename T >
T get_value_from_datum ( const Datum  datum,
const SQLTypes  type_info 
)
inlinenoexcept

Definition at line 250 of file ExpressionRange.h.

References apply_fp_qual(), apply_hpt_qual(), apply_int_qual(), apply_simple_quals(), Datum::bigintval, Datum::boolval, Datum::doubleval, Datum::floatval, getExpressionRange(), getLeafColumnRange(), Datum::intval, kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, run_benchmark_import::optional, Datum::smallintval, Datum::tinyintval, and UNREACHABLE.

251  {
252  switch (type_info) {
253  case kBOOLEAN:
254  return datum.boolval;
255  case kTINYINT:
256  return datum.tinyintval;
257  case kSMALLINT:
258  return datum.smallintval;
259  case kINT:
260  return datum.intval;
261  case kBIGINT:
262  return datum.bigintval;
263  case kTIME:
264  case kTIMESTAMP:
265  case kDATE:
266  return datum.bigintval;
267  case kNUMERIC:
268  case kDECIMAL: {
269  return datum.bigintval;
270  break;
271  }
272  default:
273  UNREACHABLE();
274  }
275  return (int64_t)0;
276 }
int8_t tinyintval
Definition: sqltypes.h:133
Definition: sqltypes.h:50
bool boolval
Definition: sqltypes.h:132
#define UNREACHABLE()
Definition: Logger.h:241
int32_t intval
Definition: sqltypes.h:135
int64_t bigintval
Definition: sqltypes.h:136
int16_t smallintval
Definition: sqltypes.h:134
Definition: sqltypes.h:54
Definition: sqltypes.h:46
+ Here is the call graph for this function:

◆ get_value_from_datum() [2/3]

template<>
int64_t get_value_from_datum ( const Datum  datum,
const SQLTypes  type_info 
)
inlinenoexcept

Definition at line 250 of file ExpressionRange.h.

References Datum::bigintval, Datum::boolval, Datum::intval, kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, Datum::smallintval, Datum::tinyintval, and UNREACHABLE.

251  {
252  switch (type_info) {
253  case kBOOLEAN:
254  return datum.boolval;
255  case kTINYINT:
256  return datum.tinyintval;
257  case kSMALLINT:
258  return datum.smallintval;
259  case kINT:
260  return datum.intval;
261  case kBIGINT:
262  return datum.bigintval;
263  case kTIME:
264  case kTIMESTAMP:
265  case kDATE:
266  return datum.bigintval;
267  case kNUMERIC:
268  case kDECIMAL: {
269  return datum.bigintval;
270  break;
271  }
272  default:
273  UNREACHABLE();
274  }
275  return (int64_t)0;
276 }
int8_t tinyintval
Definition: sqltypes.h:133
Definition: sqltypes.h:50
bool boolval
Definition: sqltypes.h:132
#define UNREACHABLE()
Definition: Logger.h:241
int32_t intval
Definition: sqltypes.h:135
int64_t bigintval
Definition: sqltypes.h:136
int16_t smallintval
Definition: sqltypes.h:134
Definition: sqltypes.h:54
Definition: sqltypes.h:46

◆ get_value_from_datum() [3/3]

template<>
double get_value_from_datum ( const Datum  datum,
const SQLTypes  type_info 
)
inlinenoexcept

Definition at line 279 of file ExpressionRange.h.

References apply_fp_qual(), apply_hpt_qual(), apply_int_qual(), apply_simple_quals(), Datum::doubleval, Datum::floatval, getExpressionRange(), getLeafColumnRange(), kDOUBLE, kFLOAT, run_benchmark_import::optional, and UNREACHABLE.

279  {
280  switch (type_info) {
281  case kFLOAT:
282  return datum.floatval;
283  case kDOUBLE:
284  return datum.doubleval;
285  default:
286  UNREACHABLE();
287  }
288  return 0.0;
289 }
#define UNREACHABLE()
Definition: Logger.h:241
float floatval
Definition: sqltypes.h:137
double doubleval
Definition: sqltypes.h:138
+ Here is the call graph for this function:

◆ getExpressionRange()

ExpressionRange getExpressionRange ( const Analyzer::Expr ,
const std::vector< InputTableInfo > &  ,
const Executor ,
boost::optional< std::list< std::shared_ptr< Analyzer::Expr >>>  = boost::none 
)

Definition at line 325 of file ExpressionRange.cpp.

References Analyzer::Expr::get_type_info(), getExpressionRange(), ExpressionRange::makeInvalidRange(), and ExpressionRange::typeSupportsRange().

Referenced by get_value_from_datum().

329  {
330  const auto& expr_ti = expr->get_type_info();
331  if (!ExpressionRange::typeSupportsRange(expr_ti)) {
333  }
334  auto bin_oper_expr = dynamic_cast<const Analyzer::BinOper*>(expr);
335  if (bin_oper_expr) {
336  return getExpressionRange(bin_oper_expr, query_infos, executor, simple_quals);
337  }
338  auto constant_expr = dynamic_cast<const Analyzer::Constant*>(expr);
339  if (constant_expr) {
340  return getExpressionRange(constant_expr);
341  }
342  auto column_var_expr = dynamic_cast<const Analyzer::ColumnVar*>(expr);
343  if (column_var_expr) {
344  return getExpressionRange(column_var_expr, query_infos, executor, simple_quals);
345  }
346  auto like_expr = dynamic_cast<const Analyzer::LikeExpr*>(expr);
347  if (like_expr) {
348  return getExpressionRange(like_expr);
349  }
350  auto case_expr = dynamic_cast<const Analyzer::CaseExpr*>(expr);
351  if (case_expr) {
352  return getExpressionRange(case_expr, query_infos, executor);
353  }
354  auto u_expr = dynamic_cast<const Analyzer::UOper*>(expr);
355  if (u_expr) {
356  return getExpressionRange(u_expr, query_infos, executor, simple_quals);
357  }
358  auto extract_expr = dynamic_cast<const Analyzer::ExtractExpr*>(expr);
359  if (extract_expr) {
360  return getExpressionRange(extract_expr, query_infos, executor, simple_quals);
361  }
362  auto datetrunc_expr = dynamic_cast<const Analyzer::DatetruncExpr*>(expr);
363  if (datetrunc_expr) {
364  return getExpressionRange(datetrunc_expr, query_infos, executor, simple_quals);
365  }
367 }
ExpressionRange getExpressionRange(const Analyzer::BinOper *expr, const std::vector< InputTableInfo > &query_infos, const Executor *, boost::optional< std::list< std::shared_ptr< Analyzer::Expr >>> simple_quals)
static bool typeSupportsRange(const SQLTypeInfo &ti)
static ExpressionRange makeInvalidRange()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLeafColumnRange()

ExpressionRange getLeafColumnRange ( const Analyzer::ColumnVar ,
const std::vector< InputTableInfo > &  ,
const Executor ,
const bool  is_outer_join_proj 
)

Definition at line 529 of file ExpressionRange.cpp.

References CHECK, CHECK_EQ, CHECK_GT, CHECK_NE, dtDAY, extract_max_stat(), anonymous_namespace{ExpressionRange.cpp}::extract_max_stat_double(), extract_min_stat(), anonymous_namespace{ExpressionRange.cpp}::extract_min_stat_double(), FIND_STAT_FRAG, Analyzer::ColumnVar::get_column_id(), anonymous_namespace{ExpressionRange.cpp}::get_conservative_datetrunc_bucket(), SQLTypeInfo::get_elem_type(), get_logical_type_info(), Analyzer::ColumnVar::get_table_id(), Analyzer::Expr::get_type_info(), SQLTypeInfo::is_array(), kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, ExpressionRange::makeDoubleRange(), ExpressionRange::makeFloatRange(), ExpressionRange::makeIntRange(), and ExpressionRange::makeInvalidRange().

Referenced by Executor::computeColRangesCache(), get_value_from_datum(), and getExpressionRange().

532  {
533  bool has_nulls = is_outer_join_proj;
534  int col_id = col_expr->get_column_id();
535  const auto& col_phys_ti = col_expr->get_type_info().is_array()
536  ? col_expr->get_type_info().get_elem_type()
537  : col_expr->get_type_info();
538  const auto col_ti = get_logical_type_info(col_phys_ti);
539  switch (col_ti.get_type()) {
540  case kTEXT:
541  case kCHAR:
542  case kVARCHAR:
543  CHECK_EQ(kENCODING_DICT, col_ti.get_compression());
544  case kBOOLEAN:
545  case kTINYINT:
546  case kSMALLINT:
547  case kINT:
548  case kBIGINT:
549  case kDECIMAL:
550  case kNUMERIC:
551  case kDATE:
552  case kTIMESTAMP:
553  case kTIME:
554  case kFLOAT:
555  case kDOUBLE: {
556  ssize_t ti_idx = -1;
557  for (size_t i = 0; i < query_infos.size(); ++i) {
558  if (col_expr->get_table_id() == query_infos[i].table_id) {
559  ti_idx = i;
560  break;
561  }
562  }
563  CHECK_NE(ssize_t(-1), ti_idx);
564  const auto& query_info = query_infos[ti_idx].info;
565  const auto& fragments = query_info.fragments;
566  const auto cd = executor->getColumnDescriptor(col_expr);
567  if (cd && cd->isVirtualCol) {
568  CHECK(cd->columnName == "rowid");
569  CHECK_EQ(kBIGINT, col_ti.get_type());
570  const int64_t num_tuples = query_info.getNumTuples();
572  0, std::max(num_tuples - 1, int64_t(0)), 0, has_nulls);
573  }
574  if (query_info.getNumTuples() == 0) {
575  // The column doesn't contain any values, synthesize an empty range.
576  if (col_ti.is_fp()) {
577  return col_ti.get_type() == kFLOAT
578  ? ExpressionRange::makeFloatRange(0, -1, false)
579  : ExpressionRange::makeDoubleRange(0, -1, false);
580  }
581  return ExpressionRange::makeIntRange(0, -1, 0, false);
582  }
583  std::vector<size_t> nonempty_fragment_indices;
584  for (size_t i = 0; i < fragments.size(); ++i) {
585  const auto& fragment = fragments[i];
586  if (!fragment.isEmptyPhysicalFragment()) {
587  nonempty_fragment_indices.push_back(i);
588  }
589  }
590  FIND_STAT_FRAG(min);
591  FIND_STAT_FRAG(max);
592  const auto& min_frag = fragments[*min_frag_index];
593  const auto min_it = min_frag.getChunkMetadataMap().find(col_id);
594  if (min_it == min_frag.getChunkMetadataMap().end()) {
596  }
597  const auto& max_frag = fragments[*max_frag_index];
598  const auto max_it = max_frag.getChunkMetadataMap().find(col_id);
599  CHECK(max_it != max_frag.getChunkMetadataMap().end());
600  for (const auto& fragment : fragments) {
601  const auto it = fragment.getChunkMetadataMap().find(col_id);
602  if (it != fragment.getChunkMetadataMap().end()) {
603  if (it->second->chunkStats.has_nulls) {
604  has_nulls = true;
605  break;
606  }
607  }
608  }
609  if (col_ti.is_fp()) {
610  const auto min_val = extract_min_stat_double(min_it->second->chunkStats, col_ti);
611  const auto max_val = extract_max_stat_double(max_it->second->chunkStats, col_ti);
612  return col_ti.get_type() == kFLOAT
613  ? ExpressionRange::makeFloatRange(min_val, max_val, has_nulls)
614  : ExpressionRange::makeDoubleRange(min_val, max_val, has_nulls);
615  }
616  const auto min_val = extract_min_stat(min_it->second->chunkStats, col_ti);
617  const auto max_val = extract_max_stat(max_it->second->chunkStats, col_ti);
618  if (max_val < min_val) {
619  // The column doesn't contain any non-null values, synthesize an empty range.
620  CHECK_GT(min_val, 0);
621  return ExpressionRange::makeIntRange(0, -1, 0, has_nulls);
622  }
623  const int64_t bucket =
624  col_ti.get_type() == kDATE ? get_conservative_datetrunc_bucket(dtDAY) : 0;
625  return ExpressionRange::makeIntRange(min_val, max_val, bucket, has_nulls);
626  }
627  default:
628  break;
629  }
631 }
#define CHECK_EQ(x, y)
Definition: Logger.h:205
#define FIND_STAT_FRAG(stat_name)
Definition: sqltypes.h:50
double extract_min_stat_double(const ChunkStats &stats, const SQLTypeInfo &col_ti)
SQLTypeInfo get_logical_type_info(const SQLTypeInfo &type_info)
Definition: sqltypes.h:807
#define CHECK_GT(x, y)
Definition: Logger.h:209
static ExpressionRange makeFloatRange(const float fp_min, const float fp_max, const bool has_nulls)
int64_t get_conservative_datetrunc_bucket(const DatetruncField datetrunc_field)
#define CHECK_NE(x, y)
Definition: Logger.h:206
static ExpressionRange makeIntRange(const int64_t int_min, const int64_t int_max, const int64_t bucket, const bool has_nulls)
Definition: sqltypes.h:53
Definition: sqltypes.h:54
Definition: sqltypes.h:42
int64_t extract_min_stat(const ChunkStats &stats, const SQLTypeInfo &ti)
#define CHECK(condition)
Definition: Logger.h:197
Definition: sqltypes.h:46
static ExpressionRange makeInvalidRange()
double extract_max_stat_double(const ChunkStats &stats, const SQLTypeInfo &col_ti)
int64_t extract_max_stat(const ChunkStats &stats, const SQLTypeInfo &ti)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMax()

template<typename T >
T getMax ( const ExpressionRange other)

◆ getMax< double >()

template<>
double getMax< double > ( const ExpressionRange e)
inline

Definition at line 245 of file ExpressionRange.h.

245  {
246  return e.getFpMax();
247 }
double getFpMax() const

◆ getMax< float >()

template<>
float getMax< float > ( const ExpressionRange e)
inline

Definition at line 240 of file ExpressionRange.h.

240  {
241  return e.getFpMax();
242 }
double getFpMax() const

◆ getMax< int64_t >()

template<>
int64_t getMax< int64_t > ( const ExpressionRange e)
inline

Definition at line 235 of file ExpressionRange.h.

235  {
236  return e.getIntMax();
237 }
int64_t getIntMax() const

◆ getMin()

template<typename T >
T getMin ( const ExpressionRange other)

◆ getMin< double >()

template<>
double getMin< double > ( const ExpressionRange e)
inline

Definition at line 230 of file ExpressionRange.h.

230  {
231  return e.getFpMin();
232 }
double getFpMin() const

◆ getMin< float >()

template<>
float getMin< float > ( const ExpressionRange e)
inline

Definition at line 225 of file ExpressionRange.h.

225  {
226  return e.getFpMin();
227 }
double getFpMin() const

◆ getMin< int64_t >()

template<>
int64_t getMin< int64_t > ( const ExpressionRange e)
inline

Definition at line 220 of file ExpressionRange.h.

220  {
221  return e.getIntMin();
222 }
int64_t getIntMin() const