docs(promql): link the validator by the node that has it

`NativeTree` has no `validate`; the method lives on `NativeNode`. Five doc
comments linked the tree, so rustdoc reports an unresolved link for each and
the published API docs lose the reference. Retarget every one at
`NativeNode::validate`; no wording changes.

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
This commit is contained in:
discord9
2026-10-21 16:31:30 +08:00
parent 02ccc583f9
commit 609844a0db
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -124,7 +124,7 @@ const SUPPORTED: &str = "a selector, a range function over a range selector —
/// its last chunk before the next, so chunks of different series may not interleave, and an
/// `Interleaved` declaration is refused here for every shape this compiler accepts. That is where
/// the refusal belongs: no accepted shape can consume interleaved chunks, so a tree declaring one
/// cannot be built here at all. [`NativeTree::validate`]'s window branch checks the same thing, so
/// cannot be built here at all. [`NativeNode::validate`]'s window branch checks the same thing, so
/// if both land this refusal comes first and the tree check is a backstop for a tree built some
/// other way.
///
@@ -214,7 +214,7 @@ fn compile_expr(context: &Context, expr: &PromExpr) -> Result<NativeNode> {
///
/// The grid is the statement's rather than the constant's own: a constant has no timestamps, so the
/// only positions it can be broadcast over are the ones the statement is evaluated at, and
/// [`NativeTree::validate`] compares a binary operation's two grids by spec rather than by
/// [`NativeNode::validate`] compares a binary operation's two grids by spec rather than by
/// allocation.
fn scalar_node(context: &Context, value: f64) -> Result<NativeNode> {
Ok(NativeNode {
@@ -332,7 +332,7 @@ fn broadcast(left: NativeNode, right: NativeNode, op: BinaryOp, return_bool: boo
/// The matching a vector-and-constant operation records.
///
/// Nothing is matched: a scalar carries no labels, so [`NativeTree::validate`] broadcasts it and
/// Nothing is matched: a scalar carries no labels, so [`NativeNode::validate`] broadcasts it and
/// reads neither `labels` nor `cardinality`. They carry the default a vector–vector operation of the
/// same operator would have, which is also the only matching PromQL allows here — it rejects
/// `on`, `ignoring`, `group_left` and `group_right` on a scalar–vector operation. `return_bool` is
@@ -494,7 +494,7 @@ fn window_call(
///
/// The output is the input's own type: a pointwise function moves no value to another grid point
/// and reports one value per field it was given, so the map's schema is the input's allocation
/// rather than a copy that merely agrees with it. [`NativeTree::validate`] does not require that
/// rather than a copy that merely agrees with it. [`NativeNode::validate`] does not require that
/// sharing: it compares the map's grid with its input's by [`EvalGrid::spec`] and its field count
/// with its input's, so a map that allocated an equal grid of its own would validate the same way.
/// The only comparison by identity is an input node's, whose output has to be the very binding it
+1 -1
View File
@@ -1022,7 +1022,7 @@ fn a_math_function_maps_over_the_node_its_argument_compiles_to() {
///
/// The maps are separate nodes because the arguments nest, not because the compiler knows
/// `clamp_min(abs(...))`: a compiler that bound the pair to one node would fail the tree assertions
/// here. The grids are compared by their spec, which is what [`NativeTree::validate`] compares: a
/// here. The grids are compared by their spec, which is what [`NativeNode::validate`] compares: a
/// map that allocated a second, equal grid would still be the window's layout, while one that
/// reported a different grid or different fields would not.
#[test]