OmniSciDB  b28c0d5765
 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 57 of file WindowContext.h.

References COUNT_IF.

Referenced by RelAlgTranslator::translateWindowFunction().

57  {
58  switch (kind) {
60  return true;
61  default:
62  return false;
63  }
64 }

+ 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, and LEAD.

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 522 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().

522  {
523  if (!window_function_is_aggregate(window_func->getKind())) {
524  return false;
525  }
526  if (window_func->getOrderKeys().empty()) {
527  return true;
528  }
529  switch (window_func->getKind()) {
532  return false;
533  }
534  default: {
535  return true;
536  }
537  }
538 }
SqlWindowFunctionKind getKind() const
Definition: Analyzer.h:2562
const std::vector< std::shared_ptr< Analyzer::Expr > > & getOrderKeys() const
Definition: Analyzer.h:2570
bool window_function_is_aggregate(const SqlWindowFunctionKind kind)
Definition: WindowContext.h:42

+ Here is the call graph for this function:

+ Here is the caller graph for this function: