![]() |
mutable
A Database System for Research and Fast Prototyping
|
#include <QueryGraph.hpp>
Public Types | |
using | clause_map = std::unordered_map< cnf::Clause, ClauseInfo > |
| |
Public Member Functions | |
GraphBuilder () | |
std::unique_ptr< QueryGraph > | get () |
| |
void | operator() (Const< ast::Stmt > &s) |
void | operator() (Const< ast::ErrorStmt > &) |
void | operator() (Const< ast::EmptyStmt > &) |
void | operator() (Const< ast::CreateDatabaseStmt > &) |
void | operator() (Const< ast::DropDatabaseStmt > &) |
void | operator() (Const< ast::UseDatabaseStmt > &) |
void | operator() (Const< ast::CreateTableStmt > &) |
void | operator() (Const< ast::DropTableStmt > &) |
void | operator() (Const< ast::SelectStmt > &s) |
void | operator() (Const< ast::InsertStmt > &) |
void | operator() (Const< ast::UpdateStmt > &) |
void | operator() (Const< ast::DeleteStmt > &) |
void | operator() (Const< ast::DSVImportStmt > &) |
void | process_selection (cnf::Clause &clause) |
Computes correlation information of clause . | |
Private Attributes | |
std::vector< std::reference_wrapper< const ast::Expr > > | existing_grouping_keys_ |
| |
std::unordered_set< std::reference_wrapper< const ast::Expr > > | additional_grouping_keys_ |
| |
clause_map | bound_clauses_ |
| |
clause_map | deferred_clauses_ |
| |
std::unique_ptr< QueryGraph > | graph_ |
| |
std::unordered_map< ThreadSafePooledString, std::reference_wrapper< DataSource > > | named_sources_ |
| |
bool | needs_grouping_ = false |
| |
Definition at line 44 of file QueryGraph.hpp.
using m::GraphBuilder::clause_map = std::unordered_map<cnf::Clause, ClauseInfo> |
maps a
cnf::Clause
to itsClauseInfo
Definition at line 47 of file QueryGraph.hpp.
GraphBuilder::GraphBuilder | ( | ) |
Definition at line 410 of file QueryGraph.cpp.
|
inline |
returns the constructed
QueryGraph
Definition at line 72 of file QueryGraph.hpp.
References graph_.
Referenced by m::QueryGraph::Build().
|
inline |
Definition at line 79 of file QueryGraph.hpp.
References M_unreachable.
|
inline |
Definition at line 82 of file QueryGraph.hpp.
References M_unreachable.
|
inline |
Definition at line 87 of file QueryGraph.hpp.
References M_unreachable.
|
inline |
Definition at line 80 of file QueryGraph.hpp.
References M_unreachable.
|
inline |
Definition at line 83 of file QueryGraph.hpp.
References M_unreachable.
|
inline |
Definition at line 88 of file QueryGraph.hpp.
References M_unreachable.
|
inline |
Definition at line 78 of file QueryGraph.hpp.
|
inline |
Definition at line 77 of file QueryGraph.hpp.
References M_unreachable.
|
inline |
Definition at line 85 of file QueryGraph.hpp.
References M_unreachable.
void m::GraphBuilder::operator() | ( | Const< ast::SelectStmt > & | s | ) |
|
inline |
Definition at line 76 of file QueryGraph.hpp.
|
inline |
Definition at line 86 of file QueryGraph.hpp.
References M_unreachable.
|
inline |
Definition at line 81 of file QueryGraph.hpp.
References M_unreachable.
void GraphBuilder::process_selection | ( | cnf::Clause & | clause | ) |
Computes correlation information of clause
.
Analyzes the entire clause for how it can be decorrelated.
If the query contains grouping, more in depth analysis is performed:
Definition at line 440 of file QueryGraph.cpp.
References additional_grouping_keys_, m::and, m::ClauseInfo::binding_depth, bound_clauses_, deferred_clauses_, existing_grouping_keys_, graph_, is_composable_of(), M_insist, named_sources_, needs_grouping_, and m::ClauseInfo::nested_queries.
|
private |
additionally required grouping keys to perform decorrelation
Definition at line 54 of file QueryGraph.hpp.
Referenced by process_selection().
|
private |
to be handled by the current query
Definition at line 57 of file QueryGraph.hpp.
Referenced by process_selection().
|
private |
to be handled by an outer query
Definition at line 59 of file QueryGraph.hpp.
Referenced by process_selection().
|
private |
the grouping keys of the statement
Definition at line 52 of file QueryGraph.hpp.
Referenced by process_selection().
|
private |
the query graph that is being constructed
Definition at line 62 of file QueryGraph.hpp.
Referenced by get(), and process_selection().
|
private |
maps
DataSource
names/aliases to theDataSource
instance
Definition at line 64 of file QueryGraph.hpp.
Referenced by process_selection().
|
private |
whether this graph needs grouping; either by explicily grouping or implicitly by using aggregations
Definition at line 66 of file QueryGraph.hpp.
Referenced by process_selection().