Skip to content

Worktree step1 vec simplify#686

Draft
frankmcsherry wants to merge 8 commits intoTimelyDataflow:master-nextfrom
frankmcsherry:worktree-step1-vec-simplify
Draft

Worktree step1 vec simplify#686
frankmcsherry wants to merge 8 commits intoTimelyDataflow:master-nextfrom
frankmcsherry:worktree-step1-vec-simplify

Conversation

@frankmcsherry
Copy link
Member

Work in progress to lock in containers a collections of data that are built mutably, but then once built are only referenced. The intended plan has a few steps:

  1. Remove spiraling generality, and replace containers by Vec with the caveat that we should borrow containers before we use them, and only carefully engage owned and mutable data, ideally in "collections" rather than "containers". For example, EditList mutably works with times and diffs, but only once pulled down from collections.
  2. Introduce the Columnar constraint, and attempt to move instances of Vec containers to columnar containers, references from &T to T::Ref, things like this. This should pressure test the theory that we only need to read borrowed data of no particular structure.
  3. Attempt to re-integrate the flexibility about which type of container or reference it.

frankmcsherry and others added 2 commits March 16, 2026 10:55
Remove the generic container abstraction layer and collapse to Vec<T>
as the sole container type. All reference types are now &T.

Removed:
- Layout, WithLayout, LayoutExt traits and all implementations
- Vector<U>, TStack<U> layout structs
- BuilderInput trait (builders accept Vec directly)
- TimelyStack<T> BatchContainer impl and columnation imports
- All Col* type aliases (ColValSpine, ColKeySpine, etc.)
- The layout type alias module

Simplified:
- TraceReader/BatchReader/Cursor use direct type Key/Val/Time/Diff
  instead of 12-line LayoutExt bound blocks
- OrdValBatch/OrdKeyBatch/RhhValBatch parameterized by Update
  instead of Layout
- Builders destructure Vec tuples directly, compare with ==
- owned_key/owned_val/owned_time/owned_diff replaced with .clone()

23 files changed, ~740 insertions, ~1200 deletions (net -453 lines).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update dogsdogsdogs operators: KeyOwn→Key, ValOwn→Val, owned_*→clone,
BatchContainer methods→Vec methods, add Clone bounds where needed.

Fix spines.rs example (Col* → Ord* types).
Disable columnar.rs example (references removed Layout trait, will
return in step 2).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@frankmcsherry frankmcsherry changed the base branch from master to master-next March 16, 2026 15:50
frankmcsherry and others added 6 commits March 16, 2026 11:56
Replace push_own/index with Vec::push/indexing, remove unused
BatchContainer imports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nd all columnation vestiges

Remove unused traits and types that survived step 1:
- BuilderInput trait + Vec impl (zero consumers after step 1)
- SliceContainer (demo code, no consumers)
- ColumnationChunker (unused after Col* paths removed)
- TimelyStack and containers.rs (columnation container)
- ColMerger, TimelyStackQueue in merge_batcher
- Columnation impls for Present and PointStamp
- columnation crate dependency

Net -714 lines. Workspace compiles clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Data now requires columnar::Columnar, establishing the foundation
for step 2 of the columnar migration. All type parameters for keys,
values, times, and diffs gain the constraint through Data, Update,
TraceReader, BatchReader, and Cursor traits.

Propagated to: all Scope<Timestamp:> bounds, TInner bounds in
enter/enter_at wrappers, algorithm functions, operator impl blocks.
AltNeu in dogsdogsdogs derives Columnar. Demo crates updated.

Workspace compiles clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add columnar::Columnar bounds to all example Scope<Timestamp:> and
function signatures. Derive Columnar on HashWrapper, MinSum. Replace
timely Source/Target with (usize, usize) tuples in progress.rs example
since those external types lack Columnar. Update mdbook code samples.

Workspace compiles clean including all examples.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The mdbook code samples reference columnar::Columnar in where clauses
but the mdbook crate was missing the columnar dependency, and the
code blocks needed extern crate columnar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant