pub struct CapturePoint {
pub source_name: String,
pub as_name: String,
pub cast_type: Option<String>,
pub slurp: bool,
pub path: Option<String>,
pub count: bool,
pub agg: Option<CaptureAgg>,
pub row_filter: Option<(String, String)>,
}Expand description
A capture point extracted from an op template.
Capture points mark result fields that should be extracted from the operation result and stored as named variables for use in subsequent operations or verification.
Formats:
[username]— capture “username” as “username” (single value)[username as u1]— capture “username”, store as “u1” (single value)[(List) field]— capture with type assertion[*]— capture all available fields[@keys]— slurp: collect every row’skeyscolumn into aValue::Jsonarray. Use when the result has multiple rows and the consumer needs all per-row column values as a list (e.g. recall-evaluator’sactual:reads).[@col as values]— slurp with alias.
Fields§
§source_name: StringThe field name to capture from the result.
as_name: StringThe variable name to store the captured value under.
Same as source_name if no as clause.
cast_type: Option<String>Optional type assertion (e.g., “List”, “int[]”).
slurp: booltrue when the capture-point was declared with the @
slurp prefix ([@name]). Slurp captures collect every
row’s column value across the result body into a single
Value::Json array; non-slurp captures take the first
row’s value as a scalar.
path: Option<String>Optional JSON-Pointer path (RFC 6901, e.g. /0/value,
/value/inner/0). When Some, the extractor uses
serde_json::Value::pointer(path) against the body’s
to_json() projection rather than the first-row /
top-level field lookup keyed by source_name. Lets a
declarative capture: map address Jolokia bulk-POST
responses ([{value:N}, {value:[...]}, ...]) by
position + nested field.
The bracket-syntax in op text (e.g. [name]) leaves
this None and continues to use the original first-row
extraction path; only the declarative capture: block
populates it.
count: boolReduce the extracted sub-tree to a u64 count instead of
capturing it as-is. Array → length; object → key count;
scalar (number / bool / non-empty string) → 1; null /
missing → 0. Useful for “is the compactions list empty”
style predicates without binding the array into the
kernel as a Value::Json. Only honoured when path is
also set (declarative capture form).
agg: Option<CaptureAgg>Row-set aggregation (:min(f) / :max(f) / :sum(f)
path suffix): fold the named field across the rows of the
addressed array instead of capturing a single value. Like
count, only honoured on the declarative capture form.
row_filter: Option<(String, String)>Row predicate for an aggregate: (field, value), from the
where <field>='<value>' clause of a capture suffix — e.g.
":sum(progress where kind='secondary index build')". Rows whose
field does not equal value are excluded before folding.
Exists because a result set can hold rows that are not commensurable.
system_views.sstable_tasks lists a data compaction reporting
unit=bytes beside a vector index build reporting
unit=token range parts; summing across them adds unlike quantities,
and the total silently depends on how many tasks were registered at
sample time. The predicate cannot live in the query — Cassandra allows
GROUP BY only on PRIMARY KEY columns, and narrowing the poll’s own
WHERE would change which rows the drain waits for.