OmniSciDB
a5dc49c757
|
#include "../Analyzer/Analyzer.h"
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/optional.hpp>
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 > | |
T | getMin (const ExpressionRange &other) |
template<typename T > | |
T | getMax (const ExpressionRange &other) |
template<typename T > | |
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) |
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 40 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 30 of file ExpressionRange.h.
|
strong |
Enumerator | |
---|---|
Invalid | |
Integer | |
Float | |
Double | |
Null |
Definition at line 42 of file ExpressionRange.h.
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().
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().
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().
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::getColumnKey(), and ExpressionRange::getType().
Referenced by getExpressionRange().
|
inlinenoexcept |
Definition at line 283 of file ExpressionRange.h.
References kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, and UNREACHABLE.
|
inlinenoexcept |
Definition at line 283 of file ExpressionRange.h.
References kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, and UNREACHABLE.
|
inlinenoexcept |
Definition at line 312 of file ExpressionRange.h.
References kDOUBLE, kFLOAT, and UNREACHABLE.
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 334 of file ExpressionRange.cpp.
References Analyzer::Expr::get_type_info(), getExpressionRange(), ExpressionRange::makeInvalidRange(), and ExpressionRange::typeSupportsRange().
ExpressionRange getLeafColumnRange | ( | const Analyzer::ColumnVar * | , |
const std::vector< InputTableInfo > & | , | ||
const Executor * | , | ||
const bool | is_outer_join_proj | ||
) |
Definition at line 521 of file ExpressionRange.cpp.
References CHECK, CHECK_EQ, CHECK_GT, shared::ColumnKey::column_id, dtDAY, extract_max_stat_fp_type(), extract_max_stat_int_type(), extract_min_stat_fp_type(), extract_min_stat_int_type(), FIND_STAT_FRAG, anonymous_namespace{ExpressionRange.cpp}::get_conservative_datetrunc_bucket(), SQLTypeInfo::get_elem_type(), get_logical_type_info(), Analyzer::Expr::get_type_info(), Analyzer::ColumnVar::getColumnKey(), Analyzer::ColumnVar::getTableKey(), 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().
T getMax | ( | const ExpressionRange & | other | ) |
|
inline |
Definition at line 278 of file ExpressionRange.h.
|
inline |
Definition at line 273 of file ExpressionRange.h.
|
inline |
Definition at line 268 of file ExpressionRange.h.
T getMin | ( | const ExpressionRange & | other | ) |
Referenced by org.apache.calcite.sql.validate.SqlValidatorImpl::handleUnresolvedFunction().
|
inline |
Definition at line 263 of file ExpressionRange.h.
|
inline |
Definition at line 258 of file ExpressionRange.h.
|
inline |
Definition at line 253 of file ExpressionRange.h.