OmniSciDB  06b3bd477c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RelAlgExecutor.cpp File Reference
#include "RelAlgExecutor.h"
#include "Parser/ParserNode.h"
#include "QueryEngine/CalciteDeserializerUtils.h"
#include "QueryEngine/CardinalityEstimator.h"
#include "QueryEngine/ColumnFetcher.h"
#include "QueryEngine/EquiJoinCondition.h"
#include "QueryEngine/ErrorHandling.h"
#include "QueryEngine/ExpressionRewrite.h"
#include "QueryEngine/ExternalExecutor.h"
#include "QueryEngine/FromTableReordering.h"
#include "QueryEngine/QueryPhysicalInputsCollector.h"
#include "QueryEngine/RangeTableIndexVisitor.h"
#include "QueryEngine/RelAlgDagBuilder.h"
#include "QueryEngine/RelAlgTranslator.h"
#include "QueryEngine/RexVisitor.h"
#include "QueryEngine/TableFunctions/TableFunctionsFactory.h"
#include "QueryEngine/WindowContext.h"
#include "Shared/TypedDataAccessors.h"
#include "Shared/measure.h"
#include "Shared/misc.h"
#include "Shared/shard_key.h"
#include <boost/algorithm/cxx11/any_of.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include <algorithm>
#include <functional>
#include <numeric>
+ Include dependency graph for RelAlgExecutor.cpp:

Go to the source code of this file.

Classes

struct  anonymous_namespace{RelAlgExecutor.cpp}::ExecutorMutexHolder
 
class  anonymous_namespace{RelAlgExecutor.cpp}::RexUsedInputsVisitor
 

Namespaces

 anonymous_namespace{RelAlgExecutor.cpp}
 

Functions

bool anonymous_namespace{RelAlgExecutor.cpp}::node_is_aggregate (const RelAlgNode *ra)
 
std::unordered_set< PhysicalInputanonymous_namespace{RelAlgExecutor.cpp}::get_physical_inputs (const Catalog_Namespace::Catalog &cat, const RelAlgNode *ra)
 
void anonymous_namespace{RelAlgExecutor.cpp}::check_sort_node_source_constraint (const RelSort *sort)
 
const RelAlgNodeanonymous_namespace{RelAlgExecutor.cpp}::get_data_sink (const RelAlgNode *ra_node)
 
std::pair< std::unordered_set
< const RexInput * >
, std::vector< std::shared_ptr
< RexInput > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs (const RelCompound *compound, const Catalog_Namespace::Catalog &cat)
 
std::pair< std::unordered_set
< const RexInput * >
, std::vector< std::shared_ptr
< RexInput > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs (const RelAggregate *aggregate, const Catalog_Namespace::Catalog &cat)
 
std::pair< std::unordered_set
< const RexInput * >
, std::vector< std::shared_ptr
< RexInput > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs (const RelProject *project, const Catalog_Namespace::Catalog &cat)
 
std::pair< std::unordered_set
< const RexInput * >
, std::vector< std::shared_ptr
< RexInput > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs (const RelTableFunction *table_func, const Catalog_Namespace::Catalog &cat)
 
std::pair< std::unordered_set
< const RexInput * >
, std::vector< std::shared_ptr
< RexInput > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs (const RelFilter *filter, const Catalog_Namespace::Catalog &cat)
 
std::pair< std::unordered_set
< const RexInput * >
, std::vector< std::shared_ptr
< RexInput > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs (const RelLogicalUnion *logical_union, const Catalog_Namespace::Catalog &)
 
int anonymous_namespace{RelAlgExecutor.cpp}::table_id_from_ra (const RelAlgNode *ra_node)
 
std::unordered_map< const
RelAlgNode *, int > 
anonymous_namespace{RelAlgExecutor.cpp}::get_input_nest_levels (const RelAlgNode *ra_node, const std::vector< size_t > &input_permutation)
 
std::pair< std::unordered_set
< const RexInput * >
, std::vector< std::shared_ptr
< RexInput > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_join_source_used_inputs (const RelAlgNode *ra_node, const Catalog_Namespace::Catalog &cat)
 
void anonymous_namespace{RelAlgExecutor.cpp}::collect_used_input_desc (std::vector< InputDescriptor > &input_descs, const Catalog_Namespace::Catalog &cat, std::unordered_set< std::shared_ptr< const InputColDescriptor >> &input_col_descs_unique, const RelAlgNode *ra_node, const std::unordered_set< const RexInput * > &source_used_inputs, const std::unordered_map< const RelAlgNode *, int > &input_to_nest_level)
 
template<class RA >
std::pair< std::vector
< InputDescriptor >, std::list
< std::shared_ptr< const
InputColDescriptor > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_input_desc_impl (const RA *ra_node, const std::unordered_set< const RexInput * > &used_inputs, const std::unordered_map< const RelAlgNode *, int > &input_to_nest_level, const std::vector< size_t > &input_permutation, const Catalog_Namespace::Catalog &cat)
 
template<class RA >
std::tuple< std::vector
< InputDescriptor >, std::list
< std::shared_ptr< const
InputColDescriptor >
>, std::vector
< std::shared_ptr< RexInput > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_input_desc (const RA *ra_node, const std::unordered_map< const RelAlgNode *, int > &input_to_nest_level, const std::vector< size_t > &input_permutation, const Catalog_Namespace::Catalog &cat)
 
size_t anonymous_namespace{RelAlgExecutor.cpp}::get_scalar_sources_size (const RelCompound *compound)
 
size_t anonymous_namespace{RelAlgExecutor.cpp}::get_scalar_sources_size (const RelProject *project)
 
size_t anonymous_namespace{RelAlgExecutor.cpp}::get_scalar_sources_size (const RelTableFunction *table_func)
 
const RexScalaranonymous_namespace{RelAlgExecutor.cpp}::scalar_at (const size_t i, const RelCompound *compound)
 
const RexScalaranonymous_namespace{RelAlgExecutor.cpp}::scalar_at (const size_t i, const RelProject *project)
 
const RexScalaranonymous_namespace{RelAlgExecutor.cpp}::scalar_at (const size_t i, const RelTableFunction *table_func)
 
std::shared_ptr< Analyzer::Expranonymous_namespace{RelAlgExecutor.cpp}::set_transient_dict (const std::shared_ptr< Analyzer::Expr > expr)
 
void anonymous_namespace{RelAlgExecutor.cpp}::set_transient_dict_maybe (std::vector< std::shared_ptr< Analyzer::Expr >> &scalar_sources, const std::shared_ptr< Analyzer::Expr > &expr)
 
std::shared_ptr< Analyzer::Expranonymous_namespace{RelAlgExecutor.cpp}::cast_dict_to_none (const std::shared_ptr< Analyzer::Expr > &input)
 
template<class RA >
std::vector< std::shared_ptr
< Analyzer::Expr > > 
anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources (const RA *ra_node, const RelAlgTranslator &translator, const ::ExecutorType executor_type)
 
template<class RA >
std::vector< std::shared_ptr
< Analyzer::Expr > > 
anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources_for_update (const RA *ra_node, const RelAlgTranslator &translator, int32_t tableId, const Catalog_Namespace::Catalog &cat, const ColumnNameList &colNames, size_t starting_projection_column_idx)
 
std::list< std::shared_ptr
< Analyzer::Expr > > 
anonymous_namespace{RelAlgExecutor.cpp}::translate_groupby_exprs (const RelCompound *compound, const std::vector< std::shared_ptr< Analyzer::Expr >> &scalar_sources)
 
std::list< std::shared_ptr
< Analyzer::Expr > > 
anonymous_namespace{RelAlgExecutor.cpp}::translate_groupby_exprs (const RelAggregate *aggregate, const std::vector< std::shared_ptr< Analyzer::Expr >> &scalar_sources)
 
QualsConjunctiveForm anonymous_namespace{RelAlgExecutor.cpp}::translate_quals (const RelCompound *compound, const RelAlgTranslator &translator)
 
std::vector< Analyzer::Expr * > anonymous_namespace{RelAlgExecutor.cpp}::translate_targets (std::vector< std::shared_ptr< Analyzer::Expr >> &target_exprs_owned, const std::vector< std::shared_ptr< Analyzer::Expr >> &scalar_sources, const std::list< std::shared_ptr< Analyzer::Expr >> &groupby_exprs, const RelCompound *compound, const RelAlgTranslator &translator, const ExecutorType executor_type)
 
std::vector< Analyzer::Expr * > anonymous_namespace{RelAlgExecutor.cpp}::translate_targets (std::vector< std::shared_ptr< Analyzer::Expr >> &target_exprs_owned, const std::vector< std::shared_ptr< Analyzer::Expr >> &scalar_sources, const std::list< std::shared_ptr< Analyzer::Expr >> &groupby_exprs, const RelAggregate *aggregate, const RelAlgTranslator &translator)
 
bool anonymous_namespace{RelAlgExecutor.cpp}::is_count_distinct (const Analyzer::Expr *expr)
 
bool anonymous_namespace{RelAlgExecutor.cpp}::is_agg (const Analyzer::Expr *expr)
 
SQLTypeInfo anonymous_namespace{RelAlgExecutor.cpp}::get_logical_type_for_expr (const Analyzer::Expr &expr)
 
template<class RA >
std::vector< TargetMetaInfoanonymous_namespace{RelAlgExecutor.cpp}::get_targets_meta (const RA *ra_node, const std::vector< Analyzer::Expr * > &target_exprs)
 
template<>
std::vector< TargetMetaInfoanonymous_namespace{RelAlgExecutor.cpp}::get_targets_meta (const RelFilter *filter, const std::vector< Analyzer::Expr * > &target_exprs)
 
bool anonymous_namespace{RelAlgExecutor.cpp}::is_window_execution_unit (const RelAlgExecutionUnit &ra_exe_unit)
 
std::shared_ptr< Analyzer::Expranonymous_namespace{RelAlgExecutor.cpp}::transform_to_inner (const Analyzer::Expr *expr)
 
bool sameTypeInfo (std::vector< TargetMetaInfo > const &lhs, std::vector< TargetMetaInfo > const &rhs)
 
bool isGeometry (TargetMetaInfo const &target_meta_info)
 
template<class T >
int64_t anonymous_namespace{RelAlgExecutor.cpp}::insert_one_dict_str (T *col_data, const std::string &columnName, const SQLTypeInfo &columnType, const Analyzer::Constant *col_cv, const Catalog_Namespace::Catalog &catalog)
 
template<class T >
int64_t anonymous_namespace{RelAlgExecutor.cpp}::insert_one_dict_str (T *col_data, const ColumnDescriptor *cd, const Analyzer::Constant *col_cv, const Catalog_Namespace::Catalog &catalog)
 
std::list< Analyzer::OrderEntryanonymous_namespace{RelAlgExecutor.cpp}::get_order_entries (const RelSort *sort)
 
size_t anonymous_namespace{RelAlgExecutor.cpp}::get_scan_limit (const RelAlgNode *ra, const size_t limit)
 
bool anonymous_namespace{RelAlgExecutor.cpp}::first_oe_is_desc (const std::list< Analyzer::OrderEntry > &order_entries)
 
size_t anonymous_namespace{RelAlgExecutor.cpp}::groups_approx_upper_bound (const std::vector< InputTableInfo > &table_infos)
 
bool anonymous_namespace{RelAlgExecutor.cpp}::compute_output_buffer_size (const RelAlgExecutionUnit &ra_exe_unit)
 
bool anonymous_namespace{RelAlgExecutor.cpp}::exe_unit_has_quals (const RelAlgExecutionUnit ra_exe_unit)
 
RelAlgExecutionUnit anonymous_namespace{RelAlgExecutor.cpp}::decide_approx_count_distinct_implementation (const RelAlgExecutionUnit &ra_exe_unit_in, const std::vector< InputTableInfo > &table_infos, const Executor *executor, const ExecutorDeviceType device_type_in, std::vector< std::shared_ptr< Analyzer::Expr >> &target_exprs_owned)
 
void anonymous_namespace{RelAlgExecutor.cpp}::build_render_targets (RenderInfo &render_info, const std::vector< Analyzer::Expr * > &work_unit_target_exprs, const std::vector< TargetMetaInfo > &targets_meta)
 
bool anonymous_namespace{RelAlgExecutor.cpp}::can_use_bump_allocator (const RelAlgExecutionUnit &ra_exe_unit, const CompilationOptions &co, const ExecutionOptions &eo)
 
JoinType anonymous_namespace{RelAlgExecutor.cpp}::get_join_type (const RelAlgNode *ra)
 
std::unique_ptr< const
RexOperator
anonymous_namespace{RelAlgExecutor.cpp}::get_bitwise_equals (const RexScalar *scalar)
 
std::unique_ptr< const
RexOperator
anonymous_namespace{RelAlgExecutor.cpp}::get_bitwise_equals_conjunction (const RexScalar *scalar)
 
std::vector< JoinTypeanonymous_namespace{RelAlgExecutor.cpp}::left_deep_join_types (const RelLeftDeepInnerJoin *left_deep_join)
 
template<class RA >
std::vector< size_t > anonymous_namespace{RelAlgExecutor.cpp}::do_table_reordering (std::vector< InputDescriptor > &input_descs, std::list< std::shared_ptr< const InputColDescriptor >> &input_col_descs, const JoinQualsPerNestingLevel &left_deep_join_quals, std::unordered_map< const RelAlgNode *, int > &input_to_nest_level, const RA *node, const std::vector< InputTableInfo > &query_infos, const Executor *executor)
 
std::vector< size_t > anonymous_namespace{RelAlgExecutor.cpp}::get_left_deep_join_input_sizes (const RelLeftDeepInnerJoin *left_deep_join)
 
std::list< std::shared_ptr
< Analyzer::Expr > > 
anonymous_namespace{RelAlgExecutor.cpp}::rewrite_quals (const std::list< std::shared_ptr< Analyzer::Expr >> &quals)
 
std::vector< const RexScalar * > anonymous_namespace{RelAlgExecutor.cpp}::rex_to_conjunctive_form (const RexScalar *qual_expr)
 
std::shared_ptr< Analyzer::Expranonymous_namespace{RelAlgExecutor.cpp}::build_logical_expression (const std::vector< std::shared_ptr< Analyzer::Expr >> &factors, const SQLOps sql_op)
 
template<class QualsList >
bool anonymous_namespace{RelAlgExecutor.cpp}::list_contains_expression (const QualsList &haystack, const std::shared_ptr< Analyzer::Expr > &needle)
 
std::shared_ptr< Analyzer::Expranonymous_namespace{RelAlgExecutor.cpp}::reverse_logical_distribution (const std::shared_ptr< Analyzer::Expr > &expr)
 
std::vector< std::shared_ptr
< Analyzer::Expr > > 
anonymous_namespace{RelAlgExecutor.cpp}::synthesize_inputs (const RelAlgNode *ra_node, const size_t nest_level, const std::vector< TargetMetaInfo > &in_metainfo, const std::unordered_map< const RelAlgNode *, int > &input_to_nest_level)
 
std::vector< std::shared_ptr
< Analyzer::Expr > > 
anonymous_namespace{RelAlgExecutor.cpp}::target_exprs_for_union (RelAlgNode const *input_node)
 
std::pair< std::vector
< TargetMetaInfo >
, std::vector< std::shared_ptr
< Analyzer::Expr > > > 
anonymous_namespace{RelAlgExecutor.cpp}::get_inputs_meta (const RelFilter *filter, const RelAlgTranslator &translator, const std::vector< std::shared_ptr< RexInput >> &inputs_owned, const std::unordered_map< const RelAlgNode *, int > &input_to_nest_level)
 

Variables

bool g_skip_intermediate_count {true}
 
bool g_enable_bump_allocator
 
bool g_enable_interop {false}
 
bool g_enable_union {false}
 

Function Documentation

bool isGeometry ( TargetMetaInfo const &  target_meta_info)

Definition at line 1828 of file RelAlgExecutor.cpp.

References TargetMetaInfo::get_type_info(), and SQLTypeInfo::is_geometry().

Referenced by RelAlgExecutor::executeUnion().

1828  {
1829  return target_meta_info.get_type_info().is_geometry();
1830 }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool sameTypeInfo ( std::vector< TargetMetaInfo > const &  lhs,
std::vector< TargetMetaInfo > const &  rhs 
)

Definition at line 1815 of file RelAlgExecutor.cpp.

1816  {
1817  if (lhs.size() == rhs.size()) {
1818  for (size_t i = 0; i < lhs.size(); ++i) {
1819  if (lhs[i].get_type_info() != rhs[i].get_type_info()) {
1820  return false;
1821  }
1822  }
1823  return true;
1824  }
1825  return false;
1826 }

Variable Documentation

bool g_enable_bump_allocator

Definition at line 104 of file Execute.cpp.

bool g_enable_interop {false}
bool g_skip_intermediate_count {true}