Closed frankmcsherry closed 1 year ago
It's a fine question. We could always consider tearing about the batch building stages into their own operators, and allow a consolidate
that does not form batches. Also, one that forms but does not unpack batches. The consolidate
method won't end up with a maintained arrangement though, so no cost beyond per-batch memory used to consolidate.
This PR removes the
Consolidate
trait, and moves its associated methods to inherent implementations onCollection
. There are no other implementors of the trait. The only plausible reason I could think of for the trait is to write code generic overCollection
andArrangement
, but the latter didn't implementConsolidate
yet in any case.The change also alters
consolidate_named
to matcharrange_named
which takes aTr: Trace
generic argument, which can be specified by the user. Methods are not allowed to have generic arguments with default type values, so theconsolidate
method is the only way to do this. This removes the previous ability to easily specify a name without more awkwardly specifying the trace at the same time.