OmniSciDB  5ade3759e0
FilterSelectivity Struct Reference

#include <JoinFilterPushDown.h>

+ Collaboration diagram for FilterSelectivity:

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 50 of file JoinFilterPushDown.h.

Member Function Documentation

◆ getRowsPassingUpperBound()

size_t FilterSelectivity::getRowsPassingUpperBound ( ) const
inline

Definition at line 55 of file JoinFilterPushDown.h.

55  {
57  }
const size_t total_rows_upper_bound
const float fraction_passing

◆ isFilterSelectiveEnough()

bool FilterSelectivity::isFilterSelectiveEnough ( ) const
inline

Definition at line 58 of file JoinFilterPushDown.h.

References g_filter_push_down_high_frac, g_filter_push_down_low_frac, and g_filter_push_down_passing_row_ubound.

58  {
59  auto low_frac_threshold = (g_filter_push_down_low_frac >= 0.0)
60  ? std::min(g_filter_push_down_low_frac, 1.0f)
62  auto high_frac_threshold = (g_filter_push_down_high_frac >= 0.0)
63  ? std::min(g_filter_push_down_high_frac, 1.0f)
65  auto rows_ubound_threshold = (g_filter_push_down_passing_row_ubound > 0)
68  return (fraction_passing < low_frac_threshold ||
69  (fraction_passing < high_frac_threshold &&
70  getRowsPassingUpperBound() < rows_ubound_threshold));
71  }
static constexpr float kFractionPassingHighThreshold
float g_filter_push_down_high_frac
Definition: Execute.cpp:82
float g_filter_push_down_low_frac
Definition: Execute.cpp:81
size_t getRowsPassingUpperBound() const
const float fraction_passing
size_t g_filter_push_down_passing_row_ubound
Definition: Execute.cpp:83
static constexpr float kFractionPassingLowThreshold
static constexpr size_t kRowsPassingUpperBoundThreshold

Member Data Documentation

◆ fraction_passing

const float FilterSelectivity::fraction_passing

Definition at line 52 of file JoinFilterPushDown.h.

◆ is_valid

const bool FilterSelectivity::is_valid

Definition at line 51 of file JoinFilterPushDown.h.

◆ kFractionPassingHighThreshold

constexpr float FilterSelectivity::kFractionPassingHighThreshold = 0.5
static

Definition at line 74 of file JoinFilterPushDown.h.

◆ kFractionPassingLowThreshold

constexpr float FilterSelectivity::kFractionPassingLowThreshold = 0.1
static

Definition at line 73 of file JoinFilterPushDown.h.

◆ kRowsPassingUpperBoundThreshold

constexpr size_t FilterSelectivity::kRowsPassingUpperBoundThreshold = 4000000
static

Definition at line 75 of file JoinFilterPushDown.h.

◆ total_rows_upper_bound

const size_t FilterSelectivity::total_rows_upper_bound

Definition at line 53 of file JoinFilterPushDown.h.


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