24#ifndef SQL_JOIN_OPTIMIZER_GRAPH_SIMPLIFICATION_H_
25#define SQL_JOIN_OPTIMIZER_GRAPH_SIMPLIFICATION_H_
284 (*cache)->index_in_pq = index;
289 std::vector<NeighborCache *, Mem_root_allocator<NeighborCache *>>,
290 CompareByBenefit, MarkNeighborCache>
A wrapper class which provides array bounds checking.
Definition: sql_array.h:47
Definition: graph_simplification.h:87
ALWAYS_INLINE bool EdgesAreNeighboring(size_t edge1_idx, size_t edge2_idx, ProposedSimplificationStep *step)
Definition: graph_simplification.cc:648
Bounds_checked_array< NeighborCache > m_cache
Definition: graph_simplification.h:272
Bounds_checked_array< EdgeCardinalities > m_edge_cardinalities
Definition: graph_simplification.h:218
void RecalculateNeighbors(size_t edge1_idx, size_t begin, size_t end)
Definition: graph_simplification.cc:597
SimplificationStep ConcretizeSimplificationStep(GraphSimplifier::ProposedSimplificationStep step)
Definition: graph_simplification.cc:770
JoinHypergraph * m_graph
Definition: graph_simplification.h:221
SimplificationResult
Definition: graph_simplification.h:94
@ APPLIED_REDO_STEP
Definition: graph_simplification.h:112
@ NO_SIMPLIFICATION_POSSIBLE
Definition: graph_simplification.h:96
@ APPLIED_SIMPLIFICATION
Definition: graph_simplification.h:100
@ APPLIED_NOOP
Definition: graph_simplification.h:107
void UndoSimplificationStep()
Definition: graph_simplification.cc:899
SimplificationResult DoSimplificationStep()
Definition: graph_simplification.cc:825
Mem_root_array< SimplificationStep > m_undone_steps
Definition: graph_simplification.h:203
void UpdatePQ(size_t edge_idx)
Definition: graph_simplification.cc:577
int num_steps_done() const
Definition: graph_simplification.h:134
Priority_queue< NeighborCache *, std::vector< NeighborCache *, Mem_root_allocator< NeighborCache * > >, CompareByBenefit, MarkNeighborCache > m_pq
Definition: graph_simplification.h:291
OnlineCycleFinder m_cycles
Definition: graph_simplification.h:226
Mem_root_array< SimplificationStep > m_done_steps
Definition: graph_simplification.h:197
GraphSimplifier(JoinHypergraph *graph, MEM_ROOT *mem_root)
Definition: graph_simplification.cc:553
Mem_root_allocator is a C++ STL memory allocator based on MEM_ROOT.
Definition: mem_root_allocator.h:68
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:426
A fast online cycle finder, based on [Pea03].
Definition: online_cycle_finder.h:54
Implements a priority queue using a vector-based max-heap.
Definition: priority_queue.h:104
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
static MEM_ROOT mem_root
Definition: client_plugin.cc:110
void SimplifyQueryGraph(THD *thd, int subgraph_pair_limit, JoinHypergraph *graph, std::string *trace)
Definition of an undirected (join) hypergraph.
Header for compiler-dependent features.
#define ALWAYS_INLINE
Definition: my_compiler.h:110
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
Definition: graph_simplification.h:277
bool operator()(const NeighborCache *a, const NeighborCache *b) const
Definition: graph_simplification.h:278
Definition: graph_simplification.h:214
double left
Definition: graph_simplification.h:215
double right
Definition: graph_simplification.h:216
Definition: graph_simplification.h:282
void operator()(size_t index, NeighborCache **cache)
Definition: graph_simplification.h:283
Definition: graph_simplification.h:254
int best_neighbor
Definition: graph_simplification.h:261
ProposedSimplificationStep best_step
Definition: graph_simplification.h:262
int index_in_pq
Definition: graph_simplification.h:270
Definition: graph_simplification.h:168
int before_edge_idx
Definition: graph_simplification.h:170
int after_edge_idx
Definition: graph_simplification.h:171
double benefit
Definition: graph_simplification.h:169
Definition: graph_simplification.h:180
int after_edge_idx
Definition: graph_simplification.h:182
int before_edge_idx
Definition: graph_simplification.h:181
hypergraph::Hyperedge new_edge
Definition: graph_simplification.h:186
hypergraph::Hyperedge old_edge
Definition: graph_simplification.h:185
A struct containing a join hypergraph of a single query block, encapsulating the constraints given by...
Definition: make_join_hypergraph.h:77
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: hypergraph.h:80