Skip to main content

linkrs_query/executor/streaming/operators/spec/
wco.rs

1//! Immutable configuration for the N-way WCO intersect operator.
2//!
3//! One probe side plus N build sides share a single intersect variable.
4//! Names (not slots) are stored so the operator resolves column positions
5//! per input chunk, staying robust to upstream layout changes.
6
7/// Immutable config for the WCO intersect operator.
8#[derive(Debug, Clone)]
9pub struct WcoSpec {
10    /// Bound variable per build side, resolved both in probe rows (lookup)
11    /// and in the matching build rows (table key). Length is the number of
12    /// build sides and is always at least one.
13    pub bound_names: Vec<String>,
14    /// Intersect variable resolved in every build row and emitted into
15    /// output rows.
16    pub intersect_name: String,
17    /// Output column order (the plan node's `col_names`).
18    pub output_col_names: Vec<String>,
19}
20
21impl WcoSpec {
22    /// Number of build sides.
23    pub fn num_builds(&self) -> usize {
24        self.bound_names.len()
25    }
26}