|
| PT_window (const POS &pos, PT_order_list *partition_by, PT_order_list *order_by, PT_frame *frame) |
|
| PT_window (const POS &pos, PT_order_list *partition_by, PT_order_list *order_by, PT_frame *frame, Item_string *inherit) |
|
| PT_window (const POS &pos, Item_string *name) |
|
bool | do_contextualize (Parse_context *pc) override |
|
virtual | ~Parse_tree_node_tmpl ()=default |
|
bool | is_contextualized () const |
|
virtual bool | contextualize (Context *pc) final |
|
void | error (Context *pc, const POS &pos) const |
| syntax_error() function replacement for deferred reporting of syntax errors More...
|
|
void | error (Context *pc, const POS &pos, const char *msg) const |
| syntax_error() function replacement for deferred reporting of syntax errors More...
|
|
void | errorf (Context *pc, const POS &pos, const char *format,...) const |
| syntax_error() function replacement for deferred reporting of syntax errors More...
|
|
void | save_pos (Window_retrieve_cached_row_reason reason) |
| See m_tmp_pos. More...
|
|
void | restore_pos (Window_retrieve_cached_row_reason reason) |
| See m_tmp_pos. More...
|
|
void | copy_pos (Window_retrieve_cached_row_reason from_reason, Window_retrieve_cached_row_reason to_reason) |
| Copy frame buffer position hint from one to another. More...
|
|
| Window (Item_string *name) |
| Reference to a named window. More...
|
|
| Window (PT_order_list *partition_by, PT_order_list *order_by, PT_frame *frame) |
| Unnamed window. More...
|
|
| Window (PT_order_list *partition_by, PT_order_list *order_by, PT_frame *frame, Item_string *inherit) |
| Unnamed window based on a named window. More...
|
|
void | set_name (Item_string *name) |
| We have a named window. More...
|
|
void | set_ancestor (Window *a) |
| After resolving an existing window name reference in a window definition, we set the ancestor pointer to easy access later. More...
|
|
Item_string * | name () const |
| Get the name of a window. More...
|
|
uint | def_pos () const |
|
void | set_def_pos (uint pos) |
|
const PT_frame * | frame () const |
| Get the frame, if any. More...
|
|
const PT_order_list * | effective_order_by () const |
| Get the ORDER BY, if any. More...
|
|
ORDER * | first_order_by () const |
| Get the first argument of the ORDER BY clause for this window if any. More...
|
|
const PT_order_list * | effective_partition_by () const |
| Get partition, if any. More...
|
|
ORDER * | first_partition_by () const |
| Get the first argument of the PARTITION clause for this window if any. More...
|
|
List< Item_sum > & | functions () |
| Get the list of functions invoked on this window. More...
|
|
ORDER * | sorting_order (THD *thd=nullptr, bool implicit_grouping=false) |
| Concatenation of columns in PARTITION BY and ORDER BY. More...
|
|
bool | check_window_functions1 (THD *thd, Query_block *select) |
| Check that the semantic requirements for window functions over this window are fulfilled, and accumulate evaluation requirements. More...
|
|
bool | check_window_functions2 (THD *thd) |
| Like check_window_functions1() but contains checks which must wait until the start of the execution phase. More...
|
|
bool | setup_range_expressions (THD *thd) |
| For RANGE frames we need to do computations involving add/subtract and less than, smaller than. More...
|
|
bool | is_reference () const |
| Return if this window represents an unresolved window reference seen in a window function OVER clause. More...
|
|
void | check_partition_boundary () |
| Check if the just read input row marks the start of a new partition. More...
|
|
void | reset_order_by_peer_set () |
| Reset the current row's ORDER BY expressions when starting a new peer set. More...
|
|
bool | in_new_order_by_peer_set (bool compare_all_order_by_items=true) |
| Determine if the current row is not in the same peer set as the previous row. More...
|
|
bool | before_frame () |
| While processing buffered rows in RANGE frame mode we, determine if the present row revisited from the buffer is before the row being processed; i.e. More...
|
|
bool | after_frame () |
|
bool | at_partition_border () const |
| Check if we have read all the rows in a partition, possibly having buffered them for further processing. More...
|
|
void | save_special_row (uint64 special_rowno, TABLE *t) |
| Save row special_rowno in table t->record[0] to an in-memory copy for later restoration. More...
|
|
void | restore_special_row (uint64 special_rowno, uchar *record) |
| Restore row special_rowno into record from in-memory copy. More...
|
|
bool | resolve_window_ordering (THD *thd, Ref_item_array ref_item_array, Table_ref *tables, mem_root_deque< Item * > *fields, ORDER *o, bool partition_order) |
| Resolve and set up the PARTITION BY or an ORDER BY list of a window. More...
|
|
bool | check_unique_name (const List< Window > &windows) |
| Return true if this window's name is not unique in windows. More...
|
|
void | apply_temp_table (THD *thd, const Func_ptr_array &items_to_copy, bool first) |
| Specify that this window is to be evaluated after a given temporary table. More...
|
|
bool | setup_ordering_cached_items (THD *thd, Query_block *select, const PT_order_list *o, bool partition_order) |
| Set up cached items for an partition or an order by list updating m_partition_items or m_order_by_items respectively. More...
|
|
bool | needs_sorting () const |
| Determine if the window had either a partition clause (inclusive) or a ORDER BY clause, either defined by itself or inherited from another window. More...
|
|
bool | needs_buffering () const |
| If we cannot compute one of window functions without looking at succeeding rows, return true, else false. More...
|
|
bool | needs_peerset () const |
| If we cannot compute one of window functions without looking at all rows in the peerset of the current row, return true, else false. More...
|
|
bool | needs_last_peer_in_frame () const |
| If we cannot compute one of window functions without looking at all rows in the peerset of the current row in this frame, return true, else false. More...
|
|
bool | needs_partition_cardinality () const |
| If we need to read the entire partition before we can evaluate some window function(s) on this window,. More...
|
|
bool | optimizable_row_aggregates () const |
| Return true if the set of window functions are all ROW unit optimizable. More...
|
|
bool | optimizable_range_aggregates () const |
| Return true if the set of window functions are all RANGE unit optimizable. More...
|
|
bool | static_aggregates () const |
| Return true if the aggregates are static, i.e. More...
|
|
bool | opt_first_row () const |
| See m_opt_first_row. More...
|
|
bool | opt_last_row () const |
| See m_opt_last_row. More...
|
|
bool | is_last () const |
| See m_last. More...
|
|
void | set_is_last (bool last) |
| An override used by the hypergraph join optimizer only. More...
|
|
const st_nth & | opt_nth_row () const |
| See m_opt_nth_row. More...
|
|
const st_lead_lag & | opt_lead_lag () const |
| See m_opt_lead_lag. More...
|
|
Temp_table_param * | frame_buffer_param () const |
| Getter for m_frame_buffer_param, q.v. More...
|
|
void | set_frame_buffer_param (Temp_table_param *p) |
| Setter for m_frame_buffer_param, q.v. More...
|
|
TABLE * | frame_buffer () const |
| Getter for m_frame_buffer, q.v. More...
|
|
void | set_frame_buffer (TABLE *tab) |
| Setter for m_frame_buffer, q.v. More...
|
|
bool | short_circuit () const |
|
void | set_short_circuit (bool short_circuit) |
|
int64 | partition_rowno () const |
| Getter for m_part_row_number, q.v., the current row number within the partition. More...
|
|
bool | make_special_rows_cache (THD *thd, TABLE *out_tbl) |
| Allocate the cache for special rows. More...
|
|
int64 | last_row_output () const |
| See m_last_row_output. More...
|
|
void | set_last_row_output (int64 rno) |
| See m_last_row_output. More...
|
|
int64 | rowno_being_visited () const |
| See m_rowno_being_visited. More...
|
|
void | set_rowno_being_visited (int64 rno) |
| See m_rowno_being_visited. More...
|
|
int64 | last_rowno_in_cache () const |
| See m_last_rowno_in_cache. More...
|
|
void | set_last_rowno_in_cache (uint64 rno) |
| See m_last_rowno_in_cache. More...
|
|
int64 | last_rowno_in_range_frame () const |
| See m_last_rowno_in_range_frame. More...
|
|
void | set_last_rowno_in_range_frame (uint64 rno) |
| See m_last_rowno_in_range_frame. More...
|
|
int64 | last_rowno_in_peerset () const |
| See m_last_rowno_in_peerset. More...
|
|
void | set_last_rowno_in_peerset (uint64 rno) |
| See m_last_rowno_in_peerset. More...
|
|
int64 | is_last_row_in_peerset_within_frame () const |
| See m_is_last_row_in_peerset_within_frame. More...
|
|
void | set_is_last_row_in_peerset_within_frame (bool value) |
| See m_is_last_row_in_peerset_within_frame. More...
|
|
bool | do_copy_null () const |
| See m_do_copy_null. More...
|
|
void | set_do_copy_null (bool b) |
| See m_do_copy_null. More...
|
|
bool | do_inverse () const |
| See m_inverse_aggregation. More...
|
|
Window & | set_inverse (bool b) |
| See m_inverse_aggregation. More...
|
|
bool | aggregates_primed () const |
| See m_aggregates_primed. More...
|
|
void | set_aggregates_primed (bool b) |
| See m_aggregates_primed. More...
|
|
bool | is_last_row_in_frame () const |
| See m_is_last_row_in_frame. More...
|
|
void | set_is_last_row_in_frame (bool b) |
| See m_is_last_row_in_frame. More...
|
|
int64 | rowno_in_frame () const |
| Return the size of the frame in number of rows. More...
|
|
Window & | set_rowno_in_frame (int64 rowno) |
| See m_rowno_in_frame. More...
|
|
int64 | rowno_in_partition () const |
| See m_rowno_in_partition. More...
|
|
void | set_rowno_in_partition (int64 rowno) |
| See m_rowno_in_partition. More...
|
|
void | set_first_rowno_in_rows_frame (int64 rowno) |
| See m_first_rowno_in_rows_frame. More...
|
|
int64 | first_rowno_in_rows_frame () const |
|
void | set_first_rowno_in_range_frame (int64 rowno) |
| See m_first_rowno_in_range_frame. More...
|
|
int64 | first_rowno_in_range_frame () const |
| See m_first_rowno_in_range_frame. More...
|
|
void | set_frame_buffer_total_rows (int64 rows) |
| See m_frame_buffer_total_rows. More...
|
|
int64 | frame_buffer_total_rows () const |
| See m_frame_buffer_total_rows. More...
|
|
void | set_frame_buffer_partition_offset (int64 offset) |
| See m_frame_buffer_partition_offset. More...
|
|
int64 | frame_buffer_partition_offset () const |
| See m_frame_buffer_partition_offset. More...
|
|
int64 | row_has_fields_in_out_table () const |
| See m_row_has_fields_in_out_table. More...
|
|
void | set_row_has_fields_in_out_table (int64 rowno) |
| See m_row_has_fields_in_out_table. More...
|
|
void | cleanup () |
| Free up any resource used to process the window functions of this window, e.g. More...
|
|
void | destroy () |
| Free structures that were set up during preparation of window functions. More...
|
|
void | reset_partition_state () |
| Reset window state for a new partition. More...
|
|
void | reset_round () |
| Reset execution state for next call to JOIN::exec, cf. More...
|
|
void | reset_lead_lag () |
| Reset execution state for LEAD/LAG for the current row in partition. More...
|
|
void | reset_all_wf_state () |
| Reset the execution state for all window functions defined on this window. More...
|
|
const char * | printable_name () const |
|
void | print (const THD *thd, String *str, enum_query_type qt, bool expand_definition) const |
|
bool | has_windowing_steps () const |
|