OmniSciDB
94e8789169
|
#include "AggregatedColRange.h"
#include "BufferCompaction.h"
#include "CartesianProduct.h"
#include "CgenState.h"
#include "CodeCache.h"
#include "DateTimeUtils.h"
#include "Descriptors/QueryFragmentDescriptor.h"
#include "ExecutionKernel.h"
#include "GpuSharedMemoryContext.h"
#include "GroupByAndAggregate.h"
#include "LoopControlFlow/JoinLoop.h"
#include "NvidiaKernel.h"
#include "PlanState.h"
#include "RelAlgExecutionUnit.h"
#include "RelAlgTranslator.h"
#include "StringDictionaryGenerations.h"
#include "TableGenerations.h"
#include "TargetMetaInfo.h"
#include "WindowContext.h"
#include "QueryEngine/Descriptors/QueryCompilationDescriptor.h"
#include "QueryEngine/JoinHashTable/HashJoin.h"
#include "../Logger/Logger.h"
#include "../Shared/SystemParameters.h"
#include "../Shared/mapd_shared_mutex.h"
#include "../Shared/measure.h"
#include "../Shared/thread_count.h"
#include "../Shared/toString.h"
#include "../StringDictionary/LruCache.hpp"
#include "../StringDictionary/StringDictionary.h"
#include "../StringDictionary/StringDictionaryProxy.h"
#include "DataMgr/Chunk/Chunk.h"
#include "ThriftHandler/CommandLineOptions.h"
#include <llvm/IR/Function.h>
#include <llvm/IR/Value.h>
#include <llvm/Linker/Linker.h>
#include <llvm/Transforms/Utils/ValueMapper.h>
#include <rapidjson/document.h>
#include <algorithm>
#include <atomic>
#include <condition_variable>
#include <cstddef>
#include <cstdlib>
#include <deque>
#include <functional>
#include <limits>
#include <map>
#include <mutex>
#include <stack>
#include <unordered_map>
#include <unordered_set>
Go to the source code of this file.
Classes | |
class | QuerySessionStatus |
class | WatchdogException |
class | CompilationRetryNoLazyFetch |
class | CompilationRetryNewScanLimit |
class | TooManyLiterals |
class | CompilationRetryNoCompaction |
class | QueryMustRunOnCpu |
class | ParseIRError |
class | SringConstInResultSet |
class | UpdateLogForFragment |
class | Executor |
struct | Executor::JoinHashTableOrError |
struct | Executor::GroupColLLVMValue |
class | Executor::FetchCacheAnchor |
Typedefs | |
using | QueryCompilationDescriptorOwned = std::unique_ptr< QueryCompilationDescriptor > |
using | QueryMemoryDescriptorOwned = std::unique_ptr< QueryMemoryDescriptor > |
using | QuerySessionId = std::string |
using | CurrentQueryStatus = std::pair< QuerySessionId, std::string > |
using | InterruptFlagMap = std::map< QuerySessionId, bool > |
using | QuerySessionMap = std::map< const QuerySessionId, std::map< std::string, QuerySessionStatus >> |
using | RowDataProvider = Fragmenter_Namespace::RowDataProvider |
using | LLVMValueVector = std::vector< llvm::Value * > |
Functions | |
void | read_udf_gpu_module (const std::string &udf_ir_filename) |
void | read_udf_cpu_module (const std::string &udf_ir_filename) |
bool | is_udf_module_present (bool cpu_only=false) |
void | read_rt_udf_gpu_module (const std::string &udf_ir) |
void | read_rt_udf_cpu_module (const std::string &udf_ir) |
bool | is_rt_udf_module_present (bool cpu_only=false) |
llvm::Value * | get_arg_by_name (llvm::Function *func, const std::string &name) |
uint32_t | log2_bytes (const uint32_t bytes) |
const ColumnDescriptor * | get_column_descriptor (const int col_id, const int table_id, const Catalog_Namespace::Catalog &cat) |
const Analyzer::Expr * | extract_cast_arg (const Analyzer::Expr *expr) |
std::string | numeric_type_name (const SQLTypeInfo &ti) |
const ColumnDescriptor * | get_column_descriptor_maybe (const int col_id, const int table_id, const Catalog_Namespace::Catalog &cat) |
const ResultSetPtr & | get_temporary_table (const TemporaryTables *temporary_tables, const int table_id) |
const SQLTypeInfo | get_column_type (const int col_id, const int table_id, const ColumnDescriptor *cd, const TemporaryTables *temporary_tables) |
template<typename PtrTy > | |
const ColumnarResults * | rows_to_columnar_results (std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, const PtrTy &result, const int number) |
std::vector< Analyzer::Expr * > | get_exprs_not_owned (const std::vector< std::shared_ptr< Analyzer::Expr >> &exprs) |
const ColumnarResults * | columnarize_result (std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, const ResultSetPtr &result, const int frag_id) |
std::ostream & | operator<< (std::ostream &, FetchResult const &) |
std::string | get_null_check_suffix (const SQLTypeInfo &lhs_ti, const SQLTypeInfo &rhs_ti) |
bool | is_unnest (const Analyzer::Expr *expr) |
bool | is_trivial_loop_join (const std::vector< InputTableInfo > &query_infos, const RelAlgExecutionUnit &ra_exe_unit) |
std::unordered_set< int > | get_available_gpus (const Catalog_Namespace::Catalog &cat) |
size_t | get_context_count (const ExecutorDeviceType device_type, const size_t cpu_count, const size_t gpu_count) |
void | register_buffer_with_executor_rsm (int64_t exec, int8_t *buffer) |
const Analyzer::Expr * | remove_cast_to_int (const Analyzer::Expr *expr) |
using CurrentQueryStatus = std::pair<QuerySessionId, std::string> |
using InterruptFlagMap = std::map<QuerySessionId, bool> |
using LLVMValueVector = std::vector<llvm::Value*> |
using QueryCompilationDescriptorOwned = std::unique_ptr<QueryCompilationDescriptor> |
using QueryMemoryDescriptorOwned = std::unique_ptr<QueryMemoryDescriptor> |
using QuerySessionId = std::string |
using QuerySessionMap = std::map<const QuerySessionId, std::map<std::string, QuerySessionStatus>> |
|
inline |
Definition at line 268 of file Execute.h.
References CHECK_EQ, INJECT_TIMER, and rows_to_columnar_results().
Referenced by ColumnFetcher::getOneColumnFragment(), and ColumnFetcher::getResultSetColumn().
|
inline |
Definition at line 197 of file Execute.h.
References kCAST.
Referenced by CodeGenerator::codegen(), CodeGenerator::createInValuesBitmap(), and anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor::visitBinOper().
|
inline |
Definition at line 162 of file Execute.h.
References CHECK, and setup::name.
Referenced by GroupByAndAggregate::codegen(), HashJoin::codegenHashTableLoad(), PerfectJoinHashTable::codegenHashTableLoad(), CodeGenerator::codegenHoistedConstantsLoads(), GroupByAndAggregate::codegenOutputSlot(), CodeGenerator::codegenRowId(), GroupByAndAggregate::getAdditionalLiteral(), and Executor::preloadFragOffsets().
std::unordered_set<int> get_available_gpus | ( | const Catalog_Namespace::Catalog & | cat | ) |
Definition at line 1028 of file Execute.cpp.
References CHECK_GT, Data_Namespace::DataMgr::getCudaMgr(), Catalog_Namespace::Catalog::getDataMgr(), CudaMgr_Namespace::CudaMgr::getDeviceCount(), and Data_Namespace::DataMgr::gpusPresent().
Referenced by Executor::executeWorkUnitImpl().
|
inline |
Definition at line 187 of file Execute.h.
References CHECK, CHECK_GT, and Catalog_Namespace::Catalog::getMetadataForColumn().
Referenced by CodeGenerator::codegenColVar(), RelAlgExecutor::executeSimpleInsert(), get_column_descriptor_maybe(), Executor::getColLazyFetchInfo(), ColumnFetcher::getOneTableColumnFragment(), PlanState::isLazyFetchColumn(), RelAlgExecutor::isRowidLookup(), and Executor::skipFragment().
|
inline |
Definition at line 216 of file Execute.h.
References CHECK, and get_column_descriptor().
Referenced by anonymous_namespace{GroupByAndAggregate.cpp}::expr_is_rowid(), PerfectJoinHashTable::fetchColumnsForDevice(), OverlapsJoinHashTable::fetchColumnsForDevice(), BaselineJoinHashTable::fetchColumnsForDevice(), Executor::getColumnDescriptor(), ColumnFetcher::getOneColumnFragment(), Executor::getPhysicalColumnDescriptor(), needs_dictionary_translation(), normalize_column_pair(), anonymous_namespace{QueryMemoryDescriptor.cpp}::target_expr_proj_indices(), and anonymous_namespace{Execute.cpp}::try_get_column_descriptor().
|
inline |
Definition at line 232 of file Execute.h.
References CHECK, CHECK_EQ, ColumnDescriptor::columnId, ColumnDescriptor::columnType, get_temporary_table(), and ColumnDescriptor::tableId.
Referenced by ColumnFetcher::getOneTableColumnFragment(), needs_dictionary_translation(), and normalize_column_pair().
size_t get_context_count | ( | const ExecutorDeviceType | device_type, |
const size_t | cpu_count, | ||
const size_t | gpu_count | ||
) |
Definition at line 1040 of file Execute.cpp.
References GPU.
Referenced by Executor::executeWorkUnitImpl().
|
inline |
Definition at line 259 of file Execute.h.
Referenced by RelAlgExecutor::createFilterWorkUnit(), RelAlgExecutor::createProjectWorkUnit(), RelAlgExecutor::createTableFunctionWorkUnit(), RelAlgExecutor::createUnionWorkUnit(), and anonymous_namespace{RelAlgExecutor.cpp}::get_inputs_meta().
|
inline |
Definition at line 1117 of file Execute.h.
References CHECK, and SQLTypeInfo::get_notnull().
Referenced by CodeGenerator::codegenCmp(), CodeGenerator::codegenDeciDiv(), CodeGenerator::codegenFpArith(), CodeGenerator::codegenIntArith(), and CodeGenerator::codegenStrCmp().
|
inline |
Definition at line 224 of file Execute.h.
References CHECK, and CHECK_LT.
Referenced by anonymous_namespace{ExternalExecutor.cpp}::create_table_schema(), RelAlgExecutor::executeDelete(), RelAlgExecutor::executeProject(), RelAlgExecutor::executeUpdate(), get_column_type(), ColumnFetcher::getOneColumnFragment(), and ColumnFetcher::getResultSetColumn().
bool is_rt_udf_module_present | ( | bool | cpu_only = false | ) |
Definition at line 1666 of file NativeCodegen.cpp.
bool is_trivial_loop_join | ( | const std::vector< InputTableInfo > & | query_infos, |
const RelAlgExecutionUnit & | ra_exe_unit | ||
) |
Definition at line 1148 of file Execute.cpp.
References CHECK, g_trivial_loop_join_threshold, generate_TableFunctionsFactory_init::i, and RelAlgExecutionUnit::input_descs.
Referenced by anonymous_namespace{IRCodegen.cpp}::check_if_loop_join_is_allowed().
bool is_udf_module_present | ( | bool | cpu_only = false | ) |
Definition at line 1662 of file NativeCodegen.cpp.
|
inline |
Definition at line 1133 of file Execute.h.
References Analyzer::UOper::get_optype(), and kUNNEST.
Referenced by CodeGenerator::codegen(), and CodeGenerator::codegenCmp().
|
inline |
Definition at line 172 of file Execute.h.
Referenced by CodeGenerator::codegen(), GroupByAndAggregate::codegenAggArg(), CodeGenerator::codegenFunctionOperCastArgs(), CodeGenerator::codegenGeoArgs(), and Executor::groupByColumnCodegen().
|
inline |
Definition at line 205 of file Execute.h.
References CHECK, SQLTypeInfo::get_compression(), SQLTypeInfo::get_logical_size(), SQLTypeInfo::get_type(), SQLTypeInfo::is_boolean(), SQLTypeInfo::is_decimal(), SQLTypeInfo::is_fp(), SQLTypeInfo::is_integer(), SQLTypeInfo::is_string(), SQLTypeInfo::is_time(), SQLTypeInfo::is_timeinterval(), kDOUBLE, kENCODING_DICT, and to_string().
Referenced by TargetExprCodegen::codegenAggregate(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFpArith(), CodeGenerator::codegenQualifierCmp(), CodeGenerator::codegenUMinus(), CodeGenerator::codgenAdjustFixedEncNull(), Executor::groupByColumnCodegen(), and anonymous_namespace{ArithmeticIR.cpp}::numeric_or_time_interval_type_name().
std::ostream& operator<< | ( | std::ostream & | , |
FetchResult const & | |||
) |
Definition at line 2343 of file Execute.cpp.
References FetchResult::col_buffers, FetchResult::frag_offsets, FetchResult::num_rows, and shared::printContainer().
void read_rt_udf_cpu_module | ( | const std::string & | udf_ir | ) |
Definition at line 1723 of file NativeCodegen.cpp.
Referenced by DBHandler::register_runtime_extension_functions().
void read_rt_udf_gpu_module | ( | const std::string & | udf_ir | ) |
Definition at line 1700 of file NativeCodegen.cpp.
Referenced by DBHandler::register_runtime_extension_functions().
void read_udf_cpu_module | ( | const std::string & | udf_ir_filename | ) |
Definition at line 1689 of file NativeCodegen.cpp.
Referenced by UdfCompiler::readCpuCompiledModule().
void read_udf_gpu_module | ( | const std::string & | udf_ir_filename | ) |
Definition at line 1670 of file NativeCodegen.cpp.
Referenced by UdfCompiler::readGpuCompiledModule().
void register_buffer_with_executor_rsm | ( | int64_t | exec, |
int8_t * | buffer | ||
) |
Definition at line 217 of file ExtensionsIR.cpp.
const Analyzer::Expr* remove_cast_to_int | ( | const Analyzer::Expr * | expr | ) |
Definition at line 538 of file ColumnIR.cpp.
References Analyzer::Expr::get_type_info(), and kCAST.
Referenced by anonymous_namespace{DateTimePlusRewrite.cpp}::get_dt_field(), and CodeGenerator::hashJoinLhs().
|
inline |
Definition at line 247 of file Execute.h.
References get_logical_type_info(), and generate_TableFunctionsFactory_init::i.
Referenced by columnarize_result().