MySQL 8.4.0
Source Code Documentation
Window_evaluation_requirements Struct Reference

Collects evaluation requirements from a window function, used by Item_sum::check_wf_semantics and its overrides. More...

#include <window.h>

Public Member Functions

 Window_evaluation_requirements ()
 

Public Attributes

bool needs_buffer
 Set to true if window function requires row buffering. More...
 
bool needs_peerset
 Set to true if we need peerset for evaluation (e.g. More...
 
bool needs_last_peer_in_frame
 Set to true if we need last peer for evaluation within a frame (e.g. More...
 
bool opt_first_row
 Set to true if we need FIRST_VALUE or optimized MIN/MAX. More...
 
bool opt_last_row
 Set to true if we need LAST_VALUE or optimized MIN/MAX. More...
 
Window::st_offset opt_nth_row
 Used if we have NTH_VALUE. More...
 
Window::st_ll_offset opt_ll_row
 Used if we have LEAD or LAG. More...
 
bool row_optimizable
 Set to true if we can compute a sliding window by a combination of undoing the contribution of rows going out of the frame and adding the contribution of rows coming into the frame. More...
 
bool range_optimizable
 Similar to row_optimizable but for RANGE frame bounds unit. More...
 

Detailed Description

Collects evaluation requirements from a window function, used by Item_sum::check_wf_semantics and its overrides.

Constructor & Destructor Documentation

◆ Window_evaluation_requirements()

Window_evaluation_requirements::Window_evaluation_requirements ( )
inline

Member Data Documentation

◆ needs_buffer

bool Window_evaluation_requirements::needs_buffer

Set to true if window function requires row buffering.

◆ needs_last_peer_in_frame

bool Window_evaluation_requirements::needs_last_peer_in_frame

Set to true if we need last peer for evaluation within a frame (e.g.

JSON_OBJECTAGG)

◆ needs_peerset

bool Window_evaluation_requirements::needs_peerset

Set to true if we need peerset for evaluation (e.g.

CUME_DIST)

◆ opt_first_row

bool Window_evaluation_requirements::opt_first_row

Set to true if we need FIRST_VALUE or optimized MIN/MAX.

◆ opt_last_row

bool Window_evaluation_requirements::opt_last_row

Set to true if we need LAST_VALUE or optimized MIN/MAX.

◆ opt_ll_row

Window::st_ll_offset Window_evaluation_requirements::opt_ll_row

Used if we have LEAD or LAG.

◆ opt_nth_row

Window::st_offset Window_evaluation_requirements::opt_nth_row

Used if we have NTH_VALUE.

◆ range_optimizable

bool Window_evaluation_requirements::range_optimizable

Similar to row_optimizable but for RANGE frame bounds unit.

◆ row_optimizable

bool Window_evaluation_requirements::row_optimizable

Set to true if we can compute a sliding window by a combination of undoing the contribution of rows going out of the frame and adding the contribution of rows coming into the frame.

For example, SUM and AVG allows this, but MAX/MIN do not. Only applicable if the frame has ROW bounds unit.


The documentation for this struct was generated from the following file: