5 #ifndef JODA_QUERYTHREAD_H
6 #define JODA_QUERYTHREAD_H
21 std::shared_ptr<joda::query::Query>
q;
23 std::vector<std::unique_ptr<IQueryExecutor>>
executors;
24 std::vector<std::unique_ptr<joda::query::IAggregator>>
aggregators;
37 for (
const auto &agg : this->q->getAggregators()) {
51 executors.emplace_back(exec->duplicate());
70 :
public IWorkerThread<JsonContainerRefQueue, JsonContainerQueue,
130 void aggregate(
const std::vector<RapidJsonDocument> &docs)
const;
140 const std::shared_ptr<const DocIndex> &selectResult,
141 bool isSelected)
const;
143 void work()
override;
std::vector< bool > DocIndex
Definition: JSONContainer.h:31
rapidjson::MemoryPoolAllocator< RJBaseAlloc > RJMemoryPoolAlloc
Definition: RJFwd.h:26
Definition: Benchmark.h:27
Definition: IOThreadPool.h:182
IQueue * iqueue
Definition: IOThreadPool.h:218
OQueue * oqueue
Definition: IOThreadPool.h:219
WConf conf
Definition: IOThreadPool.h:220
QueryThreadConfig WConf
Definition: IOThreadPool.h:192
OQueueStruct::queue_t OQueue
Definition: IOThreadPool.h:189
OQueueStruct::payload_t OPayload
Definition: IOThreadPool.h:191
IQueueStruct::queue_t IQueue
Definition: IOThreadPool.h:188
IQueueStruct::payload_t IPayload
Definition: IOThreadPool.h:190
Definition: JSONContainer.h:37
Definition: QueryThread.h:71
bool canCreateView() const
Definition: QueryThread.cpp:334
const std::string getThreadID() const
Definition: QueryThread.cpp:275
std::shared_ptr< const DocIndex > select(JSONContainer &cont) const
Definition: QueryThread.cpp:281
bool hasAggregators() const
Definition: QueryThread.cpp:332
OPayload OwnedCont
Definition: QueryThread.h:80
RecurringTimer bloom_timer
Definition: QueryThread.h:146
RecurringTimer copy_timer
Definition: QueryThread.h:150
std::vector< std::unique_ptr< RJDocument > > defaultProject(JSONContainer &cont, const DocIndex &ids, RJMemoryPoolAlloc &alloc) const
Definition: QueryThread.cpp:316
void work() override
Definition: QueryThread.cpp:35
RecurringTimer project_timer
Definition: QueryThread.h:148
bool hasToProject() const
Definition: QueryThread.cpp:338
IPayload ContRef
Definition: QueryThread.h:79
void logTimers() const
Definition: QueryThread.cpp:348
~QueryThread() override
Definition: QueryThread.cpp:25
void aggregate(const std::vector< RapidJsonDocument > &docs) const
Definition: QueryThread.cpp:266
QueryThread(IQueue *iqueue, OQueue *oqueue, WConf &conf)
Definition: QueryThread.cpp:13
RecurringTimer select_timer
Definition: QueryThread.h:147
RecurringTimer aggregate_timer
Definition: QueryThread.h:149
RecurringTimer serialize_timer
Definition: QueryThread.h:151
RecurringTimer sample_view_cost_timer
Definition: QueryThread.h:152
Definition: RecurringTimer.h:14
Definition: QueryThread.h:20
std::string tmpdir
Definition: QueryThread.h:27
std::shared_ptr< joda::query::Query > q
Definition: QueryThread.h:21
QueryThreadConfig()=default
std::vector< std::unique_ptr< IQueryExecutor > > executors
Definition: QueryThread.h:23
joda::query::AggregatorQueue::queue_t * aggQueue
Definition: QueryThread.h:26
QueryThreadConfig(const QueryThreadConfig &o)
Definition: QueryThread.h:42
void addExecutor(std::unique_ptr< IQueryExecutor > &&exec)
Definition: QueryThread.h:58
QueryThreadConfig(std::shared_ptr< joda::query::Query > &q)
Definition: QueryThread.h:31
Benchmark * bench
Definition: QueryThread.h:22
std::shared_ptr< JoinManager > joinManager
Definition: QueryThread.h:25
std::vector< std::unique_ptr< joda::query::IAggregator > > aggregators
Definition: QueryThread.h:24