JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
QueryPlan.h
Go to the documentation of this file.
1 //
2 // Created by Nico Schäfer on 4/25/17.
3 //
4 
5 #ifndef JODA_QUERYPLAN_H
6 #define JODA_QUERYPLAN_H
7 
8 #include <joda/misc/Benchmark.h>
10 #include <joda/query/Query.h>
14  size_t parsedDocs;
15  size_t parsedConts;
16  size_t numConts;
18 };
19 
25 class QueryPlan {
26  public:
33  QueryPlan(const std::shared_ptr<joda::query::Query> &q);
34 
44  unsigned long executeQuery(Benchmark *bench = nullptr);
45 
50  ExecutionStats getStats() const;
51 
56  bool hasToParse() const;
57 
58  protected:
59  unsigned long resultID = 0;
60  unsigned long maxThreads = 0;
61  bool skip = false;
62 
63  void addGenericBenchmarkInformation(Benchmark *bench = nullptr) const;
64  std::shared_ptr<JSONStorage> load;
65  std::shared_ptr<joda::query::Query> q;
66  std::unique_ptr<JSONContainer> aggregate(
67  std::shared_ptr<joda::query::Query> &q,
69  std::unique_ptr<JsonContainerRefQueue::queue_t> loadQueue;
70  std::unique_ptr<JsonContainerQueue::queue_t> storeQueue;
71  std::unique_ptr<joda::query::AggregatorQueue::queue_t> aggregatorQueue;
73 };
74 
75 #endif // JODA_QUERYPLAN_H
size_t evaluatedConts
Definition: QueryPlan.h:17
size_t parsedConts
Definition: QueryPlan.h:15
size_t parsedDocs
Definition: QueryPlan.h:14
size_t numConts
Definition: QueryPlan.h:16
Definition: QueryPlan.h:13
Definition: Benchmark.h:27
Definition: QueryPlan.h:25
joda::docparsing::ReaderParser parser
Definition: QueryPlan.h:72
bool hasToParse() const
Definition: QueryPlan.cpp:352
std::unique_ptr< joda::query::AggregatorQueue::queue_t > aggregatorQueue
Definition: QueryPlan.h:71
QueryPlan(const std::shared_ptr< joda::query::Query > &q)
Definition: QueryPlan.cpp:302
ExecutionStats getStats() const
Definition: QueryPlan.cpp:354
void addGenericBenchmarkInformation(Benchmark *bench=nullptr) const
Definition: QueryPlan.cpp:368
std::shared_ptr< JSONStorage > load
Definition: QueryPlan.h:64
std::unique_ptr< JSONContainer > aggregate(std::shared_ptr< joda::query::Query > &q, joda::query::AggregatorQueue::queue_t *queue, Benchmark *benchmark)
Definition: QueryPlan.cpp:248
std::unique_ptr< JsonContainerQueue::queue_t > storeQueue
Definition: QueryPlan.h:70
std::shared_ptr< joda::query::Query > q
Definition: QueryPlan.h:65
std::unique_ptr< JsonContainerRefQueue::queue_t > loadQueue
Definition: QueryPlan.h:69
unsigned long executeQuery(Benchmark *bench=nullptr)
Definition: QueryPlan.cpp:29
unsigned long resultID
Definition: QueryPlan.h:59
unsigned long maxThreads
Definition: QueryPlan.h:60
bool skip
Definition: QueryPlan.h:61
Definition: ReaderParser.h:23
Definition: Queue.h:19