OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GroupByAndAggregate.cpp File Reference
#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 "StreamingTopN.h"
#include "TopKSort.h"
#include "WindowContext.h"
#include <llvm/Transforms/Utils/BasicBlockUtils.h>
#include <cstring>
#include <numeric>
#include <string_view>
#include <thread>
+ Include dependency graph for GroupByAndAggregate.cpp:

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_
 

Functions

int32_t anonymous_namespace{GroupByAndAggregate.cpp}::get_agg_count (const std::vector< Analyzer::Expr * > &target_exprs)
 
bool anonymous_namespace{GroupByAndAggregate.cpp}::expr_is_rowid (const Analyzer::Expr *expr, const Catalog_Namespace::Catalog &cat)
 
bool anonymous_namespace{GroupByAndAggregate.cpp}::has_count_distinct (const RelAlgExecutionUnit &ra_exe_unit)
 
bool anonymous_namespace{GroupByAndAggregate.cpp}::is_column_range_too_big_for_perfect_hash (const ColRangeInfo &col_range_info, const int64_t max_entry_count)
 
bool anonymous_namespace{GroupByAndAggregate.cpp}::cardinality_estimate_less_than_column_range (const int64_t cardinality_estimate, const ColRangeInfo &col_range_info)
 
ColRangeInfo anonymous_namespace{GroupByAndAggregate.cpp}::get_expr_range_info (const RelAlgExecutionUnit &ra_exe_unit, const std::vector< InputTableInfo > &query_infos, const Analyzer::Expr *expr, Executor *executor)
 
KeylessInfo anonymous_namespace{GroupByAndAggregate.cpp}::get_keyless_info (const RelAlgExecutionUnit &ra_exe_unit, const std::vector< InputTableInfo > &query_infos, const bool is_group_by, Executor *executor)
 
CountDistinctDescriptors anonymous_namespace{GroupByAndAggregate.cpp}::init_count_distinct_descriptors (const RelAlgExecutionUnit &ra_exe_unit, const std::vector< InputTableInfo > &query_infos, const ExecutorDeviceType device_type, Executor *executor)
 
RUNTIME_EXPORT void agg_count_distinct (int64_t *agg, const int64_t val)
 
RUNTIME_EXPORT void agg_count_distinct_skip_val (int64_t *agg, const int64_t val, const int64_t skip_val)
 
RUNTIME_EXPORT void agg_approx_quantile (int64_t *agg, const double val)
 

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_leaf_count
 

Macro Definition Documentation

#define CUR_FUNC   executor_->cgen_state_->current_func_

Definition at line 314 of file GroupByAndAggregate.cpp.

Referenced by GroupByAndAggregate::codegenAggArg().

#define LL_BOOL (   v)    executor_->cgen_state_->llBool(v)

Definition at line 310 of file GroupByAndAggregate.cpp.

Referenced by GroupByAndAggregate::codegenOutputSlot().

#define LL_FP (   v)    executor_->cgen_state_->llFp(v)

Definition at line 312 of file GroupByAndAggregate.cpp.

Referenced by GroupByAndAggregate::codegenOutputSlot().

Function Documentation

RUNTIME_EXPORT void agg_approx_quantile ( int64_t *  agg,
const double  val 
)

Definition at line 1621 of file GroupByAndAggregate.cpp.

References quantile::detail::TDigest< RealType, IndexType >::allocate().

1621  {
1622  auto* t_digest = reinterpret_cast<quantile::TDigest*>(*agg);
1623  t_digest->allocate();
1624  t_digest->add(val);
1625 }
DEVICE void allocate()
Definition: quantile.h:590

+ Here is the call graph for this function:

RUNTIME_EXPORT void agg_count_distinct ( int64_t *  agg,
const int64_t  val 
)

Definition at line 1609 of file GroupByAndAggregate.cpp.

Referenced by agg_count_distinct_skip_val().

1609  {
1610  reinterpret_cast<std::set<int64_t>*>(*agg)->insert(val);
1611 }

+ Here is the caller graph for this function:

RUNTIME_EXPORT void agg_count_distinct_skip_val ( int64_t *  agg,
const int64_t  val,
const int64_t  skip_val 
)

Definition at line 1613 of file GroupByAndAggregate.cpp.

References agg_count_distinct().

1615  {
1616  if (val != skip_val) {
1617  agg_count_distinct(agg, val);
1618  }
1619 }
RUNTIME_EXPORT void agg_count_distinct(int64_t *agg, const int64_t val)

+ Here is the call graph for this function:

Variable Documentation

bool g_cluster false

Definition at line 51 of file GroupByAndAggregate.cpp.

size_t g_leaf_count

Definition at line 78 of file ParserNode.cpp.

size_t g_watchdog_baseline_max_groups {120000000}