OmniSciDB  04ee39c94c
InputMetadata.h File Reference
#include "Descriptors/InputDescriptors.h"
#include "RelAlgExecutionUnit.h"
#include <unordered_map>
+ Include dependency graph for InputMetadata.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  InputTableInfo
 
class  InputTableInfoCache
 

Namespaces

 Catalog_Namespace
 

Typedefs

using TemporaryTables = std::unordered_map< int, const ResultSetPtr & >
 

Functions

size_t get_frag_count_of_table (const int table_id, Executor *executor)
 
std::vector< InputTableInfoget_table_infos (const std::vector< InputDescriptor > &input_descs, Executor *executor)
 
std::vector< InputTableInfoget_table_infos (const RelAlgExecutionUnit &ra_exe_unit, Executor *executor)
 

Typedef Documentation

◆ TemporaryTables

using TemporaryTables = std::unordered_map<int, const ResultSetPtr&>

Definition at line 31 of file InputMetadata.h.

Function Documentation

◆ get_frag_count_of_table()

size_t get_frag_count_of_table ( const int  table_id,
Executor executor 
)

Definition at line 236 of file InputMetadata.cpp.

References CHECK, and CHECK_GE.

236  {
237  const auto temporary_tables = executor->getTemporaryTables();
238  CHECK(temporary_tables);
239  auto it = temporary_tables->find(table_id);
240  if (it != temporary_tables->end()) {
241  CHECK_GE(int(0), table_id);
242  return size_t(1);
243  } else {
244  const auto table_info = executor->getTableInfo(table_id);
245  return table_info.fragments.size();
246  }
247 }
#define CHECK_GE(x, y)
Definition: Logger.h:200
#define CHECK(condition)
Definition: Logger.h:187

◆ get_table_infos() [1/2]

std::vector<InputTableInfo> get_table_infos ( const std::vector< InputDescriptor > &  input_descs,
Executor executor 
)

Definition at line 249 of file InputMetadata.cpp.

References anonymous_namespace{InputMetadata.cpp}::collect_table_infos().

Referenced by RelAlgExecutor::computeWindow(), RelAlgExecutor::createCompoundWorkUnit(), RelAlgExecutor::createModifyCompoundWorkUnit(), RelAlgExecutor::createProjectWorkUnit(), RelAlgExecutor::executeDeleteViaCompound(), RelAlgExecutor::executeDeleteViaProject(), RelAlgExecutor::executeUpdateViaCompound(), RelAlgExecutor::executeUpdateViaProject(), RelAlgExecutor::executeWorkUnit(), get_table_infos(), RelAlgExecutor::getFilteredCountAll(), RelAlgExecutor::getFilterSelectivity(), RelAlgExecutor::getNDVEstimation(), RelAlgExecutor::handleOutOfMemoryRetry(), TableOptimizer::recomputeMetadata(), and RelAlgExecutor::selectFiltersToBePushedDown().

251  {
252  std::vector<InputTableInfo> table_infos;
253  collect_table_infos(table_infos, input_descs, executor);
254  return table_infos;
255 }
void collect_table_infos(std::vector< InputTableInfo > &table_infos, const std::vector< InputDescriptor > &input_descs, Executor *executor)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_table_infos() [2/2]

std::vector<InputTableInfo> get_table_infos ( const RelAlgExecutionUnit ra_exe_unit,
Executor executor 
)

Definition at line 257 of file InputMetadata.cpp.

References anonymous_namespace{InputMetadata.cpp}::collect_table_infos(), get_table_infos(), INJECT_TIMER, and RelAlgExecutionUnit::input_descs.

258  {
260  std::vector<InputTableInfo> table_infos;
261  collect_table_infos(table_infos, ra_exe_unit.input_descs, executor);
262  return table_infos;
263 }
const std::vector< InputDescriptor > input_descs
#define INJECT_TIMER(DESC)
Definition: measure.h:91
std::vector< InputTableInfo > get_table_infos(const std::vector< InputDescriptor > &input_descs, Executor *executor)
void collect_table_infos(std::vector< InputTableInfo > &table_infos, const std::vector< InputDescriptor > &input_descs, Executor *executor)
+ Here is the call graph for this function: