OmniSciDB
a5dc49c757
|
Namespaces | |
anonymous_namespace{RelAlgDag.cpp} | |
Classes | |
class | RexRebindInputsVisitor |
class | RexRebindReindexInputsVisitor |
class | PushDownGenericExpressionInWindowFunction |
class | RANodeIterator |
class | WindowFunctionCollector |
class | RexWindowFuncReplacementVisitor |
class | RexInputCollector |
Typedefs | |
using | RexInputSet = std::unordered_set< RexInput > |
Functions | |
std::vector< RexInput > | n_outputs (const RelAlgNode *node, const size_t n) |
bool | isRenamedInput (const RelAlgNode *node, const size_t index, const std::string &new_name) |
std::vector< std::unique_ptr < const RexAgg > > | copyAggExprs (std::vector< std::unique_ptr< const RexAgg >> const &agg_exprs) |
std::vector< std::unique_ptr < const RexScalar > > | copyRexScalars (std::vector< std::unique_ptr< const RexScalar >> const &scalar_sources) |
std::vector< const Rex * > | remapTargetPointers (std::vector< std::unique_ptr< const RexAgg >> const &agg_exprs_new, std::vector< std::unique_ptr< const RexScalar >> const &scalar_sources_new, std::vector< std::unique_ptr< const RexAgg >> const &agg_exprs_old, std::vector< std::unique_ptr< const RexScalar >> const &scalar_sources_old, std::vector< const Rex * > const &target_exprs_old) |
void | reset_table_function_inputs (std::vector< const Rex * > &column_inputs, const std::vector< std::unique_ptr< const RexScalar >> &old_table_func_inputs, const std::vector< std::unique_ptr< const RexScalar >> &new_table_func_inputs) |
std::set< std::pair< const RelAlgNode *, int > > | get_equiv_cols (const RelAlgNode *node, const size_t which_col) |
std::vector< bool > | get_notnulls (std::vector< TargetMetaInfo > const &tmis0) |
bool | same_ignoring_notnull (SQLTypeInfo ti0, SQLTypeInfo ti1) |
void | set_notnulls (std::vector< TargetMetaInfo > *tmis0, std::vector< bool > const ¬nulls) |
unsigned | node_id (const rapidjson::Value &ra_node) noexcept |
std::string | json_node_to_string (const rapidjson::Value &node) noexcept |
std::unique_ptr< RexAbstractInput > | parse_abstract_input (const rapidjson::Value &expr) noexcept |
std::unique_ptr< RexLiteral > | parse_literal (const rapidjson::Value &expr) |
std::unique_ptr< const RexScalar > | parse_scalar_expr (const rapidjson::Value &expr, RelAlgDag &root_dag) |
SQLTypeInfo | parse_type (const rapidjson::Value &type_obj) |
std::vector< std::unique_ptr < const RexScalar > > | parse_expr_array (const rapidjson::Value &arr, RelAlgDag &root_dag) |
SqlWindowFunctionKind | parse_window_function_kind (const std::string &name) |
std::vector< std::unique_ptr < const RexScalar > > | parse_window_order_exprs (const rapidjson::Value &arr, RelAlgDag &root_dag) |
SortDirection | parse_sort_direction (const rapidjson::Value &collation) |
NullSortedPosition | parse_nulls_position (const rapidjson::Value &collation) |
std::vector< SortField > | parse_window_order_collation (const rapidjson::Value &arr, RelAlgDag &root_dag) |
RexWindowFunctionOperator::RexWindowBound | parse_window_bound (const rapidjson::Value &window_bound_obj, RelAlgDag &root_dag) |
std::unique_ptr< const RexSubQuery > | parse_subquery (const rapidjson::Value &expr, RelAlgDag &root_dag) |
std::unique_ptr< RexOperator > | parse_operator (const rapidjson::Value &expr, RelAlgDag &root_dag) |
std::unique_ptr< RexCase > | parse_case (const rapidjson::Value &expr, RelAlgDag &root_dag) |
std::vector< std::string > | strings_from_json_array (const rapidjson::Value &json_str_arr) noexcept |
std::vector< size_t > | indices_from_json_array (const rapidjson::Value &json_idx_arr) noexcept |
std::unique_ptr< const RexAgg > | parse_aggregate_expr (const rapidjson::Value &expr) |
JoinType | to_join_type (const std::string &join_type_name) |
std::unique_ptr< const RexScalar > | disambiguate_rex (const RexScalar *, const RANodeOutput &) |
std::unique_ptr< const RexOperator > | disambiguate_operator (const RexOperator *rex_operator, const RANodeOutput &ra_output) noexcept |
std::unique_ptr< const RexCase > | disambiguate_case (const RexCase *rex_case, const RANodeOutput &ra_output) |
void | bind_project_to_input (RelProject *project_node, const RANodeOutput &input) noexcept |
void | bind_table_func_to_input (RelTableFunction *table_func_node, const RANodeOutput &input) noexcept |
void | bind_inputs (const std::vector< std::shared_ptr< RelAlgNode >> &nodes) noexcept |
void | handle_query_hint (const std::vector< std::shared_ptr< RelAlgNode >> &nodes, RelAlgDag &rel_alg_dag) noexcept |
void | compute_node_hash (const std::vector< std::shared_ptr< RelAlgNode >> &nodes) |
void | mark_nops (const std::vector< std::shared_ptr< RelAlgNode >> &nodes) noexcept |
void | create_compound (std::vector< std::shared_ptr< RelAlgNode >> &nodes, const std::vector< size_t > &pattern, std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> &query_hints) noexcept |
void | coalesce_nodes (std::vector< std::shared_ptr< RelAlgNode >> &nodes, const std::vector< const RelAlgNode * > &left_deep_joins, std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> &query_hints) |
void | handle_agg_over_join (std::vector< std::shared_ptr< RelAlgNode >> &nodes, std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> &query_hints) |
void | eliminate_redundant_projection (std::vector< std::shared_ptr< RelAlgNode >> &nodes) |
void | propagate_hints_to_new_project (std::shared_ptr< RelProject > prev_node, std::shared_ptr< RelProject > new_node, std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> &query_hints) |
void | separate_window_function_expressions (std::vector< std::shared_ptr< RelAlgNode >> &nodes, std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> &query_hints) |
void | add_window_function_pre_project (std::vector< std::shared_ptr< RelAlgNode >> &nodes, const bool always_add_project_if_first_project_is_window_expr, std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> &query_hints) |
int64_t | get_int_literal_field (const rapidjson::Value &obj, const char field[], const int64_t default_val) noexcept |
void | check_empty_inputs_field (const rapidjson::Value &node) noexcept |
const std::pair< const Catalog_Namespace::Catalog *, const TableDescriptor * > | getCatalogAndTableFromScanNode (const rapidjson::Value &scan_ra) |
std::vector< std::string > | getFieldNamesFromScanNode (const rapidjson::Value &scan_ra) |
Variables | |
const unsigned | FIRST_RA_NODE_ID = 1 |
using anonymous_namespace{RelAlgDag.cpp}::RexInputSet = typedef std::unordered_set<RexInput> |
Definition at line 2573 of file RelAlgDag.cpp.
void anonymous_namespace{RelAlgDag.cpp}::add_window_function_pre_project | ( | std::vector< std::shared_ptr< RelAlgNode >> & | nodes, |
const bool | always_add_project_if_first_project_is_window_expr, | ||
std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> & | query_hints | ||
) |
Inserts a simple project before any project containing a window function node. Forces all window function inputs into a single contiguous buffer for centralized processing (e.g. in distributed mode). This is also needed when a window function node is preceded by a filter node, both for correctness (otherwise a window operator will be coalesced with its preceding filter node and be computer over unfiltered results, and for performance, as currently filter nodes that are not coalesced into projects keep all columns from the table as inputs, and hence bring everything in memory. Once the new project has been created, the inputs in the window function project must be rewritten to read from the new project, and to index off the projected exprs in the new project.
Definition at line 2653 of file RelAlgDag.cpp.
References anonymous_namespace{Utm.h}::a, CHECK, CHECK_EQ, CHECK_GT, RelAggregate::getGroupByCount(), kBOOLEAN, anonymous_namespace{RelAlgDag.cpp}::anonymous_namespace{RelAlgDag.cpp}::need_pushdown_generic_expr(), propagate_hints_to_new_project(), gpu_enabled::sort(), and VLOG.
Referenced by RelAlgDagBuilder::optimizeDag().
|
noexcept |
Definition at line 1532 of file RelAlgDag.cpp.
References bind_project_to_input(), bind_table_func_to_input(), CHECK_EQ, disambiguate_rex(), and get_node_output().
Referenced by RelAlgDagBuilder::build().
|
noexcept |
Definition at line 1504 of file RelAlgDag.cpp.
References CHECK_EQ, and disambiguate_rex().
Referenced by bind_inputs(), and create_compound().
|
noexcept |
Definition at line 1518 of file RelAlgDag.cpp.
References disambiguate_rex().
Referenced by bind_inputs().
|
noexcept |
Definition at line 2855 of file RelAlgDag.cpp.
References CHECK, and field().
Referenced by details::RelAlgDispatcher::dispatchTableScan().
void anonymous_namespace{RelAlgDag.cpp}::coalesce_nodes | ( | std::vector< std::shared_ptr< RelAlgNode >> & | nodes, |
const std::vector< const RelAlgNode * > & | left_deep_joins, | ||
std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> & | query_hints | ||
) |
Definition at line 2011 of file RelAlgDag.cpp.
References anonymous_namespace{RelAlgDag.cpp}::RANodeIterator::allVisited(), CHECK, CHECK_GE, create_compound(), anonymous_namespace{RelAlgDag.cpp}::anonymous_namespace{RelAlgDag.cpp}::input_can_be_coalesced(), and gpu_enabled::swap().
Referenced by RelAlgDagBuilder::optimizeDag().
void anonymous_namespace{RelAlgDag.cpp}::compute_node_hash | ( | const std::vector< std::shared_ptr< RelAlgNode >> & | nodes | ) |
Definition at line 1611 of file RelAlgDag.cpp.
References CHECK_NE.
Referenced by RelAlgDagBuilder::optimizeDag().
std::vector<std::unique_ptr<const RexAgg> > anonymous_namespace{RelAlgDag.cpp}::copyAggExprs | ( | std::vector< std::unique_ptr< const RexAgg >> const & | agg_exprs | ) |
Definition at line 617 of file RelAlgDag.cpp.
std::vector<std::unique_ptr<const RexScalar> > anonymous_namespace{RelAlgDag.cpp}::copyRexScalars | ( | std::vector< std::unique_ptr< const RexScalar >> const & | scalar_sources | ) |
Definition at line 627 of file RelAlgDag.cpp.
References RexVisitorBase< T >::visit().
|
noexcept |
Definition at line 1685 of file RelAlgDag.cpp.
References bind_project_to_input(), CHECK, CHECK_EQ, CHECK_GE, CHECK_LE, CHECK_LT, RegisteredQueryHint::defaults(), get_node_output(), RelProject::getFields(), anonymous_namespace{RelAlgExecutor.cpp}::is_agg(), node_id(), anonymous_namespace{RelAlgDag.cpp}::anonymous_namespace{RelAlgDag.cpp}::reproject_targets(), and run_benchmark_import::result.
Referenced by coalesce_nodes().
std::unique_ptr<const RexCase> anonymous_namespace{RelAlgDag.cpp}::disambiguate_case | ( | const RexCase * | rex_case, |
const RANodeOutput & | ra_output | ||
) |
Definition at line 1457 of file RelAlgDag.cpp.
References RexCase::branchCount(), disambiguate_rex(), RexCase::getElse(), RexCase::getThen(), and RexCase::getWhen().
Referenced by disambiguate_rex().
|
noexcept |
Definition at line 1422 of file RelAlgDag.cpp.
References disambiguate_rex(), and RexWindowFunctionOperator::getPartitionKeys().
Referenced by disambiguate_rex().
std::unique_ptr< const RexScalar > anonymous_namespace{RelAlgDag.cpp}::disambiguate_rex | ( | const RexScalar * | rex_scalar, |
const RANodeOutput & | ra_output | ||
) |
Definition at line 1478 of file RelAlgDag.cpp.
References CHECK_LT, disambiguate_case(), and disambiguate_operator().
Referenced by bind_inputs(), bind_project_to_input(), bind_table_func_to_input(), disambiguate_case(), and disambiguate_operator().
void anonymous_namespace{RelAlgDag.cpp}::eliminate_redundant_projection | ( | std::vector< std::shared_ptr< RelAlgNode >> & | nodes | ) |
Definition at line 2174 of file RelAlgDag.cpp.
References CHECK_EQ, and RexVisitorBase< T >::visit().
Referenced by RelAlgDagBuilder::optimizeDag().
std::set<std::pair<const RelAlgNode*, int> > anonymous_namespace{RelAlgDag.cpp}::get_equiv_cols | ( | const RelAlgNode * | node, |
const size_t | which_col | ||
) |
Definition at line 764 of file RelAlgDag.cpp.
References CHECK, and CHECK_EQ.
Referenced by RelSort::hasEquivCollationOf().
|
noexcept |
Definition at line 2841 of file RelAlgDag.cpp.
References CHECK_EQ, field(), kDECIMAL, and parse_literal().
Referenced by details::RelAlgDispatcher::dispatchSort().
std::vector<bool> anonymous_namespace{RelAlgDag.cpp}::get_notnulls | ( | std::vector< TargetMetaInfo > const & | tmis0 | ) |
Definition at line 882 of file RelAlgDag.cpp.
Referenced by RelLogicalUnion::getCompatibleMetainfoTypes().
const std::pair<const Catalog_Namespace::Catalog*, const TableDescriptor*> anonymous_namespace{RelAlgDag.cpp}::getCatalogAndTableFromScanNode | ( | const rapidjson::Value & | scan_ra | ) |
Definition at line 2861 of file RelAlgDag.cpp.
References cat(), CHECK, CHECK_EQ, field(), Catalog_Namespace::SysCatalog::getCatalog(), and Catalog_Namespace::SysCatalog::instance().
Referenced by details::RelAlgDispatcher::dispatchModify(), and details::RelAlgDispatcher::dispatchTableScan().
std::vector<std::string> anonymous_namespace{RelAlgDag.cpp}::getFieldNamesFromScanNode | ( | const rapidjson::Value & | scan_ra | ) |
Definition at line 2873 of file RelAlgDag.cpp.
References field(), and strings_from_json_array().
Referenced by details::RelAlgDispatcher::dispatchTableScan().
void anonymous_namespace{RelAlgDag.cpp}::handle_agg_over_join | ( | std::vector< std::shared_ptr< RelAlgNode >> & | nodes, |
std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> & | query_hints | ||
) |
Definition at line 2138 of file RelAlgDag.cpp.
References CHECK, CHECK_EQ, CHECK_NE, and anonymous_namespace{RelAlgDag.cpp}::anonymous_namespace{RelAlgDag.cpp}::create_rex_input_for_new_project_node().
Referenced by RelAlgDagBuilder::optimizeDag().
|
noexcept |
Definition at line 1573 of file RelAlgDag.cpp.
References RelProject::getDeliveredHints(), RelAggregate::getDeliveredHints(), and RelCompound::getDeliveredHints().
Referenced by RelAlgExecutor::executeRelAlgStep(), and RelAlgDagBuilder::optimizeDag().
|
noexcept |
Definition at line 1348 of file RelAlgDag.cpp.
References CHECK, and CHECK_GE.
Referenced by details::RelAlgDispatcher::dispatchAggregate(), and parse_aggregate_expr().
bool anonymous_namespace{RelAlgDag.cpp}::isRenamedInput | ( | const RelAlgNode * | node, |
const size_t | index, | ||
const std::string & | new_name | ||
) |
Definition at line 470 of file RelAlgDag.cpp.
References CHECK, CHECK_EQ, CHECK_GE, CHECK_LT, RelAlgNode::getInput(), join(), and RelAlgNode::size().
Referenced by RelProject::isRenaming().
|
noexcept |
Definition at line 978 of file RelAlgDag.cpp.
Referenced by details::RelAlgDispatcher::dispatchModify(), parse_scalar_expr(), and parse_type().
|
noexcept |
Definition at line 1625 of file RelAlgDag.cpp.
References CHECK_EQ, and RelAlgNode::markAsNop().
Referenced by RelAlgDagBuilder::optimizeDag().
std::vector<RexInput> anonymous_namespace{RelAlgDag.cpp}::n_outputs | ( | const RelAlgNode * | node, |
const size_t | n | ||
) |
Definition at line 96 of file RelAlgDag.cpp.
References anonymous_namespace{Utm.h}::n.
Referenced by get_node_output().
|
noexcept |
Definition at line 973 of file RelAlgDag.cpp.
References field(), and json_str().
Referenced by create_compound(), details::RelAlgDispatcher::dispatchFilter(), RaExecutionSequence::extractQueryStepSkippingInfo(), QueryPlanDagExtractor::handleTranslatedJoin(), details::RelAlgDispatcher::prev(), and details::RelAlgDispatcher::run().
|
noexcept |
Definition at line 989 of file RelAlgDag.cpp.
References field(), and json_i64().
Referenced by parse_scalar_expr().
std::unique_ptr<const RexAgg> anonymous_namespace{RelAlgDag.cpp}::parse_aggregate_expr | ( | const rapidjson::Value & | expr | ) |
Definition at line 1361 of file RelAlgDag.cpp.
References field(), indices_from_json_array(), logger::INFO, json_bool(), json_str(), LOG, parse_type(), and to_agg_kind().
Referenced by details::RelAlgDispatcher::dispatchAggregate().
std::unique_ptr<RexCase> anonymous_namespace{RelAlgDag.cpp}::parse_case | ( | const rapidjson::Value & | expr, |
RelAlgDag & | root_dag | ||
) |
Definition at line 1316 of file RelAlgDag.cpp.
References CHECK, CHECK_GE, field(), and parse_scalar_expr().
Referenced by parse_scalar_expr().
std::vector<std::unique_ptr<const RexScalar> > anonymous_namespace{RelAlgDag.cpp}::parse_expr_array | ( | const rapidjson::Value & | arr, |
RelAlgDag & | root_dag | ||
) |
Definition at line 1099 of file RelAlgDag.cpp.
References parse_scalar_expr().
Referenced by parse_operator().
std::unique_ptr<RexLiteral> anonymous_namespace{RelAlgDag.cpp}::parse_literal | ( | const rapidjson::Value & | expr | ) |
Definition at line 995 of file RelAlgDag.cpp.
References CHECK, field(), json_bool(), json_double(), json_i64(), json_str(), kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kNULLT, kTEXT, kTIME, kTIMESTAMP, to_sql_type(), run_benchmark_import::type, and UNREACHABLE.
Referenced by details::RelAlgDispatcher::dispatchLogicalValues(), get_int_literal_field(), and parse_scalar_expr().
NullSortedPosition anonymous_namespace{RelAlgDag.cpp}::parse_nulls_position | ( | const rapidjson::Value & | collation | ) |
Definition at line 1210 of file RelAlgDag.cpp.
References field(), First, json_str(), and Last.
Referenced by details::RelAlgDispatcher::dispatchSort(), and parse_window_order_collation().
std::unique_ptr<RexOperator> anonymous_namespace{RelAlgDag.cpp}::parse_operator | ( | const rapidjson::Value & | expr, |
RelAlgDag & | root_dag | ||
) |
Definition at line 1274 of file RelAlgDag.cpp.
References CHECK, field(), json_bool(), json_str(), kFUNCTION, kIN, gpu_enabled::lower_bound(), parse_expr_array(), parse_subquery(), parse_type(), parse_window_bound(), parse_window_function_kind(), parse_window_order_collation(), parse_window_order_exprs(), to_sql_op(), and gpu_enabled::upper_bound().
Referenced by parse_scalar_expr().
std::unique_ptr< const RexScalar > anonymous_namespace{RelAlgDag.cpp}::parse_scalar_expr | ( | const rapidjson::Value & | expr, |
RelAlgDag & | root_dag | ||
) |
Definition at line 1378 of file RelAlgDag.cpp.
References CHECK, field(), json_node_to_string(), json_str(), parse_abstract_input(), parse_case(), parse_literal(), parse_operator(), and parse_subquery().
Referenced by details::RelAlgDispatcher::dispatchFilter(), details::RelAlgDispatcher::dispatchJoin(), details::RelAlgDispatcher::dispatchProject(), details::RelAlgDispatcher::dispatchTableFunction(), parse_case(), parse_expr_array(), parse_window_bound(), and parse_window_order_exprs().
SortDirection anonymous_namespace{RelAlgDag.cpp}::parse_sort_direction | ( | const rapidjson::Value & | collation | ) |
Definition at line 1204 of file RelAlgDag.cpp.
References Ascending, Descending, field(), and json_str().
Referenced by details::RelAlgDispatcher::dispatchSort(), and parse_window_order_collation().
std::unique_ptr<const RexSubQuery> anonymous_namespace{RelAlgDag.cpp}::parse_subquery | ( | const rapidjson::Value & | expr, |
RelAlgDag & | root_dag | ||
) |
Definition at line 1247 of file RelAlgDag.cpp.
References RelAlgDagBuilder::buildDagForSubquery(), CHECK, CHECK_GE, field(), RelAlgDag::getGlobalHints(), RelAlgDag::registerQueryHint(), RelAlgDag::registerSubquery(), and RelAlgDag::setGlobalQueryHints().
Referenced by parse_operator(), and parse_scalar_expr().
SQLTypeInfo anonymous_namespace{RelAlgDag.cpp}::parse_type | ( | const rapidjson::Value & | type_obj | ) |
Definition at line 1080 of file RelAlgDag.cpp.
References CHECK, field(), json_bool(), json_i64(), json_node_to_string(), json_str(), SQLTypeInfo::set_precision(), SQLTypeInfo::set_scale(), to_sql_type(), and run_benchmark_import::type.
Referenced by details::RelAlgDispatcher::dispatchLogicalValues(), parse_aggregate_expr(), and parse_operator().
RexWindowFunctionOperator::RexWindowBound anonymous_namespace{RelAlgDag.cpp}::parse_window_bound | ( | const rapidjson::Value & | window_bound_obj, |
RelAlgDag & | root_dag | ||
) |
Definition at line 1228 of file RelAlgDag.cpp.
References CHECK, field(), json_bool(), json_i64(), parse_scalar_expr(), and RexWindowFunctionOperator::RexWindowBound::unbounded.
Referenced by parse_operator().
SqlWindowFunctionKind anonymous_namespace{RelAlgDag.cpp}::parse_window_function_kind | ( | const std::string & | name | ) |
Definition at line 1109 of file RelAlgDag.cpp.
References AVG, BACKWARD_FILL, CONDITIONAL_CHANGE_EVENT, COUNT, COUNT_IF, CUME_DIST, DENSE_RANK, FIRST_VALUE, FIRST_VALUE_IN_FRAME, FORWARD_FILL, LAG, LAG_IN_FRAME, LAST_VALUE, LAST_VALUE_IN_FRAME, LEAD, LEAD_IN_FRAME, MAX, MIN, NTH_VALUE, NTH_VALUE_IN_FRAME, NTILE, PERCENT_RANK, RANK, ROW_NUMBER, SUM, SUM_IF, and SUM_INTERNAL.
Referenced by parse_operator().
std::vector<SortField> anonymous_namespace{RelAlgDag.cpp}::parse_window_order_collation | ( | const rapidjson::Value & | arr, |
RelAlgDag & | root_dag | ||
) |
Definition at line 1216 of file RelAlgDag.cpp.
References parse_nulls_position(), and parse_sort_direction().
Referenced by parse_operator().
std::vector<std::unique_ptr<const RexScalar> > anonymous_namespace{RelAlgDag.cpp}::parse_window_order_exprs | ( | const rapidjson::Value & | arr, |
RelAlgDag & | root_dag | ||
) |
Definition at line 1194 of file RelAlgDag.cpp.
References field(), and parse_scalar_expr().
Referenced by parse_operator().
void anonymous_namespace{RelAlgDag.cpp}::propagate_hints_to_new_project | ( | std::shared_ptr< RelProject > | prev_node, |
std::shared_ptr< RelProject > | new_node, | ||
std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> & | query_hints | ||
) |
Definition at line 2415 of file RelAlgDag.cpp.
References CHECK.
Referenced by add_window_function_pre_project(), and separate_window_function_expressions().
std::vector<const Rex*> anonymous_namespace{RelAlgDag.cpp}::remapTargetPointers | ( | std::vector< std::unique_ptr< const RexAgg >> const & | agg_exprs_new, |
std::vector< std::unique_ptr< const RexScalar >> const & | scalar_sources_new, | ||
std::vector< std::unique_ptr< const RexAgg >> const & | agg_exprs_old, | ||
std::vector< std::unique_ptr< const RexScalar >> const & | scalar_sources_old, | ||
std::vector< const Rex * > const & | target_exprs_old | ||
) |
void anonymous_namespace{RelAlgDag.cpp}::reset_table_function_inputs | ( | std::vector< const Rex * > & | column_inputs, |
const std::vector< std::unique_ptr< const RexScalar >> & | old_table_func_inputs, | ||
const std::vector< std::unique_ptr< const RexScalar >> & | new_table_func_inputs | ||
) |
Definition at line 711 of file RelAlgDag.cpp.
References CHECK, and CHECK_EQ.
Referenced by RelTableFunction::RelTableFunction(), and RelTableFunction::setTableFuncInputs().
bool anonymous_namespace{RelAlgDag.cpp}::same_ignoring_notnull | ( | SQLTypeInfo | ti0, |
SQLTypeInfo | ti1 | ||
) |
Definition at line 890 of file RelAlgDag.cpp.
References SQLTypeInfo::set_notnull().
Referenced by RelLogicalUnion::getCompatibleMetainfoTypes().
void anonymous_namespace{RelAlgDag.cpp}::separate_window_function_expressions | ( | std::vector< std::shared_ptr< RelAlgNode >> & | nodes, |
std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint >> & | query_hints | ||
) |
Detect the presence of window function operators nested inside expressions. Separate the window function operator from the expression, computing the expression as a subsequent step by pushing the expression to a new project node, and replacing the nested window function operator with a RexInput. Also move all input nodes to the newly created project node. Overall, we have the following query plan: from: Window_Project -> Child to: Window_Project -> New_Project -> Child In pseudocode: for each rex in project list: detect nested window function expression if nested window function expression: push the nested window function expression to the new project P create a new RexInput r_i which references the w_i in P and put it to M (M: a map between nested window function expression w_i and r_i) else push it down to the new project P create a new RexInput r_i which references the rex in P and put it to M for each rex in the project list: visit the rex and find a chance to replace it (or its operand) by using M
Definition at line 2459 of file RelAlgDag.cpp.
References CHECK, anonymous_namespace{RelAlgDag.cpp}::anonymous_namespace{RelAlgDag.cpp}::is_window_function_operator(), propagate_hints_to_new_project(), and RexVisitorBase< T >::visit().
Referenced by RelAlgDagBuilder::optimizeDag().
void anonymous_namespace{RelAlgDag.cpp}::set_notnulls | ( | std::vector< TargetMetaInfo > * | tmis0, |
std::vector< bool > const & | notnulls | ||
) |
Definition at line 896 of file RelAlgDag.cpp.
References SQLTypeInfo::set_notnull().
Referenced by RelLogicalUnion::getCompatibleMetainfoTypes().
|
noexcept |
Definition at line 1336 of file RelAlgDag.cpp.
References CHECK.
Referenced by details::RelAlgDispatcher::dispatchAggregate(), details::RelAlgDispatcher::dispatchProject(), getFieldNamesFromScanNode(), and details::RelAlgDispatcher::getRelAlgInputs().
JoinType anonymous_namespace{RelAlgDag.cpp}::to_join_type | ( | const std::string & | join_type_name | ) |
Definition at line 1404 of file RelAlgDag.cpp.
References ANTI, INNER, LEFT, and SEMI.
Referenced by details::RelAlgDispatcher::dispatchJoin().
const unsigned anonymous_namespace{RelAlgDag.cpp}::FIRST_RA_NODE_ID = 1 |
Definition at line 41 of file RelAlgDag.cpp.
Referenced by RelAlgNode::resetRelAlgFirstId().