OmniSciDB  085a039ca4
 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:223
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:267
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:267
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:267
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 335 of file ExpressionRange.cpp.

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

339  {
340  const auto& expr_ti = expr->get_type_info();
341  if (!ExpressionRange::typeSupportsRange(expr_ti)) {
343  }
344  auto bin_oper_expr = dynamic_cast<const Analyzer::BinOper*>(expr);
345  if (bin_oper_expr) {
346  return getExpressionRange(bin_oper_expr, query_infos, executor, simple_quals);
347  }
348  auto constant_expr = dynamic_cast<const Analyzer::Constant*>(expr);
349  if (constant_expr) {
350  return getExpressionRange(constant_expr);
351  }
352  auto column_var_expr = dynamic_cast<const Analyzer::ColumnVar*>(expr);
353  if (column_var_expr) {
354  return getExpressionRange(column_var_expr, query_infos, executor, simple_quals);
355  }
356  auto string_oper_expr = dynamic_cast<const Analyzer::StringOper*>(expr);
357  if (string_oper_expr) {
358  return getExpressionRange(string_oper_expr, executor);
359  }
360 
361  auto like_expr = dynamic_cast<const Analyzer::LikeExpr*>(expr);
362  if (like_expr) {
363  return getExpressionRange(like_expr);
364  }
365  auto case_expr = dynamic_cast<const Analyzer::CaseExpr*>(expr);
366  if (case_expr) {
367  return getExpressionRange(case_expr, query_infos, executor);
368  }
369  auto u_expr = dynamic_cast<const Analyzer::UOper*>(expr);
370  if (u_expr) {
371  return getExpressionRange(u_expr, query_infos, executor, simple_quals);
372  }
373  auto extract_expr = dynamic_cast<const Analyzer::ExtractExpr*>(expr);
374  if (extract_expr) {
375  return getExpressionRange(extract_expr, query_infos, executor, simple_quals);
376  }
377  auto datetrunc_expr = dynamic_cast<const Analyzer::DatetruncExpr*>(expr);
378  if (datetrunc_expr) {
379  return getExpressionRange(datetrunc_expr, query_infos, executor, simple_quals);
380  }
381  auto width_bucket_expr = dynamic_cast<const Analyzer::WidthBucketExpr*>(expr);
382  if (width_bucket_expr) {
383  return getExpressionRange(width_bucket_expr, query_infos, executor, simple_quals);
384  }
386 }
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)
Expression class for string functions The &quot;arg&quot; constructor parameter must be an expression that reso...
Definition: Analyzer.h:1463
static bool typeSupportsRange(const SQLTypeInfo &ti)
static ExpressionRange makeInvalidRange()
RUNTIME_EXPORT ALWAYS_INLINE DEVICE int32_t 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 544 of file ExpressionRange.cpp.

References CHECK, CHECK_EQ, CHECK_GT, dtDAY, extract_max_stat_fp_type(), extract_max_stat_int_type(), extract_min_stat_fp_type(), extract_min_stat_int_type(), 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(), and getExpressionRange().

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

+ 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