MySQL  8.0.27
Source Code Documentation
window_iterators.cc File Reference
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <algorithm>
#include <atomic>
#include <cinttypes>
#include <cstdint>
#include <limits>
#include <map>
#include <utility>
#include <vector>
#include "my_alloc.h"
#include "my_bitmap.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/item.h"
#include "sql/mem_root_array.h"
#include "sql/mysqld.h"
#include "sql/parse_tree_nodes.h"
#include "sql/row_iterator.h"
#include "sql/sql_base.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_executor.h"
#include "sql/sql_optimizer.h"
#include "sql/sql_tmp_table.h"
#include "sql/table.h"
#include "sql/temp_table_param.h"
#include "sql/window.h"
#include "sql/window_iterators.h"
#include "sql/window_lex.h"

Namespaces

 anonymous_namespace{window_iterators.cc}
 

Functions

void anonymous_namespace{window_iterators.cc}::SwitchSlice (JOIN *join, int slice_num)
 
void anonymous_namespace{window_iterators.cc}::reset_wf_states (Func_ptr_array *func_ptr, bool framing)
 Minion for reset_framing_wf_states and reset_non_framing_wf_state, q.v. More...
 
void anonymous_namespace{window_iterators.cc}::reset_framing_wf_states (Func_ptr_array *func_ptr)
 Walk the function calls and reset any framing window function's window state. More...
 
void anonymous_namespace{window_iterators.cc}::reset_non_framing_wf_state (Func_ptr_array *func_ptr)
 Walk the function calls and reset any non-framing window function's window state. More...
 
bool anonymous_namespace{window_iterators.cc}::buffer_record_somewhere (THD *thd, Window *w, int64 rowno)
 Save a window frame buffer to frame buffer temporary table. More...
 
bool anonymous_namespace{window_iterators.cc}::buffer_windowing_record (THD *thd, Temp_table_param *param, bool *new_partition)
 If we cannot evaluate all window functions for a window on the fly, buffer the current row for later processing by process_buffered_windowing_record. More...
 
bool anonymous_namespace{window_iterators.cc}::read_frame_buffer_row (int64 rowno, Window *w, bool for_nth_value)
 Read row rowno from frame buffer tmp file using cached row positions to minimize positioning work. More...
 
void anonymous_namespace{window_iterators.cc}::dbug_allow_write_all_columns (Temp_table_param *param, std::map< TABLE *, my_bitmap_map * > &map)
 
void anonymous_namespace{window_iterators.cc}::dbug_restore_all_columns (std::map< TABLE *, my_bitmap_map * > &map)
 
bool anonymous_namespace{window_iterators.cc}::bring_back_frame_row (THD *thd, Window *w, int64 rowno, Window_retrieve_cached_row_reason reason, int fno=0)
 Bring back buffered data to the record of qep_tab-1 [1], and optionally execute copy_funcs() to the OUT table. More...
 
bool anonymous_namespace{window_iterators.cc}::process_wfs_needing_partition_cardinality (THD *thd, Temp_table_param *param, const Window::st_nth &have_nth_value, const Window::st_lead_lag &have_lead_lag, const int64 current_row, Window *w, Window_retrieve_cached_row_reason current_row_reason)
 Process window functions that need partition cardinality. More...
 
bool anonymous_namespace{window_iterators.cc}::process_buffered_windowing_record (THD *thd, Temp_table_param *param, const bool new_partition_or_eof, bool *output_row_ready)
 While there are more unprocessed rows ready to process given the current partition/frame state, process such buffered rows by evaluating/aggregating the window functions defined over this window on the current frame, moving the frame if required. More...