Module func

Source

StructsΒ§

AnalyzedRegex
AnalyzedRegexOpts
CaptureGroupDesc
NaiveOneByOneAggr
Naive implementation of OneByOneAggr, suitable for stuff like const folding, but too slow for rendering. This relies only on infrastructure available in mz-expr. It simply saves all the given input, and calls the given AggregateFunc’s eval method when asked about the current aggregate. (For Accumulable and Hierarchical aggregations, the rendering has more efficient implementations, but for Basic aggregations even the rendering uses this naive implementation.)
ProtoAnalyzedRegex
ProtoAnalyzedRegexOpts
ProtoCaptureGroupDesc
TimestampRangeStepInclusive
Like num::range_step_inclusive, but for our timestamp types using Interval for step.xwxw
WithOrdinality πŸ”’
Evaluates the inner table function, expands its results into unary (repeating each row as many times as the diff indicates), and appends an integer corresponding to the ordinal position (starting from 1). For example, it numbers the elements of a list when calling unnest_list.

EnumsΒ§

AggregateFunc
LagLeadType
Identify whether the given aggregate function is Lag or Lead, since they share implementations.
TableFunc
When adding a new TableFunc variant, please consider adding it to TableFunc::with_ordinality!

TraitsΒ§

OneByOneAggr
An implementation of an aggregation where we can send in the input elements one-by-one, and can also ask the current aggregate at any moment. (This just delegates to other aggregation evaluation approaches.)

FunctionsΒ§

acl_explode πŸ”’
all πŸ”’
any πŸ”’
array_concat πŸ”’
count πŸ”’
csv_extract
dense_rank πŸ”’
The expected input is in the format of [((OriginalRow, [EncodedArgs]), OrderByExprs...)] The output is in the format of [result_value, original_row]. See an example at lag_lead, where the input-output formats are similar.
dense_rank_no_list πŸ”’
Like dense_rank, but doesn’t perform the final wrapping in a list, returning an Iterator instead.
dict_agg πŸ”’
first_value πŸ”’
The expected input is in the format of [((OriginalRow, InputValue), OrderByExprs…)]
first_value_inner πŸ”’
first_value_no_list πŸ”’
Like first_value, but doesn’t perform the final wrapping in a list, returning an Iterator instead.
fused_value_window_func πŸ”’
Executes FusedValueWindowFunc on a reduction group. The expected input is in the format of [((OriginalRow, (Args1, Args2, ...)), OrderByExprs...)] where Args1, Args2, are the arguments of each of the fused functions. For functions that have only a single argument (first_value/last_value), these are simple values. For functions that have multiple arguments (lag/lead), these are also records.
fused_value_window_func_no_list πŸ”’
Like fused_value_window_func, but doesn’t perform the final wrapping in a list, returning an Iterator instead.
fused_window_aggr πŸ”’
Computes a bundle of fused window aggregations. The input is similar to window_aggr, but InputValue is not just a single value, but a record where each component is the input to one of the aggregations.
fused_window_aggr_no_list πŸ”’
Like fused_window_aggr, but doesn’t perform the final wrapping in a list, returning an Iterator instead.
generate_series πŸ”’
generate_series_ts πŸ”’
generate_subscripts_array πŸ”’
jsonb_agg πŸ”’
jsonb_array_elements πŸ”’
jsonb_each πŸ”’
jsonb_object_keys πŸ”’
lag_lead πŸ”’
The expected input is in the format of [((OriginalRow, EncodedArgs), OrderByExprs...)] For example,
lag_lead_inner πŸ”’
Each element of args has the 3 arguments evaluated for a single input row. Returns the results for each input row.
lag_lead_inner_ignore_nulls πŸ”’
lag_lead_inner_respect_nulls πŸ”’
lag_lead_no_list πŸ”’
Like lag_lead, but doesn’t perform the final wrapping in a list, returning an Iterator instead.
last_value πŸ”’
The expected input is in the format of [((OriginalRow, InputValue), OrderByExprs…)]
last_value_inner πŸ”’
last_value_no_list πŸ”’
Like last_value, but doesn’t perform the final wrapping in a list, returning an Iterator instead.
list_concat πŸ”’
max_datum πŸ”’
max_string πŸ”’
min_datum πŸ”’
min_string πŸ”’
mz_acl_explode πŸ”’
order_aggregate_datums
Assuming datums is a List, sort them by the 2nd through Nth elements corresponding to order_by, then return the 1st element.
order_aggregate_datums_with_rank πŸ”’
Assuming datums is a List, sort them by the 2nd through Nth elements corresponding to order_by, then return the 1st element and computed order by expression.
order_aggregate_datums_with_rank_inner πŸ”’
rank πŸ”’
The expected input is in the format of [((OriginalRow, [EncodedArgs]), OrderByExprs...)] The output is in the format of [result_value, original_row]. See an example at lag_lead, where the input-output formats are similar.
rank_no_list πŸ”’
Like rank, but doesn’t perform the final wrapping in a list, returning an Iterator instead.
regexp_extract πŸ”’
regexp_matches πŸ”’
repeat
row_number πŸ”’
The expected input is in the format of [((OriginalRow, [EncodedArgs]), OrderByExprs...)] The output is in the format of [result_value, original_row]. See an example at lag_lead, where the input-output formats are similar.
row_number_no_list πŸ”’
Like row_number, but doesn’t perform the final wrapping in a list, returning an Iterator instead.
string_agg πŸ”’
sum_datum πŸ”’
sum_numeric πŸ”’
unnest_array πŸ”’
unnest_list πŸ”’
unnest_map πŸ”’
unwrap_lag_lead_encoded_args πŸ”’
lag/lead’s arguments are in a record. This function unwraps this record.
window_aggr πŸ”’
input_datums is an entire window partition. The expected input is in the format of [((OriginalRow, InputValue), OrderByExprs...)] See also in the comment in window_func_applied_to.
window_aggr_inner πŸ”’
window_aggr_no_list πŸ”’
Like window_aggr, but doesn’t perform the final wrapping in a list, returning an Iterator instead.
wrap πŸ”’