OmniSciDB  d2f719934e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StreamingTopN.cpp File Reference
#include "StreamingTopN.h"
#include "RelAlgExecutor.h"
#include "Shared/checked_alloc.h"
#include "TopKSort.h"
+ Include dependency graph for StreamingTopN.cpp:

Go to the source code of this file.




size_t streaming_top_n::get_heap_size (const size_t row_size, const size_t n, const size_t thread_count)
size_t streaming_top_n::get_rows_offset_of_heaps (const size_t n, const size_t thread_count)
std::vector< int8_t > streaming_top_n::get_rows_copy_from_heaps (const int64_t *heaps, const size_t heaps_size, const size_t n, const size_t thread_count)
size_t get_heap_key_slot_index (const std::vector< Analyzer::Expr * > &target_exprs, const size_t target_idx)

Function Documentation

size_t get_heap_key_slot_index ( const std::vector< Analyzer::Expr * > &  target_exprs,
const size_t  target_idx 

Definition at line 46 of file StreamingTopN.cpp.

References advance_slot(), g_bigint_count, get_target_info(), and i.

Referenced by GroupByAndAggregate::codegenOutputSlot().

47  {
48  size_t slot_idx = 0;
49  for (size_t i = 0; i < target_idx; ++i) {
50  auto agg_info = get_target_info(target_exprs[i], g_bigint_count);
51  slot_idx = advance_slot(slot_idx, agg_info, false);
52  }
53  return slot_idx;
54 }
TargetInfo get_target_info(const PointerType target_expr, const bool bigint_count)
Definition: TargetInfo.h:92
size_t advance_slot(const size_t j, const TargetInfo &target_info, const bool separate_varlen_storage)
bool g_bigint_count

+ Here is the call graph for this function:

+ Here is the caller graph for this function: