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

Function partition_key

nodedb-query/src/window/value_eval.rs:117–130  ·  view source on GitHub ↗
(
    row: &[Value],
    column_index: &HashMap<String, usize>,
    partition_by: &[SqlExpr],
)

Source from the content-addressed store, hash-verified

115}
116
117fn partition_key(
118 row: &[Value],
119 column_index: &HashMap<String, usize>,
120 partition_by: &[SqlExpr],
121) -> String {
122 partition_by
123 .iter()
124 .map(|expr| {
125 let v = eval_arg_for_row(expr, row, column_index);
126 format!("{v:?}")
127 })
128 .collect::<Vec<_>>()
129 .join("\x00")
130}
131
132// ── Value comparison helpers (pub(super) for value_agg) ───────────────────────
133

Callers 1

build_value_partitionsFunction · 0.70

Calls 3

eval_arg_for_rowFunction · 0.85
joinMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected