OmniSciDB
c1a53651b2
|
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 | 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 2475 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 2555 of file RelAlgDag.cpp.
References anonymous_namespace{Utm.h}::a, CHECK, CHECK_EQ, RelAggregate::getGroupByCount(), 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 1498 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 1470 of file RelAlgDag.cpp.
References CHECK_EQ, and disambiguate_rex().
Referenced by bind_inputs(), and create_compound().
|
noexcept |
Definition at line 1484 of file RelAlgDag.cpp.
References disambiguate_rex().
Referenced by bind_inputs().
|
noexcept |
Definition at line 2736 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 1991 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 1577 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 616 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 626 of file RelAlgDag.cpp.
References RexVisitorBase< T >::visit().
|
noexcept |
Definition at line 1651 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 1423 of file RelAlgDag.cpp.
References RexCase::branchCount(), disambiguate_rex(), RexCase::getElse(), RexCase::getThen(), and RexCase::getWhen().
Referenced by disambiguate_rex().
|
noexcept |
Definition at line 1388 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 1444 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().
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 763 of file RelAlgDag.cpp.
References CHECK, and CHECK_EQ.
Referenced by RelSort::hasEquivCollationOf().
|
noexcept |
Definition at line 2722 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 2742 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 2754 of file RelAlgDag.cpp.
References field(), and strings_from_json_array().
Referenced by details::RelAlgDispatcher::dispatchTableScan().
|
noexcept |
Definition at line 1539 of file RelAlgDag.cpp.
References RelProject::getDeliveredHints(), RelAggregate::getDeliveredHints(), and RelCompound::getDeliveredHints().
Referenced by RelAlgDagBuilder::optimizeDag().
|
noexcept |
Definition at line 1317 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 469 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 962 of file RelAlgDag.cpp.
Referenced by details::RelAlgDispatcher::dispatchModify(), parse_scalar_expr(), and parse_type().
|
noexcept |
Definition at line 1591 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 95 of file RelAlgDag.cpp.
References anonymous_namespace{Utm.h}::n.
Referenced by get_node_output().
|
noexcept |
Definition at line 957 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 973 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 1330 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 1285 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 1083 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 979 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 1179 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 1243 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 1347 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 1173 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 1216 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 1064 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 1197 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 1093 of file RelAlgDag.cpp.
References AVG, COUNT, COUNT_IF, CUME_DIST, DENSE_RANK, FIRST_VALUE, LAG, LAG_IN_FRAME, LAST_VALUE, 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 1185 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 1163 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 2317 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 710 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 2361 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 1305 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 1370 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 40 of file RelAlgDag.cpp.
Referenced by RelAlgNode::resetRelAlgFirstId().