OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WindowContext.h File Reference
#include "Analyzer/Analyzer.h"
#include "DataMgr/Chunk/Chunk.h"
#include "QueryEngine/JoinHashTable/HashJoin.h"
#include "QueryEngine/Utils/SegmentTree.h"
#include "Shared/sqltypes.h"
#include <functional>
#include <unordered_map>
+ Include dependency graph for WindowContext.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AggregateTreeForWindowFraming
 
struct  WindowFrameBoundFuncArgs
 
struct  WindowPartitionBufferPtrs
 
class  WindowFunctionContext
 
struct  WindowFunctionContext::AggregateState
 
class  WindowProjectNodeContext
 

Functions

bool window_function_is_value (const SqlWindowFunctionKind kind)
 
bool window_function_is_aggregate (const SqlWindowFunctionKind kind)
 
bool window_function_conditional_aggregate (const SqlWindowFunctionKind kind)
 
bool window_function_requires_peer_handling (const Analyzer::WindowFunction *window_func)
 

Function Documentation

bool window_function_conditional_aggregate ( const SqlWindowFunctionKind  kind)
inline

Definition at line 59 of file WindowContext.h.

References COUNT_IF, and SUM_IF.

Referenced by Executor::codegenWindowFunctionAggregateCalls(), and RelAlgTranslator::translateWindowFunction().

59  {
60  switch (kind) {
63  return true;
64  default:
65  return false;
66  }
67 }

+ Here is the caller graph for this function:

bool window_function_is_value ( const SqlWindowFunctionKind  kind)
inline

Definition at line 29 of file WindowContext.h.

References FIRST_VALUE, LAG, LAST_VALUE, LEAD, and NTH_VALUE.

Referenced by RelAlgTranslator::translateWindowFunction().

+ Here is the caller graph for this function:

bool window_function_requires_peer_handling ( const Analyzer::WindowFunction window_func)

Definition at line 531 of file WindowContext.cpp.

References Analyzer::WindowFunction::getKind(), Analyzer::WindowFunction::getOrderKeys(), MAX, MIN, and window_function_is_aggregate().

Referenced by TargetExprCodegen::codegenAggregate(), WindowFunctionContext::compute(), and WindowFunctionContext::computePartitionBuffer().

531  {
532  if (!window_function_is_aggregate(window_func->getKind())) {
533  return false;
534  }
535  if (window_func->getOrderKeys().empty()) {
536  return true;
537  }
538  switch (window_func->getKind()) {
541  return false;
542  }
543  default: {
544  return true;
545  }
546  }
547 }
SqlWindowFunctionKind getKind() const
Definition: Analyzer.h:2576
const std::vector< std::shared_ptr< Analyzer::Expr > > & getOrderKeys() const
Definition: Analyzer.h:2584
bool window_function_is_aggregate(const SqlWindowFunctionKind kind)
Definition: WindowContext.h:43

+ Here is the call graph for this function:

+ Here is the caller graph for this function: