OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WindowProjectNodeContext Class Reference

#include <WindowContext.h>

Public Member Functions

void addWindowFunctionContext (std::unique_ptr< WindowFunctionContext > window_function_context, const size_t target_index)
 
const WindowFunctionContextactivateWindowFunctionContext (Executor *executor, const size_t target_index) const
 

Static Public Member Functions

static void resetWindowFunctionContext (Executor *executor)
 
static WindowFunctionContextgetActiveWindowFunctionContext (Executor *executor)
 
static WindowProjectNodeContextcreate (Executor *executor)
 
static const
WindowProjectNodeContext
get (Executor *executor)
 
static void reset (Executor *executor)
 

Private Attributes

std::unordered_map< size_t,
std::unique_ptr
< WindowFunctionContext > > 
window_contexts_
 

Detailed Description

Definition at line 177 of file WindowContext.h.

Member Function Documentation

const WindowFunctionContext * WindowProjectNodeContext::activateWindowFunctionContext ( Executor executor,
const size_t  target_index 
) const

Definition at line 807 of file WindowContext.cpp.

References CHECK.

Referenced by Executor::codegenWindowFunction().

809  {
810  const auto it = window_contexts_.find(target_index);
811  CHECK(it != window_contexts_.end());
812  executor->active_window_function_ = it->second.get();
813  return executor->active_window_function_;
814 }
std::unordered_map< size_t, std::unique_ptr< WindowFunctionContext > > window_contexts_
#define CHECK(condition)
Definition: Logger.h:197

+ Here is the caller graph for this function:

void WindowProjectNodeContext::addWindowFunctionContext ( std::unique_ptr< WindowFunctionContext window_function_context,
const size_t  target_index 
)

Definition at line 799 of file WindowContext.cpp.

References CHECK.

801  {
802  const auto it_ok = window_contexts_.emplace(
803  std::make_pair(target_index, std::move(window_function_context)));
804  CHECK(it_ok.second);
805 }
std::unordered_map< size_t, std::unique_ptr< WindowFunctionContext > > window_contexts_
#define CHECK(condition)
Definition: Logger.h:197
WindowProjectNodeContext * WindowProjectNodeContext::create ( Executor executor)
static

Definition at line 825 of file WindowContext.cpp.

References get().

Referenced by RelAlgExecutor::computeWindow().

825  {
826  executor->window_project_node_context_owned_ =
827  std::make_unique<WindowProjectNodeContext>();
828  return executor->window_project_node_context_owned_.get();
829 }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const WindowProjectNodeContext * WindowProjectNodeContext::get ( Executor executor)
static

Definition at line 831 of file WindowContext.cpp.

References get().

Referenced by Executor::codegenWindowFunction(), Executor::codegenWindowFunctionAggregate(), create(), and get().

831  {
832  return executor->window_project_node_context_owned_.get();
833 }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WindowFunctionContext * WindowProjectNodeContext::getActiveWindowFunctionContext ( Executor executor)
static
void WindowProjectNodeContext::reset ( Executor executor)
static

Definition at line 835 of file WindowContext.cpp.

Referenced by RelAlgExecutor::executeRelAlgStep(), and RelAlgExecutor::getOuterFragmentCount().

835  {
836  executor->window_project_node_context_owned_ = nullptr;
837  executor->active_window_function_ = nullptr;
838 }

+ Here is the caller graph for this function:

void WindowProjectNodeContext::resetWindowFunctionContext ( Executor executor)
static

Definition at line 816 of file WindowContext.cpp.

Referenced by TargetExprCodegen::codegen().

816  {
817  executor->active_window_function_ = nullptr;
818 }

+ Here is the caller graph for this function:

Member Data Documentation

std::unordered_map<size_t, std::unique_ptr<WindowFunctionContext> > WindowProjectNodeContext::window_contexts_
private

Definition at line 210 of file WindowContext.h.


The documentation for this class was generated from the following files: