OmniSciDB
a5dc49c757
|
#include "SpeculativeTopN.h"
#include "Logger/Logger.h"
#include "RelAlgExecutor.h"
#include "ResultSet.h"
Go to the source code of this file.
Functions | |
bool | use_speculative_top_n (const RelAlgExecutionUnit &ra_exe_unit, const QueryMemoryDescriptor &query_mem_desc) |
bool use_speculative_top_n | ( | const RelAlgExecutionUnit & | ra_exe_unit, |
const QueryMemoryDescriptor & | query_mem_desc | ||
) |
SpeculativeTopN sort is used when there are multiple already sorted results (when GPU sort is used on multiple devices, refer to GroupByAndAggregate::gpuCanHandleOrderEntries), and we want to pick top n elements (LIMIT caluse exists), and we have already chosen this algorithm when creating the proper work unit (refer to RelAlgExecutor::createSortInputWorkUnit).
Besides, we currently only support cases with 2 target expressions and only with COUNT aggregate (similar limitations exists in whether or not we support GPU sort).
Definition at line 188 of file SpeculativeTopN.cpp.
References SortInfo::algorithm, g_cluster, SortInfo::limit, RelAlgExecutionUnit::sort_info, QueryMemoryDescriptor::sortOnGpu(), SpeculativeTopN, and RelAlgExecutionUnit::target_exprs.
Referenced by Executor::collectAllDeviceResults(), RelAlgExecutor::executeSort(), RelAlgExecutor::executeWorkUnit(), and QueryExecutionContext::launchGpuCode().