OmniSciDB  04ee39c94c
QueryMemoryDescriptor.h File Reference

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

#include "../CompilationOptions.h"
#include "../CountDistinct.h"
#include "ColSlotContext.h"
#include "Types.h"
#include <boost/optional.hpp>
#include "Shared/Logger.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <numeric>
#include <unordered_map>
#include <vector>
#include <Shared/SqlTypesLayout.h>
#include <Shared/TargetInfo.h>
+ 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.


class  QueryMemoryDescriptor


enum  GroupByMemSharing { GroupByMemSharing::Shared, GroupByMemSharing::SharedForKeylessOneColumnKnownRange }


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)


bool g_cluster

Detailed Description

Descriptor for the result set buffer layout.

Alex Suhan Copyright (c) 2014 MapD Technologies, Inc. All rights reserved.

Definition in file QueryMemoryDescriptor.h.

Enumeration Type Documentation

◆ GroupByMemSharing

enum GroupByMemSharing

Definition at line 58 of file QueryMemoryDescriptor.h.

Function Documentation

◆ set_notnull()

void set_notnull ( TargetInfo target,
const bool  not_null 

Definition at line 358 of file QueryMemoryDescriptor.h.

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

Referenced by init_agg_val_vec(), and target_exprs_to_infos().

358  {
359  target.skip_null_val = !not_null;
360  auto new_type = get_compact_type(target);
361  new_type.set_notnull(not_null);
362  set_compact_type(target, new_type);
363 }
void set_compact_type(TargetInfo &target, const SQLTypeInfo &new_type)
bool skip_null_val
Definition: TargetInfo.h:44
const SQLTypeInfo get_compact_type(const TargetInfo &target)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ target_exprs_to_infos()

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

Definition at line 1152 of file QueryMemoryDescriptor.cpp.

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

Referenced by SpeculativeTopNMap::asRows(), QueryMemoryInitializer::QueryMemoryInitializer(), and set_notnull().

1154  {
1155  std::vector<TargetInfo> target_infos;
1156  for (const auto target_expr : targets) {
1157  auto target = get_target_info(target_expr, g_bigint_count);
1158  if (query_mem_desc.getQueryDescriptionType() ==
1160  set_notnull(target, false);
1161  target.sql_type.set_notnull(false);
1162  }
1163  target_infos.push_back(target);
1164  }
1165  return target_infos;
1166 }
TargetInfo get_target_info(const PointerType target_expr, const bool bigint_count)
Definition: TargetInfo.h:65
bool g_bigint_count
QueryDescriptionType getQueryDescriptionType() 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

◆ g_cluster