OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QueryMemoryDescriptor.h File Reference

Descriptor for the result set buffer layout. More...

#include "ApproxQuantileDescriptor.h"
#include "ColSlotContext.h"
#include "Logger/Logger.h"
#include "QueryEngine/CompilationOptions.h"
#include "QueryEngine/CountDistinct.h"
#include "QueryEngine/enums.h"
#include "Shared/SqlTypesLayout.h"
#include "Shared/TargetInfo.h"
#include <boost/optional.hpp>
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <numeric>
#include <unordered_map>
#include <vector>
+ Include dependency graph for QueryMemoryDescriptor.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  StreamingTopNOOM
 
class  QueryMemoryDescriptor
 

Functions

void set_notnull (TargetInfo &target, const bool not_null)
 
std::vector< TargetInfotarget_exprs_to_infos (const std::vector< Analyzer::Expr * > &targets, const QueryMemoryDescriptor &query_mem_desc)
 

Variables

bool g_cluster
 

Detailed Description

Descriptor for the result set buffer layout.

Definition in file QueryMemoryDescriptor.h.

Function Documentation

void set_notnull ( TargetInfo target,
const bool  not_null 
)
inline

Definition at line 435 of file QueryMemoryDescriptor.h.

References get_compact_type(), set_compact_type(), and TargetInfo::skip_null_val.

Referenced by init_agg_val_vec(), and target_exprs_to_infos().

435  {
436  target.skip_null_val = !not_null;
437  auto new_type = get_compact_type(target);
438  new_type.set_notnull(not_null);
439  set_compact_type(target, new_type);
440 }
void set_compact_type(TargetInfo &target, const SQLTypeInfo &new_type)
bool skip_null_val
Definition: TargetInfo.h:54
const SQLTypeInfo get_compact_type(const TargetInfo &target)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector<TargetInfo> target_exprs_to_infos ( const std::vector< Analyzer::Expr * > &  targets,
const QueryMemoryDescriptor query_mem_desc 
)

Definition at line 1317 of file QueryMemoryDescriptor.cpp.

References QueryMemoryDescriptor::checkSlotUsesFlatBufferFormat(), g_bigint_count, get_target_info(), QueryMemoryDescriptor::getQueryDescriptionType(), heavyai::NonGroupedAggregate, and set_notnull().

Referenced by SpeculativeTopNMap::asRows(), Executor::executeTableFunction(), QueryMemoryInitializer::QueryMemoryInitializer(), ExecutionKernel::runImpl(), and thread_idx_().

1319  {
1320  std::vector<TargetInfo> target_infos;
1321  size_t index = 0;
1322  for (const auto target_expr : targets) {
1323  auto target = get_target_info(target_expr, g_bigint_count);
1324  if (query_mem_desc.getQueryDescriptionType() ==
1326  set_notnull(target, false);
1327  target.sql_type.set_notnull(false);
1328  }
1329  if (target.sql_type.supportsFlatBuffer()) {
1330  target.sql_type.setUsesFlatBuffer(
1331  query_mem_desc.checkSlotUsesFlatBufferFormat(index));
1332  }
1333  target_infos.push_back(target);
1334  index++;
1335  }
1336  return target_infos;
1337 }
NonGroupedAggregate
Definition: enums.h:58
TargetInfo get_target_info(const Analyzer::Expr *target_expr, const bool bigint_count)
Definition: TargetInfo.h:92
bool g_bigint_count
QueryDescriptionType getQueryDescriptionType() const
bool checkSlotUsesFlatBufferFormat(const size_t slot_idx) const
void set_notnull(TargetInfo &target, const bool not_null)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

bool g_cluster

Referenced by QueryMemoryDescriptor::blocksShareMemory(), RelAlgExecutor::canUseResultsetCache(), QueryFragmentDescriptor::checkDeviceMemoryUsage(), HashJoin::checkHashJoinReplicationConstraint(), GroupByAndAggregate::codegenAggCalls(), GroupByAndAggregate::codegenAggColumnPtr(), CodeGenerator::codegenCastFromString(), CodeGenerator::codegenCastNonStringToString(), Executor::codegenFrameBoundExpr(), CodeGenerator::codegenPerRowStringOper(), CodeGenerator::codegenQualifierCmp(), anonymous_namespace{RelAlgExecutor.cpp}::decide_approx_count_distinct_implementation(), anonymous_namespace{RelAlgExecutor.cpp}::do_table_reordering(), TableArchiver::dumpTable(), AlterTableAlterColumnCommand::execute(), Parser::CreateTableAsSelectStmt::execute(), RelAlgExecutor::executeRelAlgSeq(), RelAlgExecutor::executeRelAlgStep(), RelAlgExecutor::executeRelAlgSubSeq(), RelAlgExecutor::executeSort(), RelAlgExecutor::executeTableFunction(), RelAlgExecutor::executeWorkUnit(), anonymous_namespace{Execute.cpp}::fill_entries_for_empty_input(), get_count_distinct_sub_bitmap_count(), DBHandler::get_status(), RelAlgTranslator::getInIntegerSetExpr(), DBHandler::getServerRole(), anonymous_namespace{RelAlgExecutor.cpp}::handle_query_hint(), dist::is_distributed(), QueryMemoryDescriptor::isLogicalSizedColumnsAllowed(), loadGeo(), RelAlgDagBuilder::optimizeDag(), Parser::InsertIntoTableAsSelectStmt::populateData(), DBHandler::prepare_loader_generic(), RaExecutionSequence::RaExecutionSequence(), TableArchiver::restoreTable(), DBHandler::set_table_epochs(), DBHandler::sql_execute_impl(), RelAlgTranslator::translateAggregateRex(), RelAlgTranslator::translateScalarSubquery(), RelAlgTranslator::translateUoper(), use_speculative_top_n(), and anonymous_namespace{QueryMemoryDescriptor.cpp}::use_streaming_top_n().