OmniSciDB
a5dc49c757
|
#include "GroupByAndAggregate.h"
#include "AggregateUtils.h"
#include "CardinalityEstimator.h"
#include "CodeGenerator.h"
#include "Descriptors/QueryMemoryDescriptor.h"
#include "ExpressionRange.h"
#include "ExpressionRewrite.h"
#include "GpuInitGroups.h"
#include "InPlaceSort.h"
#include "LLVMFunctionAttributesUtil.h"
#include "MaxwellCodegenPatch.h"
#include "OutputBufferInitialization.h"
#include "TargetExprBuilder.h"
#include "../CudaMgr/CudaMgr.h"
#include "../Shared/checked_alloc.h"
#include "../Shared/funcannotations.h"
#include "../Utils/ChunkIter.h"
#include "DataMgr/BufferMgr/BufferMgr.h"
#include "Execute.h"
#include "QueryTemplateGenerator.h"
#include "RuntimeFunctions.h"
#include "Shared/misc.h"
#include "StreamingTopN.h"
#include "TopKSort.h"
#include "WindowContext.h"
#include <llvm/Transforms/Utils/BasicBlockUtils.h>
#include <cstring>
#include <limits>
#include <numeric>
#include <string_view>
#include <thread>
Go to the source code of this file.
Namespaces | |
anonymous_namespace{GroupByAndAggregate.cpp} | |
Macros | |
#define | LL_CONTEXT executor_->cgen_state_->context_ |
#define | LL_BUILDER executor_->cgen_state_->ir_builder_ |
#define | LL_BOOL(v) executor_->cgen_state_->llBool(v) |
#define | LL_INT(v) executor_->cgen_state_->llInt(v) |
#define | LL_FP(v) executor_->cgen_state_->llFp(v) |
#define | ROW_FUNC executor_->cgen_state_->row_func_ |
#define | CUR_FUNC executor_->cgen_state_->current_func_ |
Variables | |
bool g_cluster | false |
bool | g_bigint_count {false} |
int | g_hll_precision_bits {11} |
size_t | g_watchdog_baseline_max_groups {120000000} |
size_t | g_approx_quantile_buffer |
size_t | g_approx_quantile_centroids |
int64_t | g_bitmap_memory_limit |
size_t | g_default_max_groups_buffer_entry_guess |
size_t | g_leaf_count |
#define CUR_FUNC executor_->cgen_state_->current_func_ |
Definition at line 392 of file GroupByAndAggregate.cpp.
Referenced by GroupByAndAggregate::codegenAggArg().
#define LL_BOOL | ( | v | ) | executor_->cgen_state_->llBool(v) |
Definition at line 388 of file GroupByAndAggregate.cpp.
Referenced by GroupByAndAggregate::codegenOutputSlot().
#define LL_BUILDER executor_->cgen_state_->ir_builder_ |
Definition at line 387 of file GroupByAndAggregate.cpp.
Referenced by GroupByAndAggregate::codegen(), GroupByAndAggregate::codegenAggArg(), GroupByAndAggregate::codegenAggCalls(), GroupByAndAggregate::codegenAggColumnPtr(), GroupByAndAggregate::codegenEstimator(), GroupByAndAggregate::codegenGroupBy(), GroupByAndAggregate::codegenMultiColumnBaselineHash(), GroupByAndAggregate::codegenMultiColumnPerfectHash(), GroupByAndAggregate::codegenOutputSlot(), GroupByAndAggregate::codegenWindowRowPointer(), GroupByAndAggregate::convertNullIfAny(), and GroupByAndAggregate::getAdditionalLiteral().
#define LL_CONTEXT executor_->cgen_state_->context_ |
Definition at line 386 of file GroupByAndAggregate.cpp.
Referenced by GroupByAndAggregate::codegen(), GroupByAndAggregate::codegenAggArg(), GroupByAndAggregate::codegenAggCalls(), GroupByAndAggregate::codegenAggColumnPtr(), GroupByAndAggregate::codegenCountDistinct(), GroupByAndAggregate::codegenEstimator(), GroupByAndAggregate::codegenGroupBy(), GroupByAndAggregate::codegenMultiColumnBaselineHash(), GroupByAndAggregate::codegenMultiColumnPerfectHash(), GroupByAndAggregate::codegenPerfectHashFunction(), GroupByAndAggregate::codegenVarlenOutputBuffer(), GroupByAndAggregate::codegenWindowRowPointer(), and GroupByAndAggregate::getAdditionalLiteral().
#define LL_FP | ( | v | ) | executor_->cgen_state_->llFp(v) |
Definition at line 390 of file GroupByAndAggregate.cpp.
Referenced by GroupByAndAggregate::codegenOutputSlot().
#define LL_INT | ( | v | ) | executor_->cgen_state_->llInt(v) |
Definition at line 389 of file GroupByAndAggregate.cpp.
Referenced by GroupByAndAggregate::codegen(), GroupByAndAggregate::codegenAggColumnPtr(), GroupByAndAggregate::codegenCountDistinct(), GroupByAndAggregate::codegenEstimator(), GroupByAndAggregate::codegenGroupBy(), GroupByAndAggregate::codegenMultiColumnBaselineHash(), GroupByAndAggregate::codegenMultiColumnPerfectHash(), GroupByAndAggregate::codegenOutputSlot(), GroupByAndAggregate::codegenPerfectHashFunction(), GroupByAndAggregate::codegenSingleColumnPerfectHash(), GroupByAndAggregate::codegenWindowRowPointer(), and GroupByAndAggregate::getAdditionalLiteral().
#define ROW_FUNC executor_->cgen_state_->row_func_ |
Definition at line 391 of file GroupByAndAggregate.cpp.
Referenced by GroupByAndAggregate::codegen(), GroupByAndAggregate::codegenEstimator(), GroupByAndAggregate::codegenGroupBy(), GroupByAndAggregate::codegenOutputSlot(), GroupByAndAggregate::codegenVarlenOutputBuffer(), GroupByAndAggregate::codegenWindowRowPointer(), and GroupByAndAggregate::getAdditionalLiteral().
RUNTIME_EXPORT void agg_approx_quantile | ( | int64_t * | agg, |
const double | val | ||
) |
Definition at line 1870 of file GroupByAndAggregate.cpp.
References quantile::detail::TDigest< RealType, IndexType >::allocate().
RUNTIME_EXPORT void agg_count_distinct | ( | int64_t * | agg, |
const int64_t | val | ||
) |
Definition at line 1858 of file GroupByAndAggregate.cpp.
Referenced by agg_count_distinct_skip_val().
RUNTIME_EXPORT void agg_count_distinct_skip_val | ( | int64_t * | agg, |
const int64_t | val, | ||
const int64_t | skip_val | ||
) |
Definition at line 1862 of file GroupByAndAggregate.cpp.
References agg_count_distinct().
RUNTIME_EXPORT void agg_mode_func | ( | int64_t * | agg, |
const int64_t | val | ||
) |
Definition at line 1876 of file GroupByAndAggregate.cpp.
References AggMode::add().
std::ostream& operator<< | ( | std::ostream & | out, |
const ColRangeInfo & | info | ||
) |
Definition at line 67 of file GroupByAndAggregate.cpp.
References ColRangeInfo::bucket, ColRangeInfo::has_nulls, ColRangeInfo::hash_type_, ColRangeInfo::max, and ColRangeInfo::min.
std::ostream& operator<< | ( | std::ostream & | out, |
const CountDistinctImplType & | type | ||
) |
Definition at line 74 of file GroupByAndAggregate.cpp.
References Bitmap, Invalid, and UnorderedSet.
std::ostream& operator<< | ( | std::ostream & | out, |
const CountDistinctDescriptor & | desc | ||
) |
Definition at line 92 of file GroupByAndAggregate.cpp.
References CountDistinctDescriptor::approximate, CountDistinctDescriptor::bitmap_sz_bits, CountDistinctDescriptor::device_type, CountDistinctDescriptor::impl_type_, CountDistinctDescriptor::min_val, and CountDistinctDescriptor::sub_bitmap_count.
bool g_cluster false |
Definition at line 53 of file GroupByAndAggregate.cpp.
size_t g_approx_quantile_buffer |
Definition at line 171 of file Execute.cpp.
size_t g_approx_quantile_centroids |
Definition at line 172 of file Execute.cpp.
bool g_bigint_count {false} |
Definition at line 54 of file GroupByAndAggregate.cpp.
Referenced by QueryMemoryInitializer::allocateCountDistinctBuffers(), QueryMemoryInitializer::calculateCountDistinctBufferSize(), anonymous_namespace{QueryMemoryInitializer.cpp}::check_count_distinct_expr_metadata(), TargetExprCodegen::codegen(), GroupByAndAggregate::codegenApproxQuantile(), GroupByAndAggregate::codegenCountDistinct(), ColSlotContext::ColSlotContext(), anonymous_namespace{RelAlgExecutor.cpp}::decide_approx_count_distinct_implementation(), Executor::executePlanWithoutGroupBy(), anonymous_namespace{Execute.cpp}::fill_entries_for_empty_input(), CommandLineOptions::fillOptions(), get_agg_type(), anonymous_namespace{QueryMemoryDescriptor.cpp}::get_col_byte_widths(), get_heap_key_slot_index(), anonymous_namespace{GroupByAndAggregate.cpp}::get_keyless_info(), Executor::getDeviceTypeForTargets(), RelAlgExecutor::getFilteredCountAll(), RelAlgExecutor::getFilterSelectivity(), anonymous_namespace{GroupByAndAggregate.cpp}::has_count_distinct(), init_agg_val_vec(), anonymous_namespace{GroupByAndAggregate.cpp}::init_count_distinct_descriptors(), QueryMemoryInitializer::initColumnarGroups(), TargetExprCodegenBuilder::operator()(), anonymous_namespace{Execute.cpp}::GetTargetInfo::operator()(), QueryMemoryDescriptor::pick_target_compact_width(), target_exprs_to_infos(), and RelAlgTranslator::translateWindowFunction().
int64_t g_bitmap_memory_limit |
Definition at line 28 of file QueryMemoryInitializer.cpp.
Referenced by anonymous_namespace{QueryMemoryInitializer.cpp}::check_total_bitmap_memory(), CommandLineOptions::fillDeveloperOptions(), anonymous_namespace{GroupByAndAggregate.cpp}::init_count_distinct_descriptors(), and InValuesBitmap::InValuesBitmap().
size_t g_default_max_groups_buffer_entry_guess |
Definition at line 118 of file Execute.cpp.
int g_hll_precision_bits {11} |
size_t g_leaf_count |
Definition at line 79 of file ParserNode.cpp.
size_t g_watchdog_baseline_max_groups {120000000} |
Definition at line 56 of file GroupByAndAggregate.cpp.
Referenced by GroupByAndAggregate::initQueryMemoryDescriptorImpl().