docs(promql): state the real reason an instant selection needs no ordering check

`select_instants` reads one series' complete axis, so the executor must
collect a series to its last chunk before evaluating it: a single buffer
closed by `is_last` and keyed by nothing else. That needs each series'
chunks contiguous, which `Contiguous` and `KeyThenTime` both guarantee,
and `Interleaved` never reaches it because `unpack_raw_series` rejects
that ordering at the raw-frame boundary.

The comment said the opposite: that interleaved input was enough because
`select_instants` holds no cross-series state. The conclusion stood, but
the stated reason named a property the executor does not have.

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
This commit is contained in:
discord9
2026-10-20 20:07:55 +08:00
parent 3ad5f96328
commit e596e09382
+6 -2
View File
@@ -335,8 +335,12 @@ impl NativeNode {
// field.
ensure_same_fields(&input.output, &self.output, "an instant selection")?;
ensure_grid(&self.output, &op.output_grid, "an instant selection")?;
// `select_instants` reads one series at a time and holds no cross-series state, so
// an interleaved input is enough for it: no ordering check here.
// `select_instants` reads one series' complete axis, so the executor collects a
// series to its last chunk first: a single buffer closed by `is_last` and keyed by
// nothing else. That needs each series' chunks contiguous, which `Contiguous` and
// `KeyThenTime` both guarantee; `Interleaved` never reaches it because
// `unpack_raw_series` rejects that ordering at the raw-frame boundary. So no check
// is needed here.
}
NativeExpr::Window { input, op } => {
input.validate()?;