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

#include <WindowContext.h>

+ Collaboration diagram for WindowProjectNodeContext:

Public Member Functions

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

Static Public Member Functions

static void resetWindowFunctionContext ()
 
static WindowFunctionContextgetActiveWindowFunctionContext ()
 
static WindowProjectNodeContextcreate ()
 
static const
WindowProjectNodeContext
get ()
 
static void reset ()
 

Private Attributes

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

Static Private Attributes

static std::unique_ptr
< WindowProjectNodeContext
s_instance_
 
static WindowFunctionContexts_active_window_function_
 

Detailed Description

Definition at line 173 of file WindowContext.h.

Member Function Documentation

const WindowFunctionContext * WindowProjectNodeContext::activateWindowFunctionContext ( const size_t  target_index) const

Definition at line 803 of file WindowContext.cpp.

References CHECK().

Referenced by Executor::codegenWindowFunction().

804  {
805  const auto it = window_contexts_.find(target_index);
806  CHECK(it != window_contexts_.end());
807  s_active_window_function_ = it->second.get();
809 }
CHECK(cgen_state)
static WindowFunctionContext * s_active_window_function_
std::unordered_map< size_t, std::unique_ptr< WindowFunctionContext > > window_contexts_

+ Here is the call graph for this function:

+ 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 795 of file WindowContext.cpp.

References CHECK().

797  {
798  const auto it_ok = window_contexts_.emplace(
799  std::make_pair(target_index, std::move(window_function_context)));
800  CHECK(it_ok.second);
801 }
CHECK(cgen_state)
std::unordered_map< size_t, std::unique_ptr< WindowFunctionContext > > window_contexts_

+ Here is the call graph for this function:

WindowProjectNodeContext * WindowProjectNodeContext::create ( )
static

Definition at line 819 of file WindowContext.cpp.

References get().

Referenced by RelAlgExecutor::computeWindow().

819  {
820  s_instance_ = std::make_unique<WindowProjectNodeContext>();
821  return s_instance_.get();
822 }
static std::unique_ptr< WindowProjectNodeContext > s_instance_

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const WindowProjectNodeContext * WindowProjectNodeContext::get ( )
static

Definition at line 824 of file WindowContext.cpp.

References get().

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

824  {
825  return s_instance_.get();
826 }
static std::unique_ptr< WindowProjectNodeContext > s_instance_

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 828 of file WindowContext.cpp.

Referenced by RelAlgExecutor::executeRelAlgStep().

828  {
829  s_instance_ = nullptr;
830  s_active_window_function_ = nullptr;
831 }
static std::unique_ptr< WindowProjectNodeContext > s_instance_
static WindowFunctionContext * s_active_window_function_

+ Here is the caller graph for this function:

void WindowProjectNodeContext::resetWindowFunctionContext ( )
static

Definition at line 811 of file WindowContext.cpp.

Referenced by TargetExprCodegen::codegen().

811  {
812  s_active_window_function_ = nullptr;
813 }
static WindowFunctionContext * s_active_window_function_

+ Here is the caller graph for this function:

Member Data Documentation

WindowFunctionContext* WindowProjectNodeContext::s_active_window_function_
staticprivate

Definition at line 210 of file WindowContext.h.

std::unique_ptr< WindowProjectNodeContext > WindowProjectNodeContext::s_instance_
staticprivate

Definition at line 208 of file WindowContext.h.

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

Definition at line 205 of file WindowContext.h.


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