MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / collect_arg_values

Function collect_arg_values

nodedb-query/src/window/value_eval.rs:377–396  ·  view source on GitHub ↗
(
    rows: &[Vec<Value>],
    indices: &[usize],
    column_index: &HashMap<String, usize>,
    spec: &WindowFuncSpec,
)

Source from the content-addressed store, hash-verified

375// ── Offset functions ──────────────────────────────────────────────────────────
376
377fn collect_arg_values(
378 rows: &[Vec<Value>],
379 indices: &[usize],
380 column_index: &HashMap<String, usize>,
381 spec: &WindowFuncSpec,
382) -> Vec<Value> {
383 indices
384 .iter()
385 .map(|&i| {
386 rows.get(i)
387 .map(|row| {
388 spec.args
389 .first()
390 .map(|expr| eval_arg_for_row(expr, row, column_index))
391 .unwrap_or(Value::Null)
392 })
393 .unwrap_or(Value::Null)
394 })
395 .collect()
396}
397
398fn apply_v_lag(
399 rows: &mut [Vec<Value>],

Callers 3

apply_v_lagFunction · 0.85
apply_v_leadFunction · 0.85
apply_v_nth_valueFunction · 0.85

Calls 5

eval_arg_for_rowFunction · 0.85
collectMethod · 0.80
firstMethod · 0.80
iterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected