OmniSciDB  2e3a973ef4
anonymous_namespace{ExecutionKernel.cpp} Namespace Reference

Functions

bool needs_skip_result (const ResultSetPtr &res)
 
bool query_has_inner_join (const RelAlgExecutionUnit &ra_exe_unit)
 
bool need_to_hold_chunk (const Chunk_NS::Chunk *chunk, const RelAlgExecutionUnit &ra_exe_unit)
 

Function Documentation

◆ need_to_hold_chunk()

bool anonymous_namespace{ExecutionKernel.cpp}::need_to_hold_chunk ( const Chunk_NS::Chunk chunk,
const RelAlgExecutionUnit ra_exe_unit 
)

Definition at line 44 of file ExecutionKernel.cpp.

References CHECK, ColumnDescriptor::columnId, ColumnDescriptor::columnType, Chunk_NS::Chunk::getColumnDesc(), kENCODING_NONE, ColumnDescriptor::tableId, and RelAlgExecutionUnit::target_exprs.

Referenced by ExecutionKernel::runImpl().

45  {
46  CHECK(chunk->getColumnDesc());
47  const auto chunk_ti = chunk->getColumnDesc()->columnType;
48  if (chunk_ti.is_array() ||
49  (chunk_ti.is_string() && chunk_ti.get_compression() == kENCODING_NONE)) {
50  for (const auto target_expr : ra_exe_unit.target_exprs) {
51  const auto col_var = dynamic_cast<const Analyzer::ColumnVar*>(target_expr);
52  if (col_var && col_var->get_column_id() == chunk->getColumnDesc()->columnId &&
53  col_var->get_table_id() == chunk->getColumnDesc()->tableId) {
54  return true;
55  }
56  }
57  }
58  return false;
59 }
std::vector< Analyzer::Expr * > target_exprs
const ColumnDescriptor * getColumnDesc() const
Definition: Chunk.h:53
#define CHECK(condition)
Definition: Logger.h:197
SQLTypeInfo columnType
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ needs_skip_result()

bool anonymous_namespace{ExecutionKernel.cpp}::needs_skip_result ( const ResultSetPtr res)

Definition at line 31 of file ExecutionKernel.cpp.

Referenced by SharedKernelContext::addDeviceResults().

31  {
32  return !res || res->definitelyHasNoRows();
33 }
+ Here is the caller graph for this function:

◆ query_has_inner_join()

bool anonymous_namespace{ExecutionKernel.cpp}::query_has_inner_join ( const RelAlgExecutionUnit ra_exe_unit)
inline

Definition at line 35 of file ExecutionKernel.cpp.

References INNER, and RelAlgExecutionUnit::join_quals.

Referenced by ExecutionKernel::runImpl().

35  {
36  return (std::count_if(ra_exe_unit.join_quals.begin(),
37  ra_exe_unit.join_quals.end(),
38  [](const auto& join_condition) {
39  return join_condition.type == JoinType::INNER;
40  }) > 0);
41 }
const JoinQualsPerNestingLevel join_quals
+ Here is the caller graph for this function: