OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FilterSelectivity Struct Reference

#include <JoinFilterPushDown.h>

Public Member Functions

size_t getRowsPassingUpperBound () const
bool isFilterSelectiveEnough () const

Public Attributes

const bool is_valid
const float fraction_passing
const size_t total_rows_upper_bound

Static Public Attributes

static constexpr float kFractionPassingLowThreshold = 0.1
static constexpr float kFractionPassingHighThreshold = 0.5
static constexpr size_t kRowsPassingUpperBoundThreshold = 4000000

Detailed Description

Statistics stored for filters with respect to a table, so that selective filters can be pushed down in join operations.

Definition at line 49 of file JoinFilterPushDown.h.

Member Function Documentation

size_t FilterSelectivity::getRowsPassingUpperBound ( ) const

Definition at line 54 of file JoinFilterPushDown.h.

References fraction_passing, and total_rows_upper_bound.

Referenced by isFilterSelectiveEnough().

54  {
56  }
const size_t total_rows_upper_bound
const float fraction_passing

+ Here is the caller graph for this function:

bool FilterSelectivity::isFilterSelectiveEnough ( ) const

Definition at line 57 of file JoinFilterPushDown.h.

References f, fraction_passing, g_filter_push_down_high_frac, g_filter_push_down_low_frac, g_filter_push_down_passing_row_ubound, getRowsPassingUpperBound(), kFractionPassingHighThreshold, kFractionPassingLowThreshold, and kRowsPassingUpperBoundThreshold.

57  {
58  auto low_frac_threshold = (g_filter_push_down_low_frac >= 0.0)
59  ? std::min(g_filter_push_down_low_frac, 1.0f)
61  auto high_frac_threshold = (g_filter_push_down_high_frac >= 0.0)
62  ? std::min(g_filter_push_down_high_frac, 1.0f)
64  auto rows_ubound_threshold = (g_filter_push_down_passing_row_ubound > 0)
67  return (fraction_passing < low_frac_threshold ||
68  (fraction_passing < high_frac_threshold &&
69  getRowsPassingUpperBound() < rows_ubound_threshold));
70  }
static constexpr float kFractionPassingHighThreshold
float g_filter_push_down_low_frac
Definition: Execute.cpp:90
size_t g_filter_push_down_passing_row_ubound
Definition: Execute.cpp:92
size_t getRowsPassingUpperBound() const
float g_filter_push_down_high_frac
Definition: Execute.cpp:91
const float fraction_passing
static constexpr float kFractionPassingLowThreshold
char * f
static constexpr size_t kRowsPassingUpperBoundThreshold

+ Here is the call graph for this function:

Member Data Documentation

const float FilterSelectivity::fraction_passing

Definition at line 51 of file JoinFilterPushDown.h.

Referenced by getRowsPassingUpperBound(), and isFilterSelectiveEnough().

const bool FilterSelectivity::is_valid

Definition at line 50 of file JoinFilterPushDown.h.

constexpr float FilterSelectivity::kFractionPassingHighThreshold = 0.5

Definition at line 73 of file JoinFilterPushDown.h.

Referenced by isFilterSelectiveEnough().

constexpr float FilterSelectivity::kFractionPassingLowThreshold = 0.1

Definition at line 72 of file JoinFilterPushDown.h.

Referenced by isFilterSelectiveEnough().

constexpr size_t FilterSelectivity::kRowsPassingUpperBoundThreshold = 4000000

Definition at line 74 of file JoinFilterPushDown.h.

Referenced by isFilterSelectiveEnough().

const size_t FilterSelectivity::total_rows_upper_bound

Definition at line 52 of file JoinFilterPushDown.h.

Referenced by getRowsPassingUpperBound().

The documentation for this struct was generated from the following file: