fn merge_shape_supported(
node: &NativeNode,
) -> Option<(&Arc<SeriesSchema>, &Arc<EvalGrid>)>Expand description
Whether node is a supported child of a NativeExpr::Merge, and the evaluated vector it hands
over.
A merge receives fragments and groups them by canonical label set, combining the ones a label set shares by grid position; it names neither the tree nor the operator that produced a fragment. What it reads is therefore the whole of its requirement: samples evaluated on one grid in one field layout, which is an evaluated vector and nothing else. This is that type check and no more, so no node kind is refused for what it computes: a scan’s samples, a window’s rate, an aggregate’s fold and a binary operation’s match all hand over the same thing, and which one of them did says nothing about whether the fragments merge.
The collection does rely on the shape of the stream - a series arrives whole, its chunks contiguous and its last one marked as closing it - and every node that answers an evaluated vector keeps it. A window, a map, an instant selection, a timestamp and a scalar broadcast hand their input’s closing on, and an aggregate, a vector operation, a binary or set operation and a merge itself close each series they answer, because each decides a whole series at once. There is hence no operator above a merge that could break the collection, and none has to be listed here; the collector checks the shape chunk by chunk before it keeps a fragment, which is where a stream that broke it is refused.