OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 >>
 
using checked_int16_t = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 15, 15, 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

using checked_int16_t = boost::multiprecision::number< boost::multiprecision::cpp_int_backend<15, 15, boost::multiprecision::signed_magnitude, boost::multiprecision::checked, void>>

Definition at line 39 of file ExpressionRange.h.

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

Function Documentation

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

Definition at line 74 of file ExpressionRange.cpp.

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

Referenced by apply_simple_quals().

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

+ Here is the caller graph for this function:

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 124 of file ExpressionRange.cpp.

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

Referenced by apply_simple_quals().

129  {
130  CHECK(const_dimen != col_dimen);
131  Datum datum{0};
132  if (const_dimen > col_dimen) {
133  datum.bigintval =
134  get_value_from_datum<int64_t>(const_datum, const_type) /
135  DateTimeUtils::get_timestamp_precision_scale(const_dimen - col_dimen);
136  } else {
137  datum.bigintval =
138  get_value_from_datum<int64_t>(const_datum, const_type) *
139  DateTimeUtils::get_timestamp_precision_scale(col_dimen - const_dimen);
140  }
141  apply_int_qual(datum, const_type, sql_op, qual_range);
142 }
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:215
#define CHECK(condition)
Definition: Logger.h:209
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:

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

Definition at line 97 of file ExpressionRange.cpp.

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

Referenced by apply_hpt_qual(), and apply_simple_quals().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 144 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 getExpressionRange().

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

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

Definition at line 282 of file ExpressionRange.h.

References kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, and UNREACHABLE.

283  {
284  switch (type_info) {
285  case kBOOLEAN:
286  return datum.boolval;
287  case kTINYINT:
288  return datum.tinyintval;
289  case kSMALLINT:
290  return datum.smallintval;
291  case kINT:
292  return datum.intval;
293  case kBIGINT:
294  return datum.bigintval;
295  case kTIME:
296  case kTIMESTAMP:
297  case kDATE:
298  return datum.bigintval;
299  case kNUMERIC:
300  case kDECIMAL: {
301  return datum.bigintval;
302  break;
303  }
304  default:
305  UNREACHABLE();
306  }
307  return (int64_t)0;
308 }
int8_t tinyintval
Definition: sqltypes.h:212
Definition: sqltypes.h:49
int8_t boolval
Definition: sqltypes.h:211
#define UNREACHABLE()
Definition: Logger.h:253
int32_t intval
Definition: sqltypes.h:214
int64_t bigintval
Definition: sqltypes.h:215
int16_t smallintval
Definition: sqltypes.h:213
Definition: sqltypes.h:53
Definition: sqltypes.h:45
template<>
int64_t get_value_from_datum ( const Datum  datum,
const SQLTypes  type_info 
)
inlinenoexcept

Definition at line 282 of file ExpressionRange.h.

References kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, and UNREACHABLE.

283  {
284  switch (type_info) {
285  case kBOOLEAN:
286  return datum.boolval;
287  case kTINYINT:
288  return datum.tinyintval;
289  case kSMALLINT:
290  return datum.smallintval;
291  case kINT:
292  return datum.intval;
293  case kBIGINT:
294  return datum.bigintval;
295  case kTIME:
296  case kTIMESTAMP:
297  case kDATE:
298  return datum.bigintval;
299  case kNUMERIC:
300  case kDECIMAL: {
301  return datum.bigintval;
302  break;
303  }
304  default:
305  UNREACHABLE();
306  }
307  return (int64_t)0;
308 }
int8_t tinyintval
Definition: sqltypes.h:212
Definition: sqltypes.h:49
int8_t boolval
Definition: sqltypes.h:211
#define UNREACHABLE()
Definition: Logger.h:253
int32_t intval
Definition: sqltypes.h:214
int64_t bigintval
Definition: sqltypes.h:215
int16_t smallintval
Definition: sqltypes.h:213
Definition: sqltypes.h:53
Definition: sqltypes.h:45
template<>
double get_value_from_datum ( const Datum  datum,
const SQLTypes  type_info 
)
inlinenoexcept

Definition at line 311 of file ExpressionRange.h.

References kDOUBLE, kFLOAT, and UNREACHABLE.

311  {
312  switch (type_info) {
313  case kFLOAT:
314  return datum.floatval;
315  case kDOUBLE:
316  return datum.doubleval;
317  default:
318  UNREACHABLE();
319  }
320  return 0.0;
321 }
#define UNREACHABLE()
Definition: Logger.h:253
float floatval
Definition: sqltypes.h:216
double doubleval
Definition: sqltypes.h:217
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 332 of file ExpressionRange.cpp.

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

336  {
337  const auto& expr_ti = expr->get_type_info();
338  if (!ExpressionRange::typeSupportsRange(expr_ti)) {
340  }
341  auto bin_oper_expr = dynamic_cast<const Analyzer::BinOper*>(expr);
342  if (bin_oper_expr) {
343  return getExpressionRange(bin_oper_expr, query_infos, executor, simple_quals);
344  }
345  auto constant_expr = dynamic_cast<const Analyzer::Constant*>(expr);
346  if (constant_expr) {
347  return getExpressionRange(constant_expr);
348  }
349  auto column_var_expr = dynamic_cast<const Analyzer::ColumnVar*>(expr);
350  if (column_var_expr) {
351  return getExpressionRange(column_var_expr, query_infos, executor, simple_quals);
352  }
353  auto like_expr = dynamic_cast<const Analyzer::LikeExpr*>(expr);
354  if (like_expr) {
355  return getExpressionRange(like_expr);
356  }
357  auto case_expr = dynamic_cast<const Analyzer::CaseExpr*>(expr);
358  if (case_expr) {
359  return getExpressionRange(case_expr, query_infos, executor);
360  }
361  auto u_expr = dynamic_cast<const Analyzer::UOper*>(expr);
362  if (u_expr) {
363  return getExpressionRange(u_expr, query_infos, executor, simple_quals);
364  }
365  auto extract_expr = dynamic_cast<const Analyzer::ExtractExpr*>(expr);
366  if (extract_expr) {
367  return getExpressionRange(extract_expr, query_infos, executor, simple_quals);
368  }
369  auto datetrunc_expr = dynamic_cast<const Analyzer::DatetruncExpr*>(expr);
370  if (datetrunc_expr) {
371  return getExpressionRange(datetrunc_expr, query_infos, executor, simple_quals);
372  }
373  auto width_bucket_expr = dynamic_cast<const Analyzer::WidthBucketExpr*>(expr);
374  if (width_bucket_expr) {
375  return getExpressionRange(width_bucket_expr, query_infos, executor, simple_quals);
376  }
378 }
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()
ALWAYS_INLINE DEVICE double width_bucket_expr(const double target_value, const bool reversed, const double lower_bound, const double upper_bound, const int32_t partition_count)

+ Here is the call graph for this function:

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

Definition at line 542 of file ExpressionRange.cpp.

References CHECK, CHECK_EQ, CHECK_GT, 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(), i, 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(), and getExpressionRange().

545  {
546  bool has_nulls = is_outer_join_proj;
547  int col_id = col_expr->get_column_id();
548  const auto& col_phys_ti = col_expr->get_type_info().is_array()
549  ? col_expr->get_type_info().get_elem_type()
550  : col_expr->get_type_info();
551  const auto col_ti = get_logical_type_info(col_phys_ti);
552  switch (col_ti.get_type()) {
553  case kTEXT:
554  case kCHAR:
555  case kVARCHAR:
556  CHECK_EQ(kENCODING_DICT, col_ti.get_compression());
557  case kBOOLEAN:
558  case kTINYINT:
559  case kSMALLINT:
560  case kINT:
561  case kBIGINT:
562  case kDECIMAL:
563  case kNUMERIC:
564  case kDATE:
565  case kTIMESTAMP:
566  case kTIME:
567  case kFLOAT:
568  case kDOUBLE: {
569  std::optional<size_t> ti_idx;
570  for (size_t i = 0; i < query_infos.size(); ++i) {
571  if (col_expr->get_table_id() == query_infos[i].table_id) {
572  ti_idx = i;
573  break;
574  }
575  }
576  CHECK(ti_idx);
577  const auto& query_info = query_infos[*ti_idx].info;
578  const auto& fragments = query_info.fragments;
579  const auto cd = executor->getColumnDescriptor(col_expr);
580  if (cd && cd->isVirtualCol) {
581  CHECK(cd->columnName == "rowid");
582  CHECK_EQ(kBIGINT, col_ti.get_type());
583  const int64_t num_tuples = query_info.getNumTuples();
585  0, std::max(num_tuples - 1, int64_t(0)), 0, has_nulls);
586  }
587  if (query_info.getNumTuples() == 0) {
588  // The column doesn't contain any values, synthesize an empty range.
589  if (col_ti.is_fp()) {
590  return col_ti.get_type() == kFLOAT
591  ? ExpressionRange::makeFloatRange(0, -1, false)
592  : ExpressionRange::makeDoubleRange(0, -1, false);
593  }
594  return ExpressionRange::makeIntRange(0, -1, 0, false);
595  }
596  std::vector<size_t> nonempty_fragment_indices;
597  for (size_t i = 0; i < fragments.size(); ++i) {
598  const auto& fragment = fragments[i];
599  if (!fragment.isEmptyPhysicalFragment()) {
600  nonempty_fragment_indices.push_back(i);
601  }
602  }
603  FIND_STAT_FRAG(min);
604  FIND_STAT_FRAG(max);
605  const auto& min_frag = fragments[*min_frag_index];
606  const auto min_it = min_frag.getChunkMetadataMap().find(col_id);
607  if (min_it == min_frag.getChunkMetadataMap().end()) {
609  }
610  const auto& max_frag = fragments[*max_frag_index];
611  const auto max_it = max_frag.getChunkMetadataMap().find(col_id);
612  CHECK(max_it != max_frag.getChunkMetadataMap().end());
613  for (const auto& fragment : fragments) {
614  const auto it = fragment.getChunkMetadataMap().find(col_id);
615  if (it != fragment.getChunkMetadataMap().end()) {
616  if (it->second->chunkStats.has_nulls) {
617  has_nulls = true;
618  break;
619  }
620  }
621  }
622  if (col_ti.is_fp()) {
623  const auto min_val = extract_min_stat_double(min_it->second->chunkStats, col_ti);
624  const auto max_val = extract_max_stat_double(max_it->second->chunkStats, col_ti);
625  return col_ti.get_type() == kFLOAT
626  ? ExpressionRange::makeFloatRange(min_val, max_val, has_nulls)
627  : ExpressionRange::makeDoubleRange(min_val, max_val, has_nulls);
628  }
629  const auto min_val = extract_min_stat(min_it->second->chunkStats, col_ti);
630  const auto max_val = extract_max_stat(max_it->second->chunkStats, col_ti);
631  if (max_val < min_val) {
632  // The column doesn't contain any non-null values, synthesize an empty range.
633  CHECK_GT(min_val, 0);
634  return ExpressionRange::makeIntRange(0, -1, 0, has_nulls);
635  }
636  const int64_t bucket =
637  col_ti.get_type() == kDATE ? get_conservative_datetrunc_bucket(dtDAY) : 0;
638  return ExpressionRange::makeIntRange(min_val, max_val, bucket, has_nulls);
639  }
640  default:
641  break;
642  }
644 }
#define CHECK_EQ(x, y)
Definition: Logger.h:217
#define FIND_STAT_FRAG(stat_name)
Definition: sqltypes.h:49
double extract_min_stat_double(const ChunkStats &stats, const SQLTypeInfo &col_ti)
SQLTypeInfo get_logical_type_info(const SQLTypeInfo &type_info)
Definition: sqltypes.h:1049
#define CHECK_GT(x, y)
Definition: Logger.h:221
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)
static ExpressionRange makeIntRange(const int64_t int_min, const int64_t int_max, const int64_t bucket, const bool has_nulls)
Definition: sqltypes.h:52
Definition: sqltypes.h:53
Definition: sqltypes.h:41
int64_t extract_min_stat(const ChunkStats &stats, const SQLTypeInfo &ti)
bool g_enable_watchdog false
Definition: Execute.cpp:76
#define CHECK(condition)
Definition: Logger.h:209
Definition: sqltypes.h:45
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:

template<typename T >
T getMax ( const ExpressionRange other)
template<>
double getMax< double > ( const ExpressionRange e)
inline

Definition at line 277 of file ExpressionRange.h.

277  {
278  return e.getFpMax();
279 }
double getFpMax() const
template<>
float getMax< float > ( const ExpressionRange e)
inline

Definition at line 272 of file ExpressionRange.h.

272  {
273  return e.getFpMax();
274 }
double getFpMax() const
template<>
int64_t getMax< int64_t > ( const ExpressionRange e)
inline

Definition at line 267 of file ExpressionRange.h.

267  {
268  return e.getIntMax();
269 }
int64_t getIntMax() const
template<typename T >
T getMin ( const ExpressionRange other)
template<>
double getMin< double > ( const ExpressionRange e)
inline

Definition at line 262 of file ExpressionRange.h.

262  {
263  return e.getFpMin();
264 }
double getFpMin() const
template<>
float getMin< float > ( const ExpressionRange e)
inline

Definition at line 257 of file ExpressionRange.h.

257  {
258  return e.getFpMin();
259 }
double getFpMin() const
template<>
int64_t getMin< int64_t > ( const ExpressionRange e)
inline

Definition at line 252 of file ExpressionRange.h.

252  {
253  return e.getIntMin();
254 }
int64_t getIntMin() const