Skip to content

Conversation

frankmcsherry
Copy link
Member

The Collection type has a bunch of generic arguments that need to line up just so, several are usually redundant, and some are phantoms in certain settings. This PR shakes out some of the dust by introducing a CollectionCore<G, C> type, generic in the graph scope and the container type, with a type Collection<G, D, R> definition that introduces the container Vec<(D, G::Timestamp, R)>, which is a handy default when you don't care, but whose details (around D and R) aren't helpful for containers who may not have owned types in mind.

@frankmcsherry
Copy link
Member Author

frankmcsherry commented Sep 26, 2025

One discussion item, if we like the general thrust, is what names we might like to use, to pilot folks towards or away from container-based collections and variables. For example, compatibility would be easiest with

type Collection<G, D, R> = CollectionCore<G, Vec<(D, G::Timestamp, R)>>;
type Variable<G, D, R> = VariableCore<G, Vec<(D, G::Timestamp, R)>>;

Alternately, we could promote containers and demote rows by instead doing

type VecCollection<G, D, R> = Collection<G, Vec<(D, G::Timestamp, R)>>;
type VecVariable<G, D, R> = Variable<G, Vec<(D, G::Timestamp, R)>>;

Or we could mix things up a bit and remove both names, in order to avoid confusion during a migration.

@frankmcsherry
Copy link
Member Author

Upon discussion with @antiguru we agreed we like VecCollection and Collection (the latter for containers), mutatis mutandis for variables and semigroup variables.

@frankmcsherry frankmcsherry marked this pull request as ready for review September 26, 2025 20:44
@frankmcsherry frankmcsherry changed the title Extract CollectionCore from Collection Extract VecCollection from Collection Sep 26, 2025
@frankmcsherry frankmcsherry merged commit e0add72 into TimelyDataflow:master Sep 26, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants