OmniSciDB
a5dc49c757
|
Classes | |
class | RexProjectInputRedirector |
class | RexRebindInputsVisitor |
class | RexInputCollector |
class | AvailabilityChecker |
class | RexInputRenumberVisitor |
class | RexInputSinker |
class | SubConditionReplacer |
class | RexInputRedirector |
Functions | |
size_t | get_actual_source_size (const RelProject *curr_project, const std::unordered_set< const RelProject * > &projects_to_remove) |
bool | safe_to_redirect (const RelProject *project, const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> &du_web) |
bool | is_identical_copy (const RelProject *project, const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> &du_web, const std::unordered_set< const RelProject * > &projects_to_remove, std::unordered_set< const RelProject * > &permutating_projects) |
void | propagate_rex_input_renumber (const RelFilter *excluded_root, const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> &du_web) |
void | redirect_inputs_of (std::shared_ptr< RelAlgNode > node, const std::unordered_set< const RelProject * > &projects, const std::unordered_set< const RelProject * > &permutating_projects, const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> &du_web) |
void | cleanup_dead_nodes (std::vector< std::shared_ptr< RelAlgNode >> &nodes) |
std::unordered_set< const RelProject * > | get_visible_projects (const RelAlgNode *root) |
bool | is_distinct (const size_t input_idx, const RelAlgNode *node) |
size_t | pick_always_live_col_idx (const RelAlgNode *node) |
std::vector < std::unordered_set< size_t > > | get_live_ins (const RelAlgNode *node, const std::unordered_map< const RelAlgNode *, std::unordered_set< size_t >> &live_outs) |
bool | any_dead_col_in (const RelAlgNode *node, const std::unordered_set< size_t > &live_outs) |
bool | does_redef_cols (const RelAlgNode *node) |
void | add_new_indices_for (const RelAlgNode *node, std::unordered_map< const RelAlgNode *, std::unordered_map< size_t, size_t >> &new_liveouts, const std::unordered_set< size_t > &old_liveouts, const std::unordered_set< const RelAlgNode * > &intact_nodes, const std::unordered_map< const RelAlgNode *, size_t > &orig_node_sizes) |
std::vector< std::unique_ptr < const RexAgg > > | renumber_rex_aggs (std::vector< std::unique_ptr< const RexAgg >> &agg_exprs, const std::unordered_map< size_t, size_t > &new_numbering) |
SortField | renumber_sort_field (const SortField &old_field, const std::unordered_map< size_t, size_t > &new_numbering) |
std::unordered_map< const RelAlgNode *, std::unordered_set< size_t > > | mark_live_columns (std::vector< std::shared_ptr< RelAlgNode >> &nodes) |
std::string | get_field_name (const RelAlgNode *node, size_t index) |
void | try_insert_coalesceable_proj (std::vector< std::shared_ptr< RelAlgNode >> &nodes, std::unordered_map< const RelAlgNode *, std::unordered_set< size_t >> &liveouts, std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> &du_web) |
std::pair< std::unordered_map < const RelAlgNode *, std::unordered_map< size_t, size_t > >, std::vector< const RelAlgNode * > > | sweep_dead_columns (const std::unordered_map< const RelAlgNode *, std::unordered_set< size_t >> &live_outs, const std::vector< std::shared_ptr< RelAlgNode >> &nodes, const std::unordered_set< const RelAlgNode * > &intact_nodes, const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> &du_web, const std::unordered_map< const RelAlgNode *, size_t > &orig_node_sizes) |
void | propagate_input_renumbering (std::unordered_map< const RelAlgNode *, std::unordered_map< size_t, size_t >> &liveout_renumbering, const std::vector< const RelAlgNode * > &ready_nodes, const std::unordered_map< const RelAlgNode *, std::unordered_set< size_t >> &old_liveouts, const std::unordered_set< const RelAlgNode * > &intact_nodes, const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> &du_web, const std::unordered_map< const RelAlgNode *, size_t > &orig_node_sizes) |
void | replace_all_usages (std::shared_ptr< const RelAlgNode > old_def_node, std::shared_ptr< const RelAlgNode > new_def_node, std::unordered_map< const RelAlgNode *, std::shared_ptr< RelAlgNode >> &deconst_mapping, std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> &du_web) |
void anonymous_namespace{RelAlgOptimizer.cpp}::add_new_indices_for | ( | const RelAlgNode * | node, |
std::unordered_map< const RelAlgNode *, std::unordered_map< size_t, size_t >> & | new_liveouts, | ||
const std::unordered_set< size_t > & | old_liveouts, | ||
const std::unordered_set< const RelAlgNode * > & | intact_nodes, | ||
const std::unordered_map< const RelAlgNode *, size_t > & | orig_node_sizes | ||
) |
Definition at line 798 of file RelAlgOptimizer.cpp.
References CHECK, CHECK_GT, RelRexToStringConfig::defaults(), does_redef_cols(), g_max_log_length, RelAlgNode::getInput(), logger::INFO, RelAlgNode::inputCount(), LOG, RelAlgNode::size(), gpu_enabled::sort(), substring(), and RelAlgNode::toString().
Referenced by propagate_input_renumbering(), and sweep_dead_columns().
bool anonymous_namespace{RelAlgOptimizer.cpp}::any_dead_col_in | ( | const RelAlgNode * | node, |
const std::unordered_set< size_t > & | live_outs | ||
) |
Definition at line 754 of file RelAlgOptimizer.cpp.
References CHECK, and RelAlgNode::size().
Referenced by eliminate_dead_columns(), and try_insert_coalesceable_proj().
void anonymous_namespace{RelAlgOptimizer.cpp}::cleanup_dead_nodes | ( | std::vector< std::shared_ptr< RelAlgNode >> & | nodes | ) |
Definition at line 330 of file RelAlgOptimizer.cpp.
References logger::DEBUG2, RelRexToStringConfig::defaults(), logger::fast_logging_check(), g_max_log_length, substring(), and VLOG.
Referenced by eliminate_identical_copy(), and fold_filters().
bool anonymous_namespace{RelAlgOptimizer.cpp}::does_redef_cols | ( | const RelAlgNode * | node | ) |
Definition at line 769 of file RelAlgOptimizer.cpp.
Referenced by add_new_indices_for(), eliminate_dead_columns(), propagate_input_renumbering(), sweep_dead_columns(), and try_insert_coalesceable_proj().
size_t anonymous_namespace{RelAlgOptimizer.cpp}::get_actual_source_size | ( | const RelProject * | curr_project, |
const std::unordered_set< const RelProject * > & | projects_to_remove | ||
) |
Definition at line 98 of file RelAlgOptimizer.cpp.
References RelAlgNode::getInput(), and RelAlgNode::size().
Referenced by is_identical_copy().
std::string anonymous_namespace{RelAlgOptimizer.cpp}::get_field_name | ( | const RelAlgNode * | node, |
size_t | index | ||
) |
Definition at line 971 of file RelAlgOptimizer.cpp.
References CHECK, CHECK_EQ, CHECK_LT, RelAlgNode::getInput(), join(), and RelAlgNode::size().
Referenced by try_insert_coalesceable_proj().
std::vector<std::unordered_set<size_t> > anonymous_namespace{RelAlgOptimizer.cpp}::get_live_ins | ( | const RelAlgNode * | node, |
const std::unordered_map< const RelAlgNode *, std::unordered_set< size_t >> & | live_outs | ||
) |
Definition at line 631 of file RelAlgOptimizer.cpp.
References CHECK, CHECK_EQ, CHECK_LT, join(), pick_always_live_col_idx(), run_benchmark_import::result, and gpu_enabled::sort().
Referenced by mark_live_columns().
std::unordered_set<const RelProject*> anonymous_namespace{RelAlgOptimizer.cpp}::get_visible_projects | ( | const RelAlgNode * | root | ) |
Definition at line 354 of file RelAlgOptimizer.cpp.
References CHECK, RelRexToStringConfig::defaults(), RelAlgNode::getInput(), join(), and RelAlgNode::toString().
Referenced by eliminate_identical_copy().
bool anonymous_namespace{RelAlgOptimizer.cpp}::is_distinct | ( | const size_t | input_idx, |
const RelAlgNode * | node | ||
) |
Definition at line 387 of file RelAlgOptimizer.cpp.
References CHECK, CHECK_EQ, CHECK_LT, RelAlgNode::getInput(), and RelAlgNode::inputCount().
Referenced by Parser::FunctionRef::analyze(), eliminate_identical_copy(), target_info::get_target_info_impl(), and RelAlgTranslator::translateAggregateRex().
bool anonymous_namespace{RelAlgOptimizer.cpp}::is_identical_copy | ( | const RelProject * | project, |
const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> & | du_web, | ||
const std::unordered_set< const RelProject * > & | projects_to_remove, | ||
std::unordered_set< const RelProject * > & | permutating_projects | ||
) |
Definition at line 130 of file RelAlgOptimizer.cpp.
References CHECK, RelRexToStringConfig::defaults(), get_actual_source_size(), RelProject::getProjectAt(), safe_to_redirect(), and RelProject::size().
Referenced by eliminate_identical_copy().
std::unordered_map<const RelAlgNode*, std::unordered_set<size_t> > anonymous_namespace{RelAlgOptimizer.cpp}::mark_live_columns | ( | std::vector< std::shared_ptr< RelAlgNode >> & | nodes | ) |
Definition at line 917 of file RelAlgOptimizer.cpp.
References CHECK, CHECK_EQ, get_live_ins(), and gpu_enabled::iota().
Referenced by eliminate_dead_columns(), and sink_projected_boolean_expr_to_join().
size_t anonymous_namespace{RelAlgOptimizer.cpp}::pick_always_live_col_idx | ( | const RelAlgNode * | node | ) |
Definition at line 602 of file RelAlgOptimizer.cpp.
References CHECK, join(), RelAlgNode::size(), and gpu_enabled::sort().
Referenced by get_live_ins().
void anonymous_namespace{RelAlgOptimizer.cpp}::propagate_input_renumbering | ( | std::unordered_map< const RelAlgNode *, std::unordered_map< size_t, size_t >> & | liveout_renumbering, |
const std::vector< const RelAlgNode * > & | ready_nodes, | ||
const std::unordered_map< const RelAlgNode *, std::unordered_set< size_t >> & | old_liveouts, | ||
const std::unordered_set< const RelAlgNode * > & | intact_nodes, | ||
const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> & | du_web, | ||
const std::unordered_map< const RelAlgNode *, size_t > & | orig_node_sizes | ||
) |
Definition at line 1116 of file RelAlgOptimizer.cpp.
References add_new_indices_for(), CHECK, RelRexToStringConfig::defaults(), does_redef_cols(), logger::FATAL, anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::hasAllSrcReady(), join(), LOG, renumber_rex_aggs(), renumber_sort_field(), gpu_enabled::sort(), and RexVisitorBase< T >::visit().
Referenced by eliminate_dead_columns().
void anonymous_namespace{RelAlgOptimizer.cpp}::propagate_rex_input_renumber | ( | const RelFilter * | excluded_root, |
const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> & | du_web | ||
) |
Definition at line 191 of file RelAlgOptimizer.cpp.
References CHECK, and RelAlgNode::getInput().
Referenced by redirect_inputs_of().
void anonymous_namespace{RelAlgOptimizer.cpp}::redirect_inputs_of | ( | std::shared_ptr< RelAlgNode > | node, |
const std::unordered_set< const RelProject * > & | projects, | ||
const std::unordered_set< const RelProject * > & | permutating_projects, | ||
const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> & | du_web | ||
) |
Definition at line 241 of file RelAlgOptimizer.cpp.
References CHECK, join(), propagate_rex_input_renumber(), RexVisitorBase< T >::visit(), and anonymous_namespace{RelAlgOptimizer.cpp}::RexRebindInputsVisitor::visitNode().
Referenced by eliminate_identical_copy().
std::vector<std::unique_ptr<const RexAgg> > anonymous_namespace{RelAlgOptimizer.cpp}::renumber_rex_aggs | ( | std::vector< std::unique_ptr< const RexAgg >> & | agg_exprs, |
const std::unordered_map< size_t, size_t > & | new_numbering | ||
) |
Definition at line 883 of file RelAlgOptimizer.cpp.
Referenced by propagate_input_renumbering().
SortField anonymous_namespace{RelAlgOptimizer.cpp}::renumber_sort_field | ( | const SortField & | old_field, |
const std::unordered_map< size_t, size_t > & | new_numbering | ||
) |
Definition at line 907 of file RelAlgOptimizer.cpp.
References SortField::getField(), SortField::getNullsPosition(), and SortField::getSortDir().
Referenced by propagate_input_renumbering().
void anonymous_namespace{RelAlgOptimizer.cpp}::replace_all_usages | ( | std::shared_ptr< const RelAlgNode > | old_def_node, |
std::shared_ptr< const RelAlgNode > | new_def_node, | ||
std::unordered_map< const RelAlgNode *, std::shared_ptr< RelAlgNode >> & | deconst_mapping, | ||
std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> & | du_web | ||
) |
Definition at line 1446 of file RelAlgOptimizer.cpp.
References CHECK.
Referenced by fold_filters().
bool anonymous_namespace{RelAlgOptimizer.cpp}::safe_to_redirect | ( | const RelProject * | project, |
const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> & | du_web | ||
) |
Definition at line 113 of file RelAlgOptimizer.cpp.
References CHECK, and RelProject::isSimple().
Referenced by is_identical_copy().
std::pair<std::unordered_map<const RelAlgNode*, std::unordered_map<size_t, size_t> >, std::vector<const RelAlgNode*> > anonymous_namespace{RelAlgOptimizer.cpp}::sweep_dead_columns | ( | const std::unordered_map< const RelAlgNode *, std::unordered_set< size_t >> & | live_outs, |
const std::vector< std::shared_ptr< RelAlgNode >> & | nodes, | ||
const std::unordered_set< const RelAlgNode * > & | intact_nodes, | ||
const std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> & | du_web, | ||
const std::unordered_map< const RelAlgNode *, size_t > & | orig_node_sizes | ||
) |
Definition at line 1053 of file RelAlgOptimizer.cpp.
References add_new_indices_for(), CHECK, does_redef_cols(), and anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::hasAllSrcReady().
Referenced by eliminate_dead_columns().
void anonymous_namespace{RelAlgOptimizer.cpp}::try_insert_coalesceable_proj | ( | std::vector< std::shared_ptr< RelAlgNode >> & | nodes, |
std::unordered_map< const RelAlgNode *, std::unordered_set< size_t >> & | liveouts, | ||
std::unordered_map< const RelAlgNode *, std::unordered_set< const RelAlgNode * >> & | du_web | ||
) |
Definition at line 994 of file RelAlgOptimizer.cpp.
References any_dead_col_in(), CHECK, does_redef_cols(), get_field_name(), RelAlgNode::replaceInput(), and anonymous_namespace{RelAlgOptimizer.cpp}::RexRebindInputsVisitor::visitNode().
Referenced by eliminate_dead_columns().