Module windows

Module windows 

Source
Expand description

Physical expressions for window functions

Modulesยง

bounded_window_agg_exec ๐Ÿ”’
Stream and channel implementations for window function expressions. The executor given here uses bounded memory (does not maintain all the input data seen so far), which makes it appropriate when processing infinite inputs.
utils ๐Ÿ”’
window_agg_exec ๐Ÿ”’
Stream and channel implementations for window function expressions.

Structsยง

BoundedWindowAggExec
Window execution plan
PlainAggregateWindowExpr
A window expr that takes the form of an aggregate function.
StandardWindowExpr
A window expr that takes the form of a [StandardWindowFunctionExpr].
WindowAggExec
Window execution plan
WindowUDFExpr
Implements [StandardWindowFunctionExpr] for WindowUDF

Traitsยง

WindowExpr
Common trait for window function implementations

Functionsยง

calc_requirements ๐Ÿ”’
create_udwf_window_expr
Creates a StandardWindowFunctionExpr suitable for a user defined window function
create_window_expr
Create a physical expression for window function
get_best_fitting_window
Constructs the best-fitting windowing operator (a WindowAggExec or a BoundedWindowExec) for the given input according to the specifications of window_exprs and physical_partition_keys. Here, best-fitting means not requiring additional sorting and/or partitioning for the given input.
get_ordered_partition_by_indices
This function calculates the indices such that when partition by expressions reordered with the indices resulting expressions define a preset for existing ordering. For instance, if input is ordered by a, b, c and PARTITION BY b, a is used, this vector will be [1, 0]. It means that when we iterate b, a columns with the order [1, 0] resulting vector (a, b) is a preset of the existing ordering (a, b, c).
get_partition_by_sort_exprs ๐Ÿ”’
get_window_mode
Compares physical ordering (output ordering of the input operator) with partitionby_exprs and orderby_keys to decide whether existing ordering is sufficient to run the current window operator.
schema_add_window_field
Build field from window function and add it into schema
sort_options_resolving_constant ๐Ÿ”’
Generates sort option variations for a given expression.
window_equivalence_properties ๐Ÿ”’
window_expr_from_aggregate_expr ๐Ÿ”’
Creates an appropriate WindowExpr based on the window frame and