OmniSciDB  d2f719934e
 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 <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

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_requires_peer_handling (const Analyzer::WindowFunction *window_func)
 

Function Documentation

bool window_function_is_aggregate ( const SqlWindowFunctionKind  kind)
inline
bool window_function_is_value ( const SqlWindowFunctionKind  kind)
inline

Definition at line 27 of file WindowContext.h.

References FIRST_VALUE, LAG, LAST_VALUE, and LEAD.

Referenced by RelAlgTranslator::translateWindowFunction().

27  {
28  switch (kind) {
33  return true;
34  }
35  default: {
36  return false;
37  }
38  }
39 }

+ Here is the caller graph for this function:

bool window_function_requires_peer_handling ( const Analyzer::WindowFunction window_func)

Definition at line 438 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().

438  {
439  if (!window_function_is_aggregate(window_func->getKind())) {
440  return false;
441  }
442  if (window_func->getOrderKeys().empty()) {
443  return true;
444  }
445  switch (window_func->getKind()) {
448  return false;
449  }
450  default: {
451  return true;
452  }
453  }
454 }
SqlWindowFunctionKind getKind() const
Definition: Analyzer.h:1607
const std::vector< std::shared_ptr< Analyzer::Expr > > & getOrderKeys() const
Definition: Analyzer.h:1615
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: