refactor(sketch_db): extract data/ module for payload taxonomy - #177
Merged
Merged
Conversation
Post-M2.3 reorg #1 of 8. Moves stateless payload types out of `store/mod.rs` into a new `sketch_db::data` module. The split clarifies that: - `data/` = stateless data taxonomy (payload kinds, sid hashing, accuracy derivation, capability re-exports) - `store/` = stateful sid registry + per-sid columnar substrate Moved to `sketch_db::data`: - `AggKind` enum (sketch-vs-precompute discriminator) - `AggPayload` enum (sketch bytes vs accumulator) - `SketchConfig` (per-variant tuning params) - `SketchSampleState`, `SketchEncoding` - `SketchTimeSeries` (read-side row shape) - `AccuracyBound` + `from_config` derivation - `compute_sid` / `compute_sketch_sid` (canonical sid hash) - `canonical_parameters` helper - Re-exports: `Capability`, `SketchKindHandle`, `AggregationType` `store/mod.rs` re-exports each type at the legacy path (`sketch_db::store::AggKind` etc.) so no external caller needs to change spelling. The canonical home is now `sketch_db::data::*`. 783/783 lib tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Post-M2.3 reorg #1 of 8. Moves stateless payload types out of
store/mod.rsinto a newsketch_db::datamodule. Split clarifies that:data/= stateless data taxonomy (payload kinds, sid hashing, accuracy derivation, capability re-exports)store/= stateful sid registry + per-sid columnar substrateMoved to
sketch_db::data:AggKindenumAggPayloadenumSketchConfigSketchSampleState,SketchEncodingSketchTimeSeriesAccuracyBound+from_configcompute_sid/compute_sketch_sidcanonical_parametersCapability,SketchKindHandle,AggregationTypestore/mod.rsre-exports each type at the legacy path (sketch_db::store::AggKindetc.) so no external caller needs to change spelling. The canonical home is nowsketch_db::data::*.Test plan
cargo test -p data_plane --lib— 783/783 pass.cargo check --workspaceclean.🤖 Generated with Claude Code