Commit b66c4f6
committed
feat(four-repo-demo): end-to-end integration demo crate
Wave-5 worker W-INT-1. New excluded crate at `crates/four-repo-demo/`
that demonstrates three of the four glue surfaces working together:
* `cognitive-shader-actor::CognitiveShaderActor` wrapping a real
`SupervisableShader` (`SumShader`) — running-sum state via
`Arc<Mutex<i64>>`, payload is `arrow_array::RecordBatch`.
* `lance-graph-contract::actor::SupervisableShader` trait consumed
end-to-end (impl is real, not stub).
* `lance-graph-contract::ir::{Operator, OperatorTree, EngineHint,
Cardinality}` — builds a 3-node tree (RangeScan → Filter →
CognitiveApply) and computes total estimated cardinality.
The example at `examples/run_demo.rs`:
1. Spawns CognitiveShaderActor<SumShader> via ractor 0.15.13
2. Sends two ShaderMessage::Apply with single-row Int64 batches (5, 7)
3. Sends ShaderMessage::Drain
4. Prints the running sum (12) + the operator tree + cardinality estimate
Test results (cargo test --manifest-path crates/four-repo-demo/Cargo.toml):
* sum_shader_actor_running_sum ... ok
* operator_tree_has_three_nodes ... ok
* operator_tree_shape_correct ... ok
* operator_tree_total_cardinality ... ok
* 2 doc-tests pass
* All 6/6 tests pass
NOT demonstrated (and why, in the crate's lib.rs and README):
* Glue #1 surrealdb-ractor — needs a live SurrealDB
* Glue #2 lance-graph-tikv-provider — needs a TiKV cluster
* Glue #3 sea-orm-ractor — needs running Postgres + the derive
Workspace: added to `exclude` (heavy tokio + ractor + arrow deps).
.gitignore: `/crates/four-repo-demo/target/` to keep build artefacts
out of git.
Worker: W-INT-1. Wave-5 of the four-repo integration.1 parent 4ab360a commit b66c4f6
9 files changed
Lines changed: 1733 additions & 0 deletions
File tree
- crates/four-repo-demo
- examples
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
0 commit comments