MySQL 8.3.0
Source Code Documentation
window.h File Reference
#include <assert.h>
#include <sys/types.h>
#include <cstring>
#include "my_inttypes.h"
#include "sql/enum_query_type.h"
#include "sql/handler.h"
#include "sql/mem_root_array.h"
#include "sql/sql_lex.h"
#include "sql/sql_list.h"
#include "sql/table.h"
#include "sql/window_lex.h"

Go to the source code of this file.

Classes

class  Window
 Represents the (explicit) window of a SQL 2003 section 7.11 <window clause>, or the implicit (inlined) window of a window function call, or a reference to a named window in a window function call (instead of the inlined definition) before resolution. More...
 
struct  Window::st_offset
 
struct  Window::st_ll_offset
 
struct  Window::st_nth
 
struct  Window::st_lead_lag
 
struct  Window::Frame_buffer_position
 Holds information about a position in the buffer frame as stored in a temporary file (cf. More...
 
struct  Window_evaluation_requirements
 Collects evaluation requirements from a window function, used by Item_sum::check_wf_semantics and its overrides. More...
 

Enumerations

enum class  Window_retrieve_cached_row_reason {
  WONT_UPDATE_HINT = -1 , FIRST_IN_PARTITION = 0 , CURRENT = 1 , FIRST_IN_FRAME = 2 ,
  LAST_IN_FRAME = 3 , LAST_IN_PEERSET = 4 , MISC_POSITIONS = 5
}
 Position hints for the frame buffer are saved for these kind of row accesses, cf. More...
 

Variables

constexpr int kMaxWindows = 127
 The number of windows is limited to avoid the stack blowing up when constructing iterators recursively. More...
 

Enumeration Type Documentation

◆ Window_retrieve_cached_row_reason

Position hints for the frame buffer are saved for these kind of row accesses, cf.

Window::m_frame_buffer_positions.

Enumerator
WONT_UPDATE_HINT 
FIRST_IN_PARTITION 
CURRENT 
FIRST_IN_FRAME 
LAST_IN_FRAME 
LAST_IN_PEERSET 
MISC_POSITIONS 

Variable Documentation

◆ kMaxWindows

constexpr int kMaxWindows = 127
constexpr

The number of windows is limited to avoid the stack blowing up when constructing iterators recursively.

There used to be no limit, but it would be unsafe since QEP_shared::m_idx of tmp tables assigned for windows would exceed the old range of its type plan_idx (int8). It has now been widened, so the max number of windows could be increased if need be, modulo other problems. We could also make it a system variable.