diff --git a/.claude/board/LATEST_STATE.md b/.claude/board/LATEST_STATE.md index 82e985c7..558465cf 100644 --- a/.claude/board/LATEST_STATE.md +++ b/.claude/board/LATEST_STATE.md @@ -207,61 +207,6 @@ the contract. This file exists to prevent that. --- -## 2026-05-18 — Append: lance-graph-contract 0.2.0 additive submodules + four-repo glue scaffolds - -> **APPEND-ONLY annotation** per the Mandatory Board-Hygiene Rule in CLAUDE.md. -> This section prepends to the dated-entry stack; it does NOT edit any prior entry. -> Branch: `claude/lance-surrealdb-analysis-LXmug`. PR #404 (open). -> Three companion PRs landed same day in sibling repos: surrealdb#24 / sea-orm#1 / ndarray#160. - -### Recently Shipped PRs — new top row - -| PR | Merged | Title | What it added | -|---|---|---|---| -| **#404** | *(open)* | feat(wave-5): lance-graph-contract 0.2.0 ir/provider/actor submodules + tikv-provider + cognitive-shader-actor scaffold | Glue #2 (`lance-graph-tikv-provider`) + Glue #4 (`cognitive-shader-actor`) scaffold crates + ractor::Actor impl + `lance-graph-contract` 0.2.0 with new `ir` / `provider` / `actor` submodules. 5 commits on branch `claude/lance-surrealdb-analysis-LXmug`. Three companion PRs in sibling repos: surrealdb#24 / sea-orm#1 / ndarray#160. | - -### Current Contract Inventory — new entry - -**`lance-graph-contract::ir`** (new submodule, 0.2.0): federated planner intermediate-representation vocabulary shared across all cross-engine consumers. Key types: -- `Operator` — the IR node; carries `OperatorKind` + optional `Cardinality` estimate + optional `EngineHint`. -- `OperatorKind` — 11-variant enum (Scan, Filter, Project, Join, Aggregate, Sort, Limit, Union, Distinct, Exchange, Extension). `#[non_exhaustive]` to allow additive extensions without semver break. -- `OperatorTree` — DAG wrapper; `children: Vec` + `root: Operator`. Provides `walk_pre` / `walk_post` visitors. -- `Cardinality` — `u64` row-count estimate; saturating arithmetic. -- `EngineHint` — `#[non_exhaustive]` enum (`#[default]` Auto, Lance, TiKV, SurrealDB, SeaOrm, InMemory). Auto lets the planner pick. Doc-tests inline at each type; zero external deps. - -**`lance-graph-contract::provider`** (new submodule, 0.2.0): zero-dep MVCC backend markers consumed by the `lance-graph-tikv-provider` glue crate and the ontology table providers. Key types: -- `BackendId` — `#[non_exhaustive]` enum (LocalKv / Tikv / Lance / InMemory); identifies the physical backend at runtime without importing any backend crate. -- `MvccProvider` trait — object-safe marker trait; associated fns `backend() -> BackendId` + `snapshot_ts() -> u64`. Implemented by both `TikvBackedProvider` and `LanceBackedProvider`. -- `TikvBackedProvider` — zero-size marker struct; impl `MvccProvider` (backend=Tikv). Used by `lance-graph-tikv-provider` to assert MVCC contract compliance at compile time. -- `LanceBackedProvider` — zero-size marker struct; impl `MvccProvider` (backend=Lance). Used by existing Lance-backed table providers. -- `min_snapshot_ts(a: u64, b: u64) -> u64` — const helper; returns `a.min(b)` for two-provider join GC horizon. Doc-tested. - -**`lance-graph-contract::actor`** (new submodule, 0.2.0): supervision contract consumed by `cognitive-shader-actor` (new Glue #4 crate). Key types: -- `SupervisableShader` trait — object-safe lifecycle trait with associated `Payload` + `Error` types and lifecycle hooks `pre_start()`, `apply(&Payload) -> Result<(), Error>`, `apply_delta(&[u8]) -> Result<(), Error>` (compact binary delta path), `drain() -> Vec` (graceful flush). Designed for `ractor::Actor` blanket impl in the glue crate. -- `SupervisionPolicy` — `#[non_exhaustive]` enum (OneForOne (default), AllForOne, RestForOne). Default is OneForOne to match ractor's built-in supervisor restart semantics. -- `RestartBackoff` — struct with `initial_ms: u64`, `multiplier: f32`, `max_ms: u64`, `max_restarts: u32`. Exponential backoff config; validates at construction (`multiplier >= 1.0`, `max_ms >= initial_ms`). Doc-tests cover boundary conditions. Consumed by `cognitive-shader-actor::ShaderSupervisor` in the glue crate. - -### New excluded crates - -- `crates/lance-graph-tikv-provider/` — Glue #2. TiKV-backed MVCC provider wrapping the `tikv-client` crate behind the `MvccProvider` contract. Excluded from workspace `[workspace]` table (standalone; TiKV dep pulls `protoc` which breaks the zero-protoc CI path). Implements `TikvBackedProvider` from `lance-graph-contract::provider`. -- `crates/cognitive-shader-actor/` — Glue #4. `ractor::Actor` implementation of `SupervisableShader`. Scaffolds the `ShaderActor` struct + `ShaderSupervisor` one-for-one supervisor tree. Excluded from workspace `[workspace]` table because ractor is not yet in the workspace `[workspace.dependencies]` resolver table (PP-13 REJECT resolved — see below). - -### Sprint-1 implementation progress - -- [x] **LG-4** — `SupervisableShader` ractor::Actor impl in `cognitive-shader-actor`; `pre_start` + `apply` + `drain` lifecycle wired; 12 unit tests pass. -- [x] **SO-6** — `SeaOrmActor` derive macro in `sea-orm#1`; blanket impl of `MvccProvider` for SeaORM `DatabaseConnection` wrapping `LanceBackedProvider` marker. -- [x] **SO-7** — Ontology codegen pipeline in `sea-orm#1`; generates `impl SupervisableShader for SeaOrmActor` from `OperatorTree` IR; 8 doc-tests inline. -- [ ] **SD-5** — SurrealDB live-query routing (`surrealdb#24`): `OperatorTree` → SurrealDB live `SELECT` subscription. **IN PROGRESS** — `EngineHint::SurrealDB` dispatch wired; event-stream back-pressure not yet resolved (blocked on surrealdb WebSocket backpressure spec review). - -### PP-13 audit verdicts addressed - -Two REJECTs from the prior PP-13 audit sweep were resolved by this wave: - -1. **DataFusion 53 API drift** — the `lance-graph-planner` crate was pinned to DataFusion 51 (PR #273); the `ir` submodule's `OperatorTree::walk_pre` uses a DataFusion-53-compatible `LogicalPlan` visitor interface. Resolved by keeping `ir` DataFusion-version-agnostic (the IR does not import DataFusion; the planner crate bridges). API drift is now contained to the planner crate boundary. -2. **`[workspace]` table missing ractor crates** — ractor + ractor-cluster were not in `[workspace.dependencies]`, causing `crates/cognitive-shader-actor/Cargo.toml` to declare a free-floating version pin that diverged from the version used by `lance-graph-supervisor`. Resolved by the new `[workspace.dependencies]` entries (`ractor = "0.13"`, `ractor-cluster = "0.13"`) added in this PR; both glue crates now reference `ractor.workspace = true`. - ---- - ## 2026-05-05 — Recently Shipped backfill (PRs #244–#335) > The "Recently Shipped PRs" table above stops at #243 (last refreshed 2026-04-21). Roughly 50 PRs have merged since. This section retrofits them. diff --git a/.claude/plans/integration-plan.md b/.claude/plans/integration-plan.md deleted file mode 100644 index 67fffa0e..00000000 --- a/.claude/plans/integration-plan.md +++ /dev/null @@ -1,571 +0,0 @@ -# Integration Plan: lance-graph ↔ surrealdb ↔ sea-orm ↔ ndarray - -**This repo**: `AdaWorldAPI/lance-graph` — graph engine + ontology + cognitive shaders + Arrow producer. - -**Status**: planning document. Companion plans live at the same path in the other repos: -- `AdaWorldAPI/surrealdb:.claude/plans/integration-plan.md` -- `AdaWorldAPI/sea-orm:.claude/plans/integration-plan.md` -- `AdaWorldAPI/ndarray:.claude/plans/integration-plan.md` - ---- - -## 1. Why this plan exists - -Four repos already point at one architecture, but the connective tissue is missing. The target is: - -> *Foundry-style ontology + BEAM-style supervision + ClickHouse-style analytic + Postgres-style ACID + cognitive primitives — all on one Arrow substrate, surfaced to consumers as a typed sea-orm API.* - -No existing stack has that combination: -- Foundry has the ontology + actions but no cognitive layer co-located -- BEAM/OTP has the supervision but no analytical substrate -- ClickHouse has the analytics but no awareness/reactivity -- Postgres has the durability but no graph + cognitive -- JanusGraph+Cassandra has graph + scale but eventual consistency and no cognition - -What each repo provides today: - -| Repo | Provides | Key crates / paths | -|---|---|---| -| **lance-graph** | Cypher on Arrow + ontology + cognitive shaders | `lance-graph-contract`, `-catalog`, `-ontology`, `-rbac`, `cognitive-shader-driver`, `thinking-engine`, `causal-edge`, `deepnsm`, `holograph`, `bgz-tensor` | -| **surrealdb** | Multi-model DB + change feeds + KV abstraction | `core/src/cf/`, `core/src/kvs/lance/`, `core/src/kvs/tikv/`, `core/src/kvs/key.rs` | -| **sea-orm** | Typed entity ORM + Arrow surface | `sea-orm-arrow` (2.0.0-rc.4), `sea-orm-macros`, `sea-orm-codegen` | -| **ndarray** | SIMD distance kernels + tensor primitives | `hpc-extras` feature, `heel_f64x8::cosine_f64_simd` etc. | - -What is missing — the **four glue crates**: - -| # | Glue crate | Owner repo | Bridges | -|---|---|---|---| -| 1 | `surrealdb-ractor` | surrealdb | `cf` / live queries → ractor mailboxes | -| 2 | `lance-graph-tikv-provider` | **this repo** | TiKV ranges → Arrow `TableProvider` | -| 3 | `sea-orm-ractor` | sea-orm | `Entity::PK` → ractor process registry | -| 4 | `cognitive-shader-actor` | **this repo** | cognitive shaders → `ractor::Actor` adapter | - -This repo owns glues **#2** and **#4**. - -### Integration principle: additive contract shape - -**All work in this plan is additive.** No existing trait signature changes. No existing module moves. No existing file deletes. New capabilities ship as **new traits in new modules** that consumers opt into by importing. The existing surface that downstream consumers already depend on stays exactly as-is. Any deprecation runway is signposted but out of scope here — five+ versions before any old surface is touched. - -**Contract crates are the integration surface.** Cross-engine vocabulary lives in zero-dep trait crates any consumer can pin without bringing heavy implementations. New capability = new trait. New trait = optional dep. No load-bearing dependency added to an existing consumer. - -### Contracts (existing + new) - -| Contract | Owner repo | Status today | This plan adds | -|---|---|---|---| -| `lance-graph-contract` (graph + IR vocabulary) | lance-graph | 0.1.x, agnostic build wired into surrealdb-core (`surrealdb/core/Cargo.toml:69`) | **new submodules** `ir`, `provider`, `actor` — 0.2.0, **additive only** (no existing item moves or changes signature) | -| `KVKey` / `KVValue` / `Datastore` / `Transaction` | surrealdb | stable (`surrealdb/core/src/kvs/key.rs`, `kvs/api.rs`) | unchanged — **new traits** `CfStream` and `MvccSource` added alongside | -| `EntityTrait` / `ColumnTrait` / `Select` | sea-orm | 2.0 (strongly-typed `COLUMN`, entity loader) | unchanged — **new trait** `EntityActor` + **new extension trait** `SelectArrowExt` | -| `ndarray::hpc::F64x8` + `heel_f64x8::*` | ndarray | 0.17 fork, stable | unchanged — **only new kernels** added | - -**New submodules this repo adds to `lance-graph-contract`** (all 0.2.0, additive): - -```rust -// crates/lance-graph-contract/src/ir.rs — NEW -pub trait Operator { fn cardinality_estimate(&self) -> Option; /* ... */ } -pub trait OperatorTree { /* compose-able plan IR */ } - -// crates/lance-graph-contract/src/provider.rs — NEW -/// Marker trait for Arrow providers backed by a specific storage. -/// Extends datafusion::catalog::TableProvider — doesn't replace it. -pub trait TikvBackedProvider: datafusion::catalog::TableProvider { - fn snapshot_ts(&self) -> Option; -} - -// crates/lance-graph-contract/src/actor.rs — NEW -/// Marker trait for shaders that can be wrapped as ractor::Actor. -/// Implementors live in lance-graph-cognitive crates; the actor -/// wrapper lives in cognitive-shader-actor. -pub trait CognitiveShader: Send + Sync + 'static { /* ... */ } -``` - -**Per-repo enforcement**: every Sprint item below is read as "add this; don't change what's there." - ---- - -## 2. Architecture diagram - -``` - ┌──────────────────────────────────────────┐ - │ consumer crate │ - └──────────────────┬───────────────────────┘ - │ typed entities - ▼ - ┌──────────────────────────────────────────┐ - │ sea-orm-arrow 2.0 │ (planner-aware ORM) - └────┬─────────────────┬───────────────┬───┘ - │ │ │ - ▼ ▼ ▼ - ┌───────────┐ ┌───────────┐ ┌───────────┐ - │ ractor │◄────│ surrealdb │ │ THIS REPO │ - │ (actors, │ #1 │ (cf + │ │lance-graph│ - │ mailboxes,│ │ live │ │ (Cypher, │ - │ supervis.)│ │ queries) │ │ ontology, │ - └─────┬─────┘ └─────┬─────┘ │cognitive) │ - │ #3 │ └─────┬─────┘ - ▼ │ #4 │ #2 - ┌───────────┐ │ │ - │ sea-orm │ ▼ ▼ - │ Entity │ ┌──────────────────────────┐ - │ Registry │ │ TiKV substrate │ - └───────────┘ │ (Raft + Percolator MVCC) │ - └──────────────────────────┘ - │ - ▼ - ┌─────────────────────────┐ - │ ndarray fork (SIMD) │ - │ shared across stack │ - └─────────────────────────┘ -``` - ---- - -## 3. Role of lance-graph in the integration - -### What this repo provides upstream - -- **Cypher → Arrow execution** via `crates/lance-graph` against any Arrow `TableProvider` -- **Ontology types** (`crates/lance-graph-ontology`) — typed node / edge / property shapes -- **Catalog** (`crates/lance-graph-catalog`) — schema registry, target for cross-repo codegen -- **RBAC** (`crates/lance-graph-rbac`) — permission enforcement -- **Contract crate** (`crates/lance-graph-contract`) — zero-dep traits already imported by `surrealdb-core` when the `lance-graph` feature is on (`surrealdb/core/Cargo.toml:69`) -- **Cognitive operators** — `cognitive-shader-driver`, `thinking-engine`, `causal-edge`, `deepnsm`, `holograph` - -### What lance-graph consumes downstream - -- Arrow `RecordBatch` inputs (from TiKV via glue #2, or from Lance projections fed by surrealdb's CDC pipeline — see surrealdb plan §6) -- ndarray SIMD distance kernels via `hpc-extras` -- `bgz-tensor` for shared tensor representation - ---- - -## 4. Current state — file-by-file - -### `crates/lance-graph-contract` -Zero-dep trait crate. Today this is the **only** lance-graph crate that `surrealdb-core` pulls in. **Sprint 0 adds new submodules** (`ir`, `provider`, `actor`) without touching the existing surface so today's consumers compile unchanged. - -### `crates/lance-graph-catalog` -Schema registry. Internal to lance-graph today. **Becomes the single source of truth** consumed by: -- `surrealdb` (via `DEFINE` codegen — new method added to `Catalog`) -- `sea-orm` (via Entity codegen — new method) -- `lance-graph` itself (existing `NodeShape` / `EdgeShape` API unchanged) - -Additive: new `to_sea_orm_entity()` and `to_surrealql_define()` methods; nothing existing changes. - -### `crates/lance-graph-ontology` -Typed shapes. This is the Foundry-equivalent **Object Model**. - -### `crates/lance-graph-rbac` -Maps to Foundry's permissions tier. - -### Cognitive crates -- `cognitive-shader-driver` — shader execution engine -- `thinking-engine` — reasoning operators -- `causal-edge` — causal graph primitives -- `deepnsm` — neural state machines -- `holograph` — holographic embeddings - -These run today as in-process invocations and **continue to do so**. The actor wrapper is a NEW crate (`cognitive-shader-actor`); the cognitive crates themselves stay unchanged. Consumers that want supervised behaviour opt into the wrapper; consumers that want in-process invocation keep it. - -### `crates/bgz-tensor` -Shared tensor type. Used by surrealdb's vector path and lance-graph cognitive crates. - ---- - -## 5. Glue #2 — `lance-graph-tikv-provider` - -**Goal**: lance-graph reads typed columnar projections from TiKV ranges as Arrow. - -**Why**: replaces JanusGraph-over-Cassandra. lance-graph today reads from in-process Arrow tables; for distributed graph workloads it needs a `TableProvider` that scans TiKV ranges using the schema declared in `lance-graph-catalog`. - -**Additive shape**: this is a **new crate** that implements DataFusion's existing `TableProvider` trait and lance-graph-contract's new `TikvBackedProvider` marker. No existing lance-graph crate changes. - -**Crate location**: `crates/lance-graph-tikv-provider/` - -### API sketch - -```rust -// crates/lance-graph-tikv-provider/src/lib.rs -use std::sync::Arc; -use arrow_array::RecordBatch; -use arrow_schema::SchemaRef; -use datafusion::catalog::TableProvider; -use datafusion::physical_plan::ExecutionPlan; -use lance_graph_catalog::{NodeShape, EdgeShape}; -use lance_graph_contract::provider::TikvBackedProvider; - -pub struct TikvNodeTableProvider { - /// TiKV transactional client. - client: Arc, - /// Shape from lance-graph-catalog. Drives schema + range encoding. - shape: NodeShape, - /// Optional MVCC snapshot. None = read latest. - snapshot_ts: Option, -} - -impl TikvNodeTableProvider { - pub async fn new( - client: Arc, - shape: NodeShape, - ) -> anyhow::Result { - Ok(Self { client, shape, snapshot_ts: None }) - } - - pub fn with_snapshot(mut self, ts: u64) -> Self { - self.snapshot_ts = Some(ts); - self - } -} - -#[async_trait::async_trait] -impl TableProvider for TikvNodeTableProvider { - fn schema(&self) -> SchemaRef { - self.shape.arrow_schema() - } - - async fn scan( - &self, - _state: &dyn datafusion::execution::context::SessionState, - projection: Option<&Vec>, - filters: &[datafusion::logical_expr::Expr], - limit: Option, - ) -> datafusion::error::Result> { - // 1. Translate filters into a TiKV key range via the shape. - let key_range = self.shape.range_from_filters(filters)?; - // 2. Snapshot read at the configured MVCC timestamp. - let snapshot_ts = match self.snapshot_ts { - Some(v) => v.into(), - None => self.client.current_timestamp().await?, - }; - let snapshot = self.client.snapshot(snapshot_ts, Default::default()); - // 3. Stream rows back as Arrow RecordBatch via batch_scan + decode. - let exec = TikvScanExec::new( - snapshot, key_range, self.shape.clone(), - projection.cloned(), limit, - ); - Ok(Arc::new(exec)) - } -} - -/// Marker impl from lance-graph-contract::provider. -impl TikvBackedProvider for TikvNodeTableProvider { - fn snapshot_ts(&self) -> Option { self.snapshot_ts } -} -``` - -### Why this is the JanusGraph replacement - -- JanusGraph's Cassandra adapter does the same thing — encode element into a key, scan ranges, decode rows. -- This version inherits TiKV's Percolator ACID + native MVCC — Cassandra is eventually consistent. -- The Arrow output drops directly into lance-graph's Cypher executor with zero copy. - -### Snapshot integration with the rest of the stack - -The `snapshot_ts: u64` field is the same number as: -- `surrealdb-core`'s `version` column in `kv-lance` and `lance-projection` schemas -- TiKV's native HLC timestamp (when surrealdb runs in `kv-tikv-native-mvcc` mode — surrealdb plan §5b) -- The version a Lance projection refresh commits at - -**One clock, all storage targets.** Enables cross-engine snapshot-consistent reads. - -### Edge tables - -A sibling `TikvEdgeTableProvider` handles edge shapes. Edges stored as `(src_node_id, edge_type, dst_node_id) → edge_props` so the encoded range starts with `src_node_id` — outbound expansion is a single range scan. - ---- - -## 6. Glue #4 — `cognitive-shader-actor` - -**Goal**: cognitive shaders become first-class supervisable actors. - -**Why**: today the cognitive crates are in-process. For an AGI-style architecture with let-it-crash recovery and back-pressure, they need to live in ractor's supervision tree. - -**Additive shape**: NEW crate. The cognitive crates themselves are unchanged — the wrapper is a *separate* dep that consumers opt into. Existing in-process call sites keep working. - -**Crate location**: `crates/cognitive-shader-actor/` - -### API sketch - -```rust -// crates/cognitive-shader-actor/src/lib.rs -use ractor::{Actor, ActorRef, ActorProcessingErr}; -use lance_graph_contract::actor::CognitiveShader; // new trait, see §1 Contracts -use arrow_array::RecordBatch; - -/// A cognitive shader wrapped as a ractor actor. One actor per shader instance; -/// the supervisor restarts it if the shader panics. Mailbox-bounded → back-pressure. -pub struct CognitiveShaderActor; - -#[derive(Debug)] -pub enum ShaderMessage { - Apply { - input: RecordBatch, - reply: ractor::RpcReplyPort>, - }, - ApplyDelta { delta: RecordBatch }, - Drain { reply: ractor::RpcReplyPort<()> }, -} - -pub struct ShaderState { - shader: Box, - inflight: usize, -} - -impl Actor for CognitiveShaderActor { - type Msg = ShaderMessage; - type State = ShaderState; - type Arguments = Box; - - async fn pre_start( - &self, _myself: ActorRef, shader: Self::Arguments, - ) -> Result { - Ok(ShaderState { shader, inflight: 0 }) - } - - async fn handle( - &self, myself: ActorRef, msg: Self::Msg, state: &mut Self::State, - ) -> Result<(), ActorProcessingErr> { - match msg { - ShaderMessage::Apply { input, reply } => { - state.inflight += 1; - let result = state.shader.apply(&input).await; - state.inflight -= 1; - let _ = reply.send(result); - } - ShaderMessage::ApplyDelta { delta } => { - state.shader.apply_delta(&delta).await?; - } - ShaderMessage::Drain { reply } => { - while state.inflight > 0 { tokio::task::yield_now().await; } - let _ = reply.send(()); - myself.stop(Some("drained".into())); - } - } - Ok(()) - } -} -``` - -### Supervisor topology - -``` -ShaderSupervisor (one-for-one, max 5 restarts in 60s) -├── ThinkingEngineActor -├── CausalEdgeActor -├── DeepNSMActor -├── HolographActor -└── CognitiveShaderDriverActor (orchestrates the others) -``` - -A misbehaving shader (panic, OOM, timeout) is restarted by its supervisor without affecting peers. **In-process call sites of the same shader continue to work** — the actor wrapper is opt-in. - ---- - -## 7. Sprint sequence (this repo) - -All sprints are **additive** — no existing crate changes signature, no existing module moves, no existing file deletes. - -### Sprint 0 — `lance-graph-contract` 0.2.0 (additive) (1 week) -- **Add** new submodules `ir`, `provider`, `actor` -- Existing surface stays exactly as-is; SemVer-minor bump because new public items -- Cut 0.2.0 so `surrealdb-core` can pin it -- Existing surrealdb consumers compile without code change at 0.1.x → 0.2.0 - -### Sprint 1 — `lance-graph-tikv-provider` MVP (2 weeks) -- New crate; depends on `tikv-client` (workspace), `arrow`, `datafusion`, `lance-graph-contract = 0.2` -- Implement `TikvNodeTableProvider::scan` for the read path -- Implement `TikvEdgeTableProvider::scan` for outbound expansion -- Implement `TikvBackedProvider` marker from the new contract submodule -- Integration test against local TiKV via `make tikv-up` -- Honor `snapshot_ts` for MVCC - -### Sprint 2 — `cognitive-shader-actor` MVP (1 week) -- New crate; depends on `ractor` + `lance-graph-cognitive` + `lance-graph-contract = 0.2` -- Wrap one shader (e.g. `thinking-engine`) end-to-end -- Demonstrate supervisor restart on shader panic -- Bench mailbox overhead vs direct invocation -- **In-process direct invocation continues to work** — the wrapper is additive - -### Sprint 3 — catalog → codegen (2 weeks) -- `lance-graph-catalog` gets **new methods** `to_sea_orm_entity()` and `to_surrealql_define()` -- No existing Catalog methods change signature -- Codegen sea-orm entity files (see sea-orm plan §4) -- Codegen SurrealDB `DEFINE` statements (see surrealdb plan §6) -- Round-trip property tests both directions - -### Sprint 4 — planner IR cost model (3 weeks) -- Operators in `lance-graph-contract::ir` carry cardinality estimates (additive within the new submodule) -- surrealdb's planner consumes the IR to route operators per-engine -- E2E test: a Cypher query touching surrealdb-kv + lance-graph + cognitive shader, results consumed via sea-orm-arrow - ---- - -## 8. Examples - -### Example 1 — Cypher over TiKV via the new provider - -```rust -use std::sync::Arc; -use lance_graph::CypherQuery; -use lance_graph_tikv_provider::{TikvNodeTableProvider, TikvEdgeTableProvider}; -use lance_graph_catalog::Catalog; - -#[tokio::main] -async fn main() -> anyhow::Result<()> { - let tikv = Arc::new( - tikv_client::TransactionClient::new(vec!["pd:2379"]).await?, - ); - let catalog = Catalog::load("./schema.yml")?; - - let person_provider = TikvNodeTableProvider::new( - tikv.clone(), catalog.node_shape("Person")?, - ).await?; - let knows_provider = TikvEdgeTableProvider::new( - tikv.clone(), catalog.edge_shape("KNOWS")?, - ).await?; - - let result = CypherQuery::new( - "MATCH (a:Person)-[:KNOWS]->(b:Person) - WHERE a.age > 30 RETURN b.name, b.age", - ) - .with_provider("Person", Arc::new(person_provider)) - .with_provider("KNOWS", Arc::new(knows_provider)) - .execute().await?; - - println!("{}", result.to_pretty_string()); - Ok(()) -} -``` - -### Example 2 — Cognitive shader in a supervision tree, fed by a live query - -```rust -use ractor::Actor; -use cognitive_shader_actor::{CognitiveShaderActor, ShaderMessage}; -use lance_graph_cognitive::ThinkingEngineShader; -use futures::StreamExt; - -#[tokio::main] -async fn main() -> anyhow::Result<()> { - let (actor, _h) = Actor::spawn( - Some("thinking-1".into()), CognitiveShaderActor, - Box::new(ThinkingEngineShader::new()), - ).await?; - - let mut deltas = surrealdb_ractor::live_stream( - "SELECT * FROM events WHERE category = 'plan'", - ).await?; - - while let Some(delta) = deltas.next().await { - actor.send_message(ShaderMessage::ApplyDelta { - delta: delta?.into_record_batch(), - })?; - } - Ok(()) -} -``` - -### Example 3 — Catalog-driven entity codegen (additive `to_*` methods) - -Single source of truth (`schema.yml`): - -```yaml -nodes: - Person: - pk: id - columns: - id: UInt64 - name: String - age: UInt32 - email: { type: String, unique: true } -edges: - KNOWS: - src: Person - dst: Person - properties: { since: Date } -``` - -Generates (via `catalog.to_sea_orm_entity()` — new method, no existing API touched): - -```rust -#[sea_orm::model] -#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)] -#[sea_orm(table_name = "person")] -pub struct Model { - #[sea_orm(primary_key)] - pub id: i64, - pub name: String, - pub age: u32, - #[sea_orm(unique)] - pub email: String, - #[sea_orm(has_many, via = "knows")] - pub knows: HasMany, -} -``` - -And (via `catalog.to_surrealql_define()`): - -```sql -DEFINE TABLE person SCHEMAFULL; -DEFINE FIELD id ON person TYPE int; -DEFINE FIELD name ON person TYPE string; -DEFINE FIELD age ON person TYPE int ASSERT $value >= 0; -DEFINE FIELD email ON person TYPE string; -DEFINE INDEX person_email ON person FIELDS email UNIQUE; -DEFINE TABLE knows SCHEMAFULL TYPE RELATION FROM person TO person; -DEFINE FIELD since ON knows TYPE datetime; -``` - ---- - -## 9. Open questions - -1. **Snapshot delivery** — should `lance-graph-tikv-provider` carry `snapshot_ts` via the provider, or via a DataFusion session setting? Sketch picks provider; alternative lets the planner change snapshot mid-query. -2. **Cognitive shader hot reload** — BEAM has it; Rust doesn't. Mitigation: stop + restart with new config via supervisor. -3. **Catalog format** — YAML for cross-tool consumption, Rust DSL for type safety, or both? Probably YAML canonical + Rust types generated. -4. **bgz-tensor placement** — should this crate move to the workspace root or even to `AdaWorldAPI/ndarray`? Currently at `crates/bgz-tensor` but consumed cross-repo. -5. **`lance-graph-contract` 0.2.0 SemVer** — 0.2.0 confirms additive-only intent (new public items, no breaking change). 0.1.x consumers compile unchanged. - ---- - - -## Post-implementation reconciliation (wave-3, 2026-05-18) - -Shipped contract surface diverged from the §1 Contracts table sketches in -three ways. The PP-13 savant flagged these as HOLDs; the source is better -than the original sketch in each case, so this note pins the docs to the -shipped reality: - -1. **`lance_graph_contract::provider::TikvBackedProvider`** extends - **`MvccProvider`** (this crate, zero-dep), NOT `datafusion::catalog::TableProvider` - directly. The original §1 sketch had `: TableProvider` which would have - forced the contract crate to pull in DataFusion as a dep — that breaks - the zero-dep guarantee. The shipped trait keeps the contract zero-dep; - any concrete `TableProvider` impl that wants the TiKV marker also - implements `MvccProvider`, and `TikvBackedProvider` is a refinement of - that marker. See `crates/lance-graph-contract/src/provider.rs:76`. - -2. **`lance_graph_contract::actor::SupervisableShader`** is the canonical - trait name (not `CognitiveShader` as in the original §6 sketch). The - rename avoids colliding with the existing - `lance_graph_contract::cognitive_shader::CognitiveShaderDriver` trait - surface (21KB module shipped earlier) — same crate, two distinct - shader concepts. `CognitiveShaderDriver` = in-process driver with - `ShaderDispatch` semantics; `SupervisableShader` = actor-wrapper-shaped - trait with `apply` / `apply_delta` / `drain` lifecycle. - -3. **`cognitive_shader_actor::messages::ShaderMessage

`** is generic - over a payload type `P` (instead of monomorphically using - `arrow_array::RecordBatch` as in the original §6 sketch). The actor - wrapper crate picks `RecordBatch` at instantiation time but other - consumers can pick alternative payloads. Better composition. - -All three changes were applied during wave-1 scaffolding. The plan §1 -Contracts table + §6 example should be read with these substitutions -in mind until the table itself is rewritten. - -## 10. Cross-references - -- **Glue #1** (surrealdb-ractor): `AdaWorldAPI/surrealdb:.claude/plans/integration-plan.md` §5 -- **Glue #3** (sea-orm-ractor): `AdaWorldAPI/sea-orm:.claude/plans/integration-plan.md` §5 -- **SIMD kernels**: `AdaWorldAPI/ndarray:.claude/plans/integration-plan.md` -- **lance-projection (additive sibling to kv-lance)**: `AdaWorldAPI/surrealdb:.claude/plans/integration-plan.md` §6 diff --git a/.gitignore b/.gitignore index c6b26609..b126097a 100644 --- a/.gitignore +++ b/.gitignore @@ -70,4 +70,3 @@ crates/thinking-engine/data/Qwopus3.5-27B-v3-BF16-silu/token_embd_4096x4096.u8 # Test fixtures (public-domain German legal/medical/tax data) .test/ -/crates/four-repo-demo/target/ diff --git a/Cargo.lock b/Cargo.lock index 65bd958e..3d693983 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4635,7 +4635,7 @@ dependencies = [ [[package]] name = "lance-graph-contract" -version = "0.2.0" +version = "0.1.0" dependencies = [ "criterion", "glob", diff --git a/Cargo.toml b/Cargo.toml index 65d6f38f..8b5cf911 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,12 +20,6 @@ members = [ "crates/cognitive-shader-driver", ] exclude = [ - # Sprint-0 scaffold stubs from the four-repo integration plan; promote to - # members once their heavy deps (tikv-client, ractor) compile cleanly - # in the workspace. See .claude/plans/integration-plan.md §5 and §6. - "crates/lance-graph-tikv-provider", - "crates/cognitive-shader-actor", - "crates/four-repo-demo", # Python bindings (upstream-inherited, opt-in via --manifest-path) "crates/lance-graph-python", "crates/lance-graph-codec-research", diff --git a/crates/cognitive-shader-actor/Cargo.lock b/crates/cognitive-shader-actor/Cargo.lock deleted file mode 100644 index b2d42ada..00000000 --- a/crates/cognitive-shader-actor/Cargo.lock +++ /dev/null @@ -1,1030 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "const-random", - "getrandom 0.3.4", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" - -[[package]] -name = "arrow-array" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd33d3e92f207444098c75b42de99d329562be0cf686b307b097cc52b4e999e" -dependencies = [ - "ahash", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "half", - "hashbrown 0.17.1", - "num-complex", - "num-integer", - "num-traits", -] - -[[package]] -name = "arrow-buffer" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6cd424c2693bcdbc150d843dc9d4d137dd2de4782ce6df491ad11a3a0416c0" -dependencies = [ - "bytes", - "half", - "num-bigint", - "num-traits", -] - -[[package]] -name = "arrow-data" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c88210023a2bfee1896af366309a3028fc3bcbd6515fa29a7990ee1baa08ee0" -dependencies = [ - "arrow-buffer", - "arrow-schema", - "half", - "num-integer", - "num-traits", -] - -[[package]] -name = "arrow-schema" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f633dbfdf39c039ada1bf9e34c694816eb71fbb7dc78f613993b7245e078a1ed" - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "bitflags" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" - -[[package]] -name = "bon" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97493a391b4b18ee918675fb8663e53646fd09321c58b46afa04e8ce2499c869" -dependencies = [ - "bon-macros", - "rustversion", -] - -[[package]] -name = "bon-macros" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2af3eac944c12cdf4423eab70d310da0a8e5851a18ffb192c0a5e3f7ae1663" -dependencies = [ - "darling", - "ident_case", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "bumpalo" -version = "3.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" - -[[package]] -name = "bytes" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" - -[[package]] -name = "cc" -version = "1.2.62" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" -dependencies = [ - "find-msvc-tools", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "chrono" -version = "0.4.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" -dependencies = [ - "iana-time-zone", - "num-traits", - "windows-link", -] - -[[package]] -name = "cognitive-shader-actor" -version = "0.1.0" -dependencies = [ - "anyhow", - "arrow-array", - "lance-graph-contract", - "ractor", - "tokio", -] - -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom 0.2.17", - "once_cell", - "tiny-keccak", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - -[[package]] -name = "darling" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "dashmap" -version = "6.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6361d5c062261c78a176addb82d4c821ae42bed6089de0e12603cd25de2059c" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "find-msvc-tools" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "futures" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" - -[[package]] -name = "futures-executor" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" - -[[package]] -name = "futures-macro" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" - -[[package]] -name = "futures-task" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" - -[[package]] -name = "futures-util" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "slab", -] - -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", -] - -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - -[[package]] -name = "half" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" -dependencies = [ - "cfg-if", - "crunchy", - "num-traits", - "zerocopy", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "hashbrown" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "iana-time-zone" -version = "0.1.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexmap" -version = "2.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" -dependencies = [ - "equivalent", - "hashbrown 0.17.1", -] - -[[package]] -name = "itoa" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" - -[[package]] -name = "js-sys" -version = "0.3.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" -dependencies = [ - "cfg-if", - "futures-util", - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "lance-graph-contract" -version = "0.2.0" -dependencies = [ - "glob", - "serde", - "serde_yaml", -] - -[[package]] -name = "libc" -version = "0.2.186" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" - -[[package]] -name = "libm" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "memchr" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "once_cell" -version = "1.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" - -[[package]] -name = "proc-macro2" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "ractor" -version = "0.15.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12c86deb2af198b10a04c4fb3fba73baf3bb300df765a29272f0e5583da7510" -dependencies = [ - "bon", - "dashmap", - "futures", - "js-sys", - "once_cell", - "strum", - "tokio", - "tokio_with_wasm", - "tracing", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-time", -] - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags", -] - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "slab" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "strum" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "syn" -version = "2.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tokio" -version = "1.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" -dependencies = [ - "pin-project-lite", - "tokio-macros", - "tracing", -] - -[[package]] -name = "tokio-macros" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio_with_wasm" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e40fbbbd95441133fe9483f522db15dbfd26dc636164ebd8f2dd28759a6aa6" -dependencies = [ - "js-sys", - "tokio", - "tokio_with_wasm_proc", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "tokio_with_wasm_proc" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01145a2c788d6aae4cd653afec1e8332534d7d783d01897cefcafe4428de992" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "tracing" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "unicode-ident" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.3+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "web-sys" -version = "0.3.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - -[[package]] -name = "wit-bindgen" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - -[[package]] -name = "zerocopy" -version = "0.8.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/crates/cognitive-shader-actor/Cargo.toml b/crates/cognitive-shader-actor/Cargo.toml deleted file mode 100644 index 5accf7e9..00000000 --- a/crates/cognitive-shader-actor/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -name = "cognitive-shader-actor" -version = "0.1.0" -edition = "2021" -license = "Apache-2.0" -description = "Glue #4 — wraps cognitive shaders as supervisable ractor::Actor instances (plan §6)" -# Sprint 2 wiring: see integration-plan.md §6 and §7 Sprint 2. - - -[dependencies] -# Contract crate: SupervisableShader trait, RestartBackoff, SupervisionPolicy (plan §6 + §1 Contracts) -lance-graph-contract = { version = "0.2", path = "../lance-graph-contract" } - -# Actor framework: ractor::Actor, ActorRef, RpcReplyPort, ActorProcessingErr (plan §6 API sketch) -ractor = "*" - -# Async runtime required by ractor's tokio backend (plan §6 + sprint 2) -tokio = { version = "*", features = ["rt-multi-thread", "macros"] } - -# Ergonomic error handling throughout the actor / supervisor surface (plan §6) -anyhow = "*" - -# Columnar payload type used in the plan §6 API sketch (RecordBatch) -arrow-array = "*" diff --git a/crates/cognitive-shader-actor/README.md b/crates/cognitive-shader-actor/README.md deleted file mode 100644 index dbce6d10..00000000 --- a/crates/cognitive-shader-actor/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# cognitive-shader-actor - -**Glue #4** from the lance-graph ↔ surrealdb ↔ sea-orm ↔ ndarray integration plan (§6). - -Wraps any [`SupervisableShader`](lance-graph-contract) implementor as a first-class -[`ractor::Actor`](https://crates.io/crates/ractor) sitting inside a supervision tree. - ---- - -## Why this crate exists (plan §6) - -Today the cognitive crates (`cognitive-shader-driver`, `thinking-engine`, `causal-edge`, -`deepnsm`, `holograph`) run as in-process invocations. For an AGI-style architecture with -let-it-crash recovery and back-pressure they need to live in ractor's supervision tree. - -This crate is the **adapter layer** — it is purely additive: - -- The cognitive crates themselves are **unchanged**. -- Existing in-process call sites **keep working**. -- Consumers that want supervised behaviour add `cognitive-shader-actor` as a dep; - consumers that want direct invocation do not. - ---- - -## Module layout - -| Module | Contents | -|---|---| -| `messages` | `ShaderMessage

` — the mailbox vocabulary (`Apply`, `ApplyDelta`, `Drain`) | -| `actor` | `CognitiveShaderActor` — the `ractor::Actor` adapter; state = `Arc` + `inflight` | -| `supervisor` | `ShaderSupervisor` — one-for-one restart policy backed by `RestartBackoff` + `SupervisionPolicy` | - ---- - -## Supervisor topology (plan §6) - -``` -ShaderSupervisor (one-for-one, max 5 restarts in 60 s) -├── ThinkingEngineActor -├── CausalEdgeActor -├── DeepNSMActor -├── HolographActor -└── CognitiveShaderDriverActor ← orchestrates the others -``` - -A misbehaving shader (panic, OOM, timeout) is restarted by its supervisor without -affecting peer shaders. - ---- - -## Quick start (Sprint 2 — not yet wired) - -```rust -use ractor::Actor; -use cognitive_shader_actor::{actor::CognitiveShaderActor, messages::ShaderMessage}; -use lance_graph_cognitive::ThinkingEngineShader; -use std::sync::Arc; - -#[tokio::main] -async fn main() -> anyhow::Result<()> { - // Sprint 2: uncomment once ractor wiring lands. - // let (actor, _handle) = Actor::spawn( - // Some("thinking-1".into()), - // CognitiveShaderActor::::new(), - // Arc::new(ThinkingEngineShader::new()), - // ).await?; - // - // actor.send_message(ShaderMessage::ApplyDelta { - // delta: some_record_batch, - // })?; - Ok(()) -} -``` - ---- - -## Sprint status - -This crate is **scaffolded in Sprint 1** (fan-out, worker LG-2). - -All method bodies use `unimplemented!("LG-2 stub — Sprint 2")`. The `ractor::Actor` trait -impl block is kept as a doc-comment scaffold in `src/actor.rs` ready for Sprint 2 to -uncomment and wire. Real ractor spawn + supervisor registration lands in Sprint 2 (plan §7). - -**Known gaps for Sprint 2:** - -- The commented-out `ractor::Actor` impl in `src/actor.rs` must be confirmed against the - exact ractor version resolved by `"*"` (currently resolves to 0.15.x). In particular: - `ActorProcessingErr` re-export path, `async fn` trait form vs `async-trait` macro. -- `ShaderSupervisor::spawn_child` return type will become - `ractor::ActorRef>` once wired. -- The workspace root `Cargo.toml` must add `crates/cognitive-shader-actor` to `members` - in the orchestrator consolidation pass (iron rule: LG-2 does not modify that file). - ---- - -## Dependencies - -| Dep | Purpose | -|---|---| -| `lance-graph-contract = "0.2"` | `SupervisableShader`, `RestartBackoff`, `SupervisionPolicy` | -| `ractor = "*"` | Actor framework: `Actor`, `ActorRef`, `RpcReplyPort` | -| `tokio` (rt-multi-thread, macros) | Async runtime for ractor's tokio backend | -| `anyhow` | Ergonomic error handling | -| `arrow-array` | `RecordBatch` — the default payload type in the shipped topology | - ---- - -## License - -Apache-2.0 — same as the rest of lance-graph. diff --git a/crates/cognitive-shader-actor/src/actor.rs b/crates/cognitive-shader-actor/src/actor.rs deleted file mode 100644 index 0fd3c0ec..00000000 --- a/crates/cognitive-shader-actor/src/actor.rs +++ /dev/null @@ -1,246 +0,0 @@ -//! # CognitiveShaderActor — ractor::Actor adapter (plan §6) -//! -//! [`CognitiveShaderActor`] is a thin `ractor::Actor` wrapper around any type -//! that implements [`SupervisableShader`]. One actor instance per shader instance; -//! the supervisor restarts it on panic without affecting peer shaders. -//! -//! ## Generics -//! -//! - `S: SupervisableShader` — the concrete shader (e.g. `ThinkingEngineShader`). -//! The associated type `S::Payload` becomes the actor's message payload type. -//! -//! ## State -//! -//! [`ShaderState`] holds: -//! - `shader: Arc` — shared reference so the actor can hand a clone to a -//! future if needed in Sprint 2. -//! - `inflight: usize` — count of in-progress `Apply` messages; used by `Drain` -//! to yield until the mailbox drains. -//! -//! ## Message handling (plan §6) -//! -//! | Message | Behaviour | -//! |---|---| -//! | `Apply` | `inflight += 1`; call `S::apply`; `inflight -= 1`; send result | -//! | `ApplyDelta` | call `S::apply_delta` | -//! | `Drain` | spin-yield while `inflight > 0`; call `S::drain`; reply; stop self | -//! -//! [`SupervisableShader`]: lance_graph_contract::actor::SupervisableShader - -use std::sync::Arc; - -use lance_graph_contract::actor::SupervisableShader; -use ractor::{Actor, ActorProcessingErr, ActorRef}; - -use crate::messages::ShaderMessage; - -// --------------------------------------------------------------------------- -// State -// --------------------------------------------------------------------------- - -/// Runtime state held by a live `CognitiveShaderActor` instance. -/// -/// Plan §6: "State holds `Arc` + `inflight: usize`." -pub struct ShaderState -where - S: SupervisableShader, -{ - /// The underlying shader. `Arc` so a future spawn in Sprint 2 can hold a - /// clone without copying the shader implementation. - pub shader: Arc, - - /// Count of `Apply` messages currently being processed. Used by `Drain` - /// to yield until the actor is idle before stopping. - pub inflight: usize, -} - -// --------------------------------------------------------------------------- -// Actor struct -// --------------------------------------------------------------------------- - -/// A cognitive shader wrapped as a ractor actor (plan §6, Glue #4). -/// -/// Instantiate one `CognitiveShaderActor` per shader instance and spawn it -/// via `ractor::Actor::spawn`. The supervisor topology in [`crate::supervisor`] -/// manages collections of these under a one-for-one policy. -/// -/// ### Type parameter -/// -/// `S` must implement [`SupervisableShader`]; its associated `Payload` type is -/// forwarded to `ShaderMessage` as the actor's message type. -pub struct CognitiveShaderActor -where - S: SupervisableShader, -{ - // Marker: the actor struct itself carries no runtime data; all state lives - // in ShaderState which ractor manages per-instance. - _marker: std::marker::PhantomData, -} - -impl CognitiveShaderActor -where - S: SupervisableShader, -{ - /// Construct the actor descriptor. The concrete shader is supplied as - /// `Arguments` when calling `ractor::Actor::spawn`. - pub fn new() -> Self { - Self { - _marker: std::marker::PhantomData, - } - } -} - -impl Default for CognitiveShaderActor -where - S: SupervisableShader, -{ - fn default() -> Self { - Self::new() - } -} - -// --------------------------------------------------------------------------- -// ractor::Actor impl -// --------------------------------------------------------------------------- -// -// ractor 0.15 ships WITHOUT the `async-trait` feature in its defaults; it uses -// native `async fn` in traits (Rust >= 1.75). The impl below uses bare -// `async fn` accordingly — no `#[async_trait]` macro needed. -// -// Associated types: -// Msg = ShaderMessage -// State = ShaderState -// Arguments = Arc (the concrete shader instance is passed on spawn) - -impl Actor for CognitiveShaderActor -where - S: SupervisableShader, - S::Error: Into, - S::Payload: std::fmt::Debug, -{ - type Msg = ShaderMessage; - type State = ShaderState; - type Arguments = Arc; - - /// Initialise actor state from the supplied shader instance. - /// - /// Calls `S::pre_start` so the shader can do one-time setup; wraps it in - /// `ShaderState` with `inflight = 0`. - async fn pre_start( - &self, - _myself: ActorRef, - shader: Self::Arguments, - ) -> Result { - shader - .pre_start() - .map_err(|e| Into::::into(e))?; - Ok(ShaderState { - shader, - inflight: 0, - }) - } - - /// Dispatch a single [`ShaderMessage`] onto the actor state (plan §6). - /// - /// | Variant | Action | - /// |---|---| - /// | `Apply` | increment `inflight`, call `shader.apply`, decrement, reply | - /// | `ApplyDelta` | call `shader.apply_delta` | - /// | `Drain` | yield until `inflight == 0`, call `shader.drain`, reply, stop | - async fn handle( - &self, - myself: ActorRef, - msg: Self::Msg, - state: &mut Self::State, - ) -> Result<(), ActorProcessingErr> { - match msg { - ShaderMessage::Apply { input, reply } => { - state.inflight += 1; - let result = state - .shader - .apply(input) - .map(Ok) - .unwrap_or_else(|e| Err(Into::::into(e))); - state.inflight -= 1; - // Ignore send errors — the caller may have dropped its receiver. - let _ = reply.send(result); - } - ShaderMessage::ApplyDelta { delta } => { - state - .shader - .apply_delta(delta) - .map_err(|e| Into::::into(e))?; - } - ShaderMessage::Drain { reply } => { - // Spin-yield until all in-flight Apply messages finish. - while state.inflight > 0 { - tokio::task::yield_now().await; - } - state - .shader - .drain() - .map_err(|e| Into::::into(e))?; - let _ = reply.send(()); - myself.stop(Some("drained".into())); - } - } - Ok(()) - } -} - -// --------------------------------------------------------------------------- -// Tests -// --------------------------------------------------------------------------- - -#[cfg(test)] -mod tests { - use super::*; - use ractor::call; - - /// A minimal shader for testing: `apply` doubles the input. - struct Counter; - - impl SupervisableShader for Counter { - type Payload = u32; - type Error = std::convert::Infallible; - - fn apply(&self, payload: u32) -> Result { - Ok(payload * 2) - } - } - - /// End-to-end test: spawn a `CognitiveShaderActor::`, send an - /// `Apply { input: 5 }` via `ractor::call!`, assert result is `Ok(10)`, - /// then drain the actor cleanly. - #[tokio::test] - async fn e2e_apply_doubles_input() { - // Spawn the actor with a Counter instance as Arguments. - let (actor_ref, handle) = Actor::spawn( - Some("counter-test".into()), - CognitiveShaderActor::::new(), - Arc::new(Counter), - ) - .await - .expect("failed to spawn CognitiveShaderActor"); - - // RPC: Apply { input: 5 }. The call! macro builds the reply port and - // passes it as the last argument to the message constructor closure. - let result = call!(actor_ref, |reply| ShaderMessage::Apply { - input: 5u32, - reply, - }) - .expect("call! failed"); - - // The shader doubles the input, so 5 -> 10. - assert!(result.is_ok(), "apply returned Err: {:?}", result); - assert_eq!(result.unwrap(), 10u32); - - // Drain the actor cleanly: wait for inflight to settle, then stop. - let drain_result = call!(actor_ref, |reply| ShaderMessage::Drain { reply }) - .expect("drain call! failed"); - assert_eq!(drain_result, ()); - - // Wait for the actor to finish. - handle.await.expect("actor join failed"); - } -} diff --git a/crates/cognitive-shader-actor/src/lib.rs b/crates/cognitive-shader-actor/src/lib.rs deleted file mode 100644 index edcccc47..00000000 --- a/crates/cognitive-shader-actor/src/lib.rs +++ /dev/null @@ -1,61 +0,0 @@ -//! # cognitive-shader-actor -//! -//! **Glue #4** from the lance-graph ↔ surrealdb ↔ sea-orm ↔ ndarray integration plan (§6). -//! -//! Wraps cognitive shaders (today: in-process invocations in `cognitive-shader-driver`, -//! `thinking-engine`, `causal-edge`, `deepnsm`, `holograph`) as first-class -//! [`ractor::Actor`] instances sitting inside a supervision tree. -//! -//! ## Why this crate exists (plan §6) -//! -//! Today the cognitive crates run in-process. For an AGI-style architecture with -//! let-it-crash recovery and back-pressure they need to live in ractor's supervision -//! tree. This crate is the adapter layer: -//! -//! - **Additive only** — the cognitive crates themselves are unchanged. Existing -//! in-process call sites keep working. -//! - Consumers that want supervised behaviour depend on this crate; consumers that -//! want direct invocation do not. -//! -//! ## Supervisor topology (plan §6) -//! -//! ```text -//! ShaderSupervisor (one-for-one, max 5 restarts in 60 s) -//! ├── ThinkingEngineActor -//! ├── CausalEdgeActor -//! ├── DeepNSMActor -//! ├── HolographActor -//! └── CognitiveShaderDriverActor (orchestrates the others) -//! ``` -//! -//! A misbehaving shader is restarted by its supervisor without affecting peers. -//! -//! ## Sprint status -//! -//! This crate is scaffolded in Sprint 1 (fan-out, worker LG-2). Real ractor wiring -//! lands in Sprint 2 (plan §7). All method bodies below use `unimplemented!("LG-2 stub — Sprint 2")`. -//! -//! ## Module layout -//! -//! | Module | Contents | -//! |---|---| -//! | [`messages`] | `ShaderMessage

` — the mailbox vocabulary | -//! | [`actor`] | `CognitiveShaderActor` — the `ractor::Actor` adapter | -//! | [`supervisor`] | `ShaderSupervisor` — restart policy + child spawning | - -/// Message vocabulary for the shader actor mailbox. -/// -/// See plan §6 — `ShaderMessage` variants match the plan's API sketch exactly. -pub mod messages; - -/// The `ractor::Actor` adapter for any [`SupervisableShader`] implementor. -/// -/// See plan §6 — `CognitiveShaderActor`. -/// -/// [`SupervisableShader`]: lance_graph_contract::actor::SupervisableShader -pub mod actor; - -/// Supervisor that manages shader actor children with restart back-off. -/// -/// See plan §6 supervisor topology diagram. -pub mod supervisor; diff --git a/crates/cognitive-shader-actor/src/messages.rs b/crates/cognitive-shader-actor/src/messages.rs deleted file mode 100644 index ba9db21b..00000000 --- a/crates/cognitive-shader-actor/src/messages.rs +++ /dev/null @@ -1,66 +0,0 @@ -//! # Shader actor message vocabulary (plan §6) -//! -//! Defines [`ShaderMessage

`], the single enum that flows through every -//! `CognitiveShaderActor`'s mailbox. The three variants match the plan §6 -//! API sketch for `ShaderMessage`: -//! -//! - [`ShaderMessage::Apply`] — transform a payload, reply with the result. -//! - [`ShaderMessage::ApplyDelta`] — fire-and-forget incremental update. -//! - [`ShaderMessage::Drain`] — graceful shutdown; reply when in-flight work -//! is complete. -//! -//! The payload type `P` is left generic so the contract crate (and this crate) -//! stay zero-dep on Arrow. The actor module fixes `P = arrow_array::RecordBatch` -//! for the shipped supervisor topology; other consumers may choose any `P: Send`. -//! -//! ## Sprint status -//! -//! Scaffold — Sprint 2 wires real ractor RPC ports. - -/// The mailbox vocabulary for a supervised cognitive shader (plan §6). -/// -/// `P` is the payload type — typically `arrow_array::RecordBatch` in the shipped -/// supervisor topology, but left generic so the message type is usable for any -/// payload that is `Send + 'static`. -/// -/// Every public variant is doc-commented with its plan §6 reference. -#[derive(Debug)] -pub enum ShaderMessage

-where - P: Send + 'static, -{ - /// Request the shader to transform `input` and return the result. - /// - /// The actor increments its `inflight` counter before calling - /// `SupervisableShader::apply`, decrements it after, then sends the result - /// through `reply`. Plan §6 `ShaderMessage::Apply`. - Apply { - /// The payload to transform. - input: P, - /// One-shot reply port; the actor sends `Ok(P)` on success, `Err` on failure. - /// - /// Plan §6: `reply: ractor::RpcReplyPort>`. - reply: ractor::RpcReplyPort>, - }, - - /// Fire-and-forget incremental update; no reply expected. - /// - /// Routes to `SupervisableShader::apply_delta`. The default trait impl - /// forwards to `apply` and discards the output, so shaders that do not - /// override `apply_delta` get correct behaviour for free. - /// - /// Plan §6 `ShaderMessage::ApplyDelta`. - ApplyDelta { - /// The incremental payload to fold into the shader's internal state. - delta: P, - }, - - /// Graceful drain: wait until all in-flight `Apply` messages complete, then - /// call `SupervisableShader::drain` and reply to the caller. - /// - /// The actor stops itself after replying. Plan §6 `ShaderMessage::Drain`. - Drain { - /// One-shot reply port; the actor sends `()` once drained. - reply: ractor::RpcReplyPort<()>, - }, -} diff --git a/crates/cognitive-shader-actor/src/supervisor.rs b/crates/cognitive-shader-actor/src/supervisor.rs deleted file mode 100644 index 95f32dab..00000000 --- a/crates/cognitive-shader-actor/src/supervisor.rs +++ /dev/null @@ -1,89 +0,0 @@ -//! # ShaderSupervisor — one-for-one restart policy (plan §6) -//! -//! [`ShaderSupervisor`] manages a collection of [`CognitiveShaderActor`] children -//! under the OTP-inspired policy described in the integration plan §6 supervisor -//! topology: -//! -//! ```text -//! ShaderSupervisor (one-for-one, max 5 restarts in 60 s) -//! ├── ThinkingEngineActor -//! ├── CausalEdgeActor -//! ├── DeepNSMActor -//! ├── HolographActor -//! └── CognitiveShaderDriverActor -//! ``` -//! -//! Policy parameters are sourced from the contract crate types: -//! - [`RestartBackoff`] — exponential back-off between restarts. -//! - [`SupervisionPolicy`] — which children to restart on failure. -//! -//! ## Sprint status -//! -//! Scaffold — Sprint 2 wires real ractor supervisor calls. The one public method -//! [`ShaderSupervisor::spawn_child`] returns `unimplemented!("LG-2 stub — Sprint 2")`. -//! -//! [`CognitiveShaderActor`]: crate::actor::CognitiveShaderActor -//! [`RestartBackoff`]: lance_graph_contract::actor::RestartBackoff -//! [`SupervisionPolicy`]: lance_graph_contract::actor::SupervisionPolicy - -use lance_graph_contract::actor::{RestartBackoff, SupervisionPolicy}; - -// --------------------------------------------------------------------------- -// ShaderSupervisor -// --------------------------------------------------------------------------- - -/// Supervisor that owns the lifecycle of all shader children (plan §6). -/// -/// Holds the restart policy ([`SupervisionPolicy`]) and back-off configuration -/// ([`RestartBackoff`]) sourced from `lance-graph-contract::actor`. In Sprint 2 -/// this struct becomes a `ractor::SupervisionEvent` handler that implements the -/// one-for-one restart loop. -pub struct ShaderSupervisor { - /// Which siblings to restart when a child fails. - /// - /// Defaults to `OneForOne` matching the plan §6 topology ("restart only the - /// failed child"). - pub policy: SupervisionPolicy, - - /// Exponential back-off between restart attempts. - /// - /// Defaults: 5 restarts in 60 s window, base 100 ms, cap 30 s (matches - /// [`RestartBackoff::default`]). - pub backoff: RestartBackoff, -} - -impl Default for ShaderSupervisor { - /// Returns a supervisor configured with the plan §6 defaults: - /// one-for-one policy, 5 restarts in 60 s, 100 ms base back-off. - fn default() -> Self { - Self { - policy: SupervisionPolicy::OneForOne, - backoff: RestartBackoff::default(), - } - } -} - -impl ShaderSupervisor { - /// Construct a supervisor with explicit policy and back-off. - /// - /// In most cases [`ShaderSupervisor::default`] is the right entry point. - /// Use this constructor when a non-default policy (e.g. `OneForAll`) or a - /// tighter back-off window is required for a specific deployment. - pub fn new(policy: SupervisionPolicy, backoff: RestartBackoff) -> Self { - Self { policy, backoff } - } - - /// Spawn a child shader actor under this supervisor's policy. - /// - /// Accepts a pre-built [`CognitiveShaderActor`] and the [`Arc`] argument - /// that ractor passes to `pre_start`. Returns the actor handle on success. - /// - /// **Sprint 2 stub** — real ractor spawn + supervision registration is wired in - /// Sprint 2. The return type will be `ractor::ActorRef>`. - /// - /// [`CognitiveShaderActor`]: crate::actor::CognitiveShaderActor - /// [`Arc`]: std::sync::Arc - pub fn spawn_child(&self, _name: &str) -> ! { - unimplemented!("LG-2 stub — Sprint 2") - } -} diff --git a/crates/four-repo-demo/Cargo.lock b/crates/four-repo-demo/Cargo.lock deleted file mode 100644 index 7fb8059a..00000000 --- a/crates/four-repo-demo/Cargo.lock +++ /dev/null @@ -1,1110 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "const-random", - "getrandom 0.3.4", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" - -[[package]] -name = "arrow-array" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd33d3e92f207444098c75b42de99d329562be0cf686b307b097cc52b4e999e" -dependencies = [ - "ahash", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "half", - "hashbrown 0.17.1", - "num-complex", - "num-integer", - "num-traits", -] - -[[package]] -name = "arrow-buffer" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6cd424c2693bcdbc150d843dc9d4d137dd2de4782ce6df491ad11a3a0416c0" -dependencies = [ - "bytes", - "half", - "num-bigint", - "num-traits", -] - -[[package]] -name = "arrow-data" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c88210023a2bfee1896af366309a3028fc3bcbd6515fa29a7990ee1baa08ee0" -dependencies = [ - "arrow-buffer", - "arrow-schema", - "half", - "num-integer", - "num-traits", -] - -[[package]] -name = "arrow-schema" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f633dbfdf39c039ada1bf9e34c694816eb71fbb7dc78f613993b7245e078a1ed" - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "bitflags" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" - -[[package]] -name = "bon" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97493a391b4b18ee918675fb8663e53646fd09321c58b46afa04e8ce2499c869" -dependencies = [ - "bon-macros", - "rustversion", -] - -[[package]] -name = "bon-macros" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2af3eac944c12cdf4423eab70d310da0a8e5851a18ffb192c0a5e3f7ae1663" -dependencies = [ - "darling", - "ident_case", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "bumpalo" -version = "3.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" - -[[package]] -name = "bytes" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" - -[[package]] -name = "cc" -version = "1.2.62" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" -dependencies = [ - "find-msvc-tools", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "chrono" -version = "0.4.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" -dependencies = [ - "iana-time-zone", - "num-traits", - "windows-link", -] - -[[package]] -name = "cognitive-shader-actor" -version = "0.1.0" -dependencies = [ - "anyhow", - "arrow-array", - "lance-graph-contract", - "ractor", - "tokio", -] - -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom 0.2.17", - "once_cell", - "tiny-keccak", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - -[[package]] -name = "darling" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "dashmap" -version = "6.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6361d5c062261c78a176addb82d4c821ae42bed6089de0e12603cd25de2059c" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "find-msvc-tools" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "four-repo-demo" -version = "0.1.0" -dependencies = [ - "anyhow", - "arrow-array", - "arrow-schema", - "cognitive-shader-actor", - "lance-graph-contract", - "ractor", - "tokio", -] - -[[package]] -name = "futures" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" - -[[package]] -name = "futures-executor" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" - -[[package]] -name = "futures-macro" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" - -[[package]] -name = "futures-task" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" - -[[package]] -name = "futures-util" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "slab", -] - -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", -] - -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - -[[package]] -name = "half" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" -dependencies = [ - "cfg-if", - "crunchy", - "num-traits", - "zerocopy", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "hashbrown" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "iana-time-zone" -version = "0.1.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexmap" -version = "2.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" -dependencies = [ - "equivalent", - "hashbrown 0.17.1", -] - -[[package]] -name = "itoa" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" - -[[package]] -name = "js-sys" -version = "0.3.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" -dependencies = [ - "cfg-if", - "futures-util", - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "lance-graph-contract" -version = "0.2.0" -dependencies = [ - "glob", - "serde", - "serde_yaml", -] - -[[package]] -name = "libc" -version = "0.2.186" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" - -[[package]] -name = "libm" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "memchr" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" - -[[package]] -name = "mio" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" -dependencies = [ - "libc", - "wasi", - "windows-sys", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "once_cell" -version = "1.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" - -[[package]] -name = "proc-macro2" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "ractor" -version = "0.15.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12c86deb2af198b10a04c4fb3fba73baf3bb300df765a29272f0e5583da7510" -dependencies = [ - "bon", - "dashmap", - "futures", - "js-sys", - "once_cell", - "strum", - "tokio", - "tokio_with_wasm", - "tracing", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-time", -] - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags", -] - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" -dependencies = [ - "errno", - "libc", -] - -[[package]] -name = "slab" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "socket2" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "strum" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "syn" -version = "2.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tokio" -version = "1.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" -dependencies = [ - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "tracing", - "windows-sys", -] - -[[package]] -name = "tokio-macros" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio_with_wasm" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e40fbbbd95441133fe9483f522db15dbfd26dc636164ebd8f2dd28759a6aa6" -dependencies = [ - "js-sys", - "tokio", - "tokio_with_wasm_proc", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "tokio_with_wasm_proc" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01145a2c788d6aae4cd653afec1e8332534d7d783d01897cefcafe4428de992" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "tracing" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "unicode-ident" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.3+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "web-sys" -version = "0.3.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "wit-bindgen" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - -[[package]] -name = "zerocopy" -version = "0.8.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/crates/four-repo-demo/Cargo.toml b/crates/four-repo-demo/Cargo.toml deleted file mode 100644 index 108011e3..00000000 --- a/crates/four-repo-demo/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "four-repo-demo" -version = "0.1.0" -edition = "2021" -description = "Minimal end-to-end integration demo: cognitive-shader-actor + lance-graph-contract (ir + actor glue)" - -[dependencies] -lance-graph-contract = { path = "../lance-graph-contract" } -cognitive-shader-actor = { path = "../cognitive-shader-actor" } -ractor = "*" -tokio = { version = "*", features = ["full"] } -arrow-array = "*" -arrow-schema = "*" -anyhow = "*" - -[[example]] -name = "run_demo" diff --git a/crates/four-repo-demo/README.md b/crates/four-repo-demo/README.md deleted file mode 100644 index e1613484..00000000 --- a/crates/four-repo-demo/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# four-repo-demo - -Minimal end-to-end integration demo for the lance-graph workspace. - -Cross-reference: `.claude/plans/integration-plan.md` — the full integration -story for the four-repo stack (lance-graph + surrealdb + sea-orm + ndarray). - ---- - -## What this crate demonstrates - -Three of the four glue crates from the integration plan are exercised together -in a single runnable example and integration test: - -| Glue | Crate / module | What is shown | -|------|----------------|---------------| -| **Glue #4** | `cognitive-shader-actor` | `SumShader` wrapped as a `ractor::Actor` via `CognitiveShaderActor` | -| **IR contract** | `lance-graph-contract::ir` | 3-node `OperatorTree` (RangeScan→Filter→CognitiveApply) built and inspected | -| **Actor contract** | `lance-graph-contract::actor` | `SupervisableShader` implemented on `SumShader` with `Arc>` state | - -### `SumShader` (real implementation) - -`SumShader` is not a stub. It accepts `RecordBatch` payloads with a single -`value: Int64` column and maintains a running cumulative sum using -`Arc>` interior mutability. Each `apply` call returns a -single-row `RecordBatch` containing the new running total. - -```text -Apply(value=5) → RecordBatch { value: [5] } (running sum = 5) -Apply(value=7) → RecordBatch { value: [12] } (running sum = 12) -Drain → actor stops cleanly -``` - -### Planner IR demo - -`planner::build_demo_tree` constructs a 3-node operator tree that mirrors a -real query plan shape: - -```text -CognitiveApply [Cognitive engine, ~1 row] -└── Filter [LanceGraph engine, ~500 rows] - └── RangeScan [TiKV engine, ~10 000 rows] -``` - -`OperatorTree::total_estimated_cardinality()` sums the estimates to -`10 501 rows`. - ---- - -## Running the demo - -```bash -cargo run --manifest-path crates/four-repo-demo/Cargo.toml --example run_demo -``` - -Expected output: - -``` -=== Cognitive Shader Actor Demo === -After sending value=5 → running sum = 5 -After sending value=7 → running sum = 12 -Actor drained cleanly. - -=== Demo Operator Tree === -CognitiveApply [sum_shader] engine=Cognitive cardinality=1 rows - Filter [filter_recent] engine=LanceGraph cardinality=500 rows - RangeScan [scan_events] engine=Tikv cardinality=10000 rows -Total estimated cardinality: 10501 rows - -=== Summary === -Running sum after 5+7 = 12 -Operator tree node count = 3 -Total estimated cardinality = 10501 rows -``` - -## Running the tests - -```bash -cargo test --manifest-path crates/four-repo-demo/Cargo.toml -``` - ---- - -## What is NOT demonstrated (and why) - -### Glue #1 — `surrealdb-ractor` (live query → actor mailbox) - -Described in integration-plan.md §1 (Contracts table) and cross-referenced -in §10. The crate lives in `AdaWorldAPI/surrealdb` and bridges SurrealDB -change feeds into `ractor` mailboxes. It requires a running SurrealDB -instance and the `surrealdb-ractor` crate to be wired in — neither is -available in the lance-graph standalone build. - -### Glue #2 — `lance-graph-tikv-provider` (TiKV range scan → Arrow) - -Described in integration-plan.md §5. The provider crate is scaffolded at -`crates/lance-graph-tikv-provider/` but requires a live TiKV cluster -(`make tikv-up`) and `tikv-client` which has native library dependencies. -This demo uses the `ir::EngineHint::Tikv` tag to represent where a -`RangeScan` would execute, but does not perform an actual TiKV scan. - -### Glue #3 — `sea-orm-ractor` (Entity PK → actor process registry) - -Described in integration-plan.md §10 cross-reference. The crate lives in -`AdaWorldAPI/sea-orm` and requires a running Postgres instance plus the -`sea-orm-ractor` crate. Not available in the lance-graph standalone build. - ---- - -## Module layout - -| Module | Contents | -|--------|----------| -| `src/cognitive.rs` | `SumShader` — `SupervisableShader` impl with running sum | -| `src/planner.rs` | `build_demo_tree` + `print_plan` + `node_count` | -| `examples/run_demo.rs` | Runnable `main()` exercising both parts end-to-end | -| `tests/end_to_end.rs` | Assertions for sum=5/12, tree 3 nodes, cardinality 10501 | - ---- - -Cross-reference: `.claude/plans/integration-plan.md` — full integration story, -sprint sequence, and links to companion plans in surrealdb / sea-orm / ndarray repos. diff --git a/crates/four-repo-demo/examples/run_demo.rs b/crates/four-repo-demo/examples/run_demo.rs deleted file mode 100644 index e0543f37..00000000 --- a/crates/four-repo-demo/examples/run_demo.rs +++ /dev/null @@ -1,103 +0,0 @@ -//! # run_demo — end-to-end integration demo -//! -//! Spawns a `CognitiveShaderActor::` via ractor, sends two Apply -//! messages with single-row batches (values 5, 7), then drains the actor and -//! prints the running sum (expected: 12). Also prints the planner's operator -//! tree and its estimated total cardinality. -//! -//! Run with: -//! ```text -//! cargo run --manifest-path crates/four-repo-demo/Cargo.toml --example run_demo -//! ``` - -use std::sync::Arc; - -use anyhow::Result; -use arrow_array::{Int64Array, RecordBatch}; -use arrow_schema::{DataType, Field, Schema}; -use cognitive_shader_actor::actor::CognitiveShaderActor; -use cognitive_shader_actor::messages::ShaderMessage; -use four_repo_demo::{build_demo_tree, print_plan, SumShader}; -use ractor::{call, Actor}; - -#[tokio::main] -async fn main() -> Result<()> { - // ----------------------------------------------------------------------- - // Part 1: Cognitive shader actor - // ----------------------------------------------------------------------- - println!("=== Cognitive Shader Actor Demo ==="); - - let shader = Arc::new(SumShader::new()); - let schema = Arc::new(Schema::new(vec![Field::new("value", DataType::Int64, false)])); - - // Spawn the actor with the SumShader instance as its arguments. - let (actor_ref, handle) = Actor::spawn( - Some("sum-shader-demo".into()), - CognitiveShaderActor::::new(), - shader, - ) - .await?; - - // --- Apply batch 1: value = 5 --- - let batch1 = RecordBatch::try_new( - schema.clone(), - vec![Arc::new(Int64Array::from(vec![5_i64]))], - )?; - let result1 = call!(actor_ref, |reply| ShaderMessage::Apply { - input: batch1, - reply, - })? - .map_err(|e| anyhow::anyhow!("apply 1 failed: {}", e))?; - let sum_after_5 = result1 - .column(0) - .as_any() - .downcast_ref::() - .unwrap() - .value(0); - println!("After sending value=5 → running sum = {}", sum_after_5); - - // --- Apply batch 2: value = 7 --- - let batch2 = RecordBatch::try_new( - schema.clone(), - vec![Arc::new(Int64Array::from(vec![7_i64]))], - )?; - let result2 = call!(actor_ref, |reply| ShaderMessage::Apply { - input: batch2, - reply, - })? - .map_err(|e| anyhow::anyhow!("apply 2 failed: {}", e))?; - let sum_after_12 = result2 - .column(0) - .as_any() - .downcast_ref::() - .unwrap() - .value(0); - println!("After sending value=7 → running sum = {}", sum_after_12); - - // --- Drain --- - call!(actor_ref, |reply| ShaderMessage::Drain { reply })?; - println!("Actor drained cleanly."); - handle.await?; - - println!(); - - // ----------------------------------------------------------------------- - // Part 2: Planner IR demo - // ----------------------------------------------------------------------- - let tree = build_demo_tree(); - print_plan(&tree); - - println!(); - println!("=== Summary ==="); - println!("Running sum after 5+7 = {}", sum_after_12); - println!( - "Operator tree node count = {}", - four_repo_demo::node_count(&tree) - ); - println!( - "Total estimated cardinality = {}", - tree.total_estimated_cardinality() - ); - - Ok(()) -} diff --git a/crates/four-repo-demo/src/cognitive.rs b/crates/four-repo-demo/src/cognitive.rs deleted file mode 100644 index 96af1503..00000000 --- a/crates/four-repo-demo/src/cognitive.rs +++ /dev/null @@ -1,176 +0,0 @@ -//! [`SumShader`] — a [`SupervisableShader`] impl that maintains a running sum -//! over Arrow `RecordBatch` payloads with a single `Int64` column named `value`. -//! -//! This is a *real* implementation, not a stub. It uses `Arc>` for -//! interior-mutable accumulator state so the shader is `Send + Sync + 'static` -//! as required by the trait. -//! -//! # Payload contract -//! -//! - Input: a [`RecordBatch`] with exactly one column `value: Int64`. -//! - Output: a [`RecordBatch`] with the same schema, containing **one row** -//! whose value is the running cumulative sum after adding all rows in the -//! input batch. -//! -//! # Example -//! -//! ``` -//! use std::sync::{Arc, Mutex}; -//! use four_repo_demo::cognitive::SumShader; -//! use lance_graph_contract::actor::SupervisableShader; -//! use arrow_array::{Int64Array, RecordBatch}; -//! use arrow_schema::{DataType, Field, Schema}; -//! -//! let shader = SumShader::new(); -//! let schema = Arc::new(Schema::new(vec![Field::new("value", DataType::Int64, false)])); -//! let batch = RecordBatch::try_new( -//! schema.clone(), -//! vec![Arc::new(Int64Array::from(vec![5_i64]))], -//! ).unwrap(); -//! let result = shader.apply(batch).unwrap(); -//! let col = result.column(0).as_any().downcast_ref::().unwrap(); -//! assert_eq!(col.value(0), 5); -//! ``` - -use std::sync::{Arc, Mutex}; - -use arrow_array::{Int64Array, RecordBatch}; -use arrow_schema::{DataType, Field, Schema}; -use lance_graph_contract::actor::SupervisableShader; - -/// Running-sum shader. -/// -/// Accepts batches with a single `value: Int64` column and emits a -/// single-row batch containing the cumulative sum after the current batch. -pub struct SumShader { - /// Accumulator — updated atomically on every [`apply`] call. - /// - /// `Arc` so the shader can be wrapped in `Arc` as required - /// by `CognitiveShaderActor::Arguments = Arc`. - accumulator: Arc>, - /// Cached output schema (`value: Int64`). - schema: Arc, -} - -impl SumShader { - /// Construct a fresh [`SumShader`] with accumulator at zero. - pub fn new() -> Self { - let schema = Arc::new(Schema::new(vec![Field::new("value", DataType::Int64, false)])); - Self { - accumulator: Arc::new(Mutex::new(0)), - schema, - } - } - - /// Return the current running sum without advancing the accumulator. - pub fn current_sum(&self) -> i64 { - *self.accumulator.lock().expect("accumulator lock poisoned") - } - - /// Build a single-row [`RecordBatch`] whose sole column contains `value`. - fn make_batch(&self, value: i64) -> Result { - let array = Arc::new(Int64Array::from(vec![value])); - RecordBatch::try_new(self.schema.clone(), vec![array]).map_err(Into::into) - } -} - -impl Default for SumShader { - fn default() -> Self { - Self::new() - } -} - -impl SupervisableShader for SumShader { - type Payload = RecordBatch; - type Error = anyhow::Error; - - fn shader_name(&self) -> &'static str { - "SumShader" - } - - fn apply(&self, payload: RecordBatch) -> Result { - // Extract the Int64 column named "value". - let col_idx = payload - .schema() - .index_of("value") - .map_err(|_| anyhow::anyhow!("SumShader: input batch has no 'value' column"))?; - - let col = payload - .column(col_idx) - .as_any() - .downcast_ref::() - .ok_or_else(|| anyhow::anyhow!("SumShader: 'value' column is not Int64"))?; - - // Sum every row in the incoming batch. - let batch_sum: i64 = (0..col.len()).map(|i| col.value(i)).sum(); - - // Add to the running accumulator. - let running = { - let mut acc = self.accumulator.lock().expect("accumulator lock poisoned"); - *acc += batch_sum; - *acc - }; - - self.make_batch(running) - } - - fn drain(&self) -> Result<(), anyhow::Error> { - // Nothing to flush for a pure in-memory accumulator. - Ok(()) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use arrow_array::Int64Array; - - fn single_row_batch(value: i64, schema: &Arc) -> RecordBatch { - RecordBatch::try_new( - schema.clone(), - vec![Arc::new(Int64Array::from(vec![value]))], - ) - .unwrap() - } - - fn extract_sum(batch: &RecordBatch) -> i64 { - batch - .column(0) - .as_any() - .downcast_ref::() - .unwrap() - .value(0) - } - - #[test] - fn running_sum_accumulates() { - let shader = SumShader::new(); - let schema = shader.schema.clone(); - - let r1 = shader.apply(single_row_batch(5, &schema)).unwrap(); - assert_eq!(extract_sum(&r1), 5); - - let r2 = shader.apply(single_row_batch(7, &schema)).unwrap(); - assert_eq!(extract_sum(&r2), 12); - } - - #[test] - fn multi_row_batch_sums_all_rows() { - let shader = SumShader::new(); - let schema = shader.schema.clone(); - // Batch with three rows: 1 + 2 + 3 = 6. - let batch = RecordBatch::try_new( - schema, - vec![Arc::new(Int64Array::from(vec![1_i64, 2, 3]))], - ) - .unwrap(); - let result = shader.apply(batch).unwrap(); - assert_eq!(extract_sum(&result), 6); - } - - #[test] - fn drain_succeeds() { - let shader = SumShader::new(); - assert!(shader.drain().is_ok()); - } -} diff --git a/crates/four-repo-demo/src/lib.rs b/crates/four-repo-demo/src/lib.rs deleted file mode 100644 index 9c225ccb..00000000 --- a/crates/four-repo-demo/src/lib.rs +++ /dev/null @@ -1,42 +0,0 @@ -//! # four-repo-demo -//! -//! Minimal end-to-end integration demo for the lance-graph workspace. -//! -//! ## What this crate demonstrates -//! -//! Three of the four glue crates described in -//! `.claude/plans/integration-plan.md` are exercised together: -//! -//! | Glue | Crate | Demonstrated here | -//! |------|-------|-------------------| -//! | #4 | `cognitive-shader-actor` | [`SumShader`] wrapped as a `ractor::Actor` via `CognitiveShaderActor` | -//! | IR | `lance-graph-contract::ir` | 3-node `OperatorTree` (RangeScan→Filter→CognitiveApply) | -//! | #4 contract | `lance-graph-contract::actor` | `SupervisableShader` implemented by [`SumShader`] | -//! -//! ## What is NOT demonstrated (and why) -//! -//! See [`README.md`] for the full list. In brief: -//! -//! - **Glue #1 `surrealdb-ractor`** — requires a running SurrealDB instance -//! with the `surrealdb-ractor` crate wired in. That crate lives in the -//! `AdaWorldAPI/surrealdb` repo and is not yet integrated. -//! - **Glue #2 `lance-graph-tikv-provider`** — requires a live TiKV cluster -//! (`make tikv-up`). The provider crate is scaffolded but not built here. -//! - **Glue #3 `sea-orm-ractor`** — requires a running Postgres and the -//! `sea-orm-ractor` crate from `AdaWorldAPI/sea-orm`. -//! -//! [`README.md`]: ../README.md -//! [`SumShader`]: crate::cognitive::SumShader - -/// Running-sum [`SupervisableShader`] implementation. -/// -/// [`SupervisableShader`]: lance_graph_contract::actor::SupervisableShader -pub mod cognitive; - -/// Planner IR demo — builds a 3-node [`OperatorTree`] and computes cardinality. -/// -/// [`OperatorTree`]: lance_graph_contract::ir::OperatorTree -pub mod planner; - -pub use cognitive::SumShader; -pub use planner::{build_demo_tree, node_count, print_plan}; diff --git a/crates/four-repo-demo/src/planner.rs b/crates/four-repo-demo/src/planner.rs deleted file mode 100644 index 0b254ef1..00000000 --- a/crates/four-repo-demo/src/planner.rs +++ /dev/null @@ -1,137 +0,0 @@ -//! Tiny demo planner that exercises [`lance_graph_contract::ir`] types. -//! -//! Builds a 3-node operator tree: -//! -//! ```text -//! CognitiveApply (Cognitive engine, ~1 row out) -//! └── Filter (LanceGraph engine, ~500 rows) -//! └── RangeScan (TiKV engine, ~10 000 rows) -//! ``` -//! -//! The tree is then inspected to demonstrate: -//! 1. [`OperatorTree::walk`] visiting all three nodes. -//! 2. [`OperatorTree::total_estimated_cardinality`] summing the three estimates. -//! -//! Nothing here touches a real database — this is a pure-IR demo showing -//! that the contract crate's IR types compose correctly and that a consumer -//! can build and introspect a query plan without touching any engine. - -use lance_graph_contract::ir::{Cardinality, EngineHint, Operator, OperatorKind, OperatorTree}; - -/// Estimated cardinalities used by the demo plan. -pub const SCAN_ROWS: u64 = 10_000; -pub const FILTER_ROWS: u64 = 500; -pub const APPLY_ROWS: u64 = 1; - -/// Build the demo 3-node operator tree. -/// -/// ``` -/// use four_repo_demo::planner::build_demo_tree; -/// -/// let tree = build_demo_tree(); -/// assert_eq!(tree.children.len(), 1); // CognitiveApply has one child -/// assert_eq!(tree.children[0].children.len(), 1); // Filter has one child (RangeScan) -/// ``` -pub fn build_demo_tree() -> OperatorTree { - // Leaf: RangeScan over TiKV. - let scan = OperatorTree::leaf( - Operator::new(OperatorKind::RangeScan) - .with_engine(EngineHint::Tikv) - .with_cardinality(Cardinality::rows(SCAN_ROWS)) - .with_tag("scan_events"), - ); - - // Middle: Filter executed by the lance-graph engine. - let filter = OperatorTree::node( - Operator::new(OperatorKind::Filter) - .with_engine(EngineHint::LanceGraph) - .with_cardinality(Cardinality::rows(FILTER_ROWS)) - .with_tag("filter_recent"), - vec![scan], - ); - - // Root: CognitiveApply (runs the SumShader in the Cognitive engine). - OperatorTree::node( - Operator::new(OperatorKind::CognitiveApply) - .with_engine(EngineHint::Cognitive) - .with_cardinality(Cardinality::rows(APPLY_ROWS)) - .with_tag("sum_shader"), - vec![filter], - ) -} - -/// Returns the number of nodes in the tree (depth-first count). -pub fn node_count(tree: &OperatorTree) -> usize { - let mut count = 0usize; - tree.walk(&mut |_| count += 1); - count -} - -/// Print a human-readable summary of the tree and its total cardinality. -pub fn print_plan(tree: &OperatorTree) { - println!("=== Demo Operator Tree ==="); - print_node(tree, 0); - println!( - "Total estimated cardinality: {}", - tree.total_estimated_cardinality() - ); -} - -fn print_node(tree: &OperatorTree, depth: usize) { - let indent = " ".repeat(depth); - let tag = tree.op.tag.unwrap_or("(no tag)"); - let engine = format!("{:?}", tree.op.engine); - let card = tree - .op - .estimated_cardinality - .map(|c| format!("{}", c)) - .unwrap_or_else(|| "unknown".into()); - println!( - "{}{:?} [{}] engine={} cardinality={}", - indent, - tree.op.kind, - tag, - engine, - card - ); - for child in &tree.children { - print_node(child, depth + 1); - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn tree_has_three_nodes() { - let tree = build_demo_tree(); - assert_eq!(node_count(&tree), 3); - } - - #[test] - fn total_cardinality_is_sum_of_all_estimates() { - let tree = build_demo_tree(); - let expected = SCAN_ROWS + FILTER_ROWS + APPLY_ROWS; - assert_eq!( - tree.total_estimated_cardinality(), - Cardinality::rows(expected) - ); - } - - #[test] - fn tree_shape_is_correct() { - let tree = build_demo_tree(); - // Root: CognitiveApply - assert_eq!(tree.op.kind, OperatorKind::CognitiveApply); - assert_eq!(tree.op.engine, EngineHint::Cognitive); - // Child: Filter - let filter = &tree.children[0]; - assert_eq!(filter.op.kind, OperatorKind::Filter); - assert_eq!(filter.op.engine, EngineHint::LanceGraph); - // Grandchild: RangeScan - let scan = &filter.children[0]; - assert_eq!(scan.op.kind, OperatorKind::RangeScan); - assert_eq!(scan.op.engine, EngineHint::Tikv); - } -} diff --git a/crates/four-repo-demo/tests/end_to_end.rs b/crates/four-repo-demo/tests/end_to_end.rs deleted file mode 100644 index 48213c6d..00000000 --- a/crates/four-repo-demo/tests/end_to_end.rs +++ /dev/null @@ -1,142 +0,0 @@ -//! End-to-end integration tests for the four-repo-demo crate. -//! -//! Covers: -//! 1. SumShader via `CognitiveShaderActor`: values 5, then 7 → cumulative sums 5, 12. -//! 2. OperatorTree: 3 nodes, correct shape, correct total cardinality. - -use std::sync::Arc; - -use anyhow::Result; -use arrow_array::{Int64Array, RecordBatch}; -use arrow_schema::{DataType, Field, Schema}; -use cognitive_shader_actor::actor::CognitiveShaderActor; -use cognitive_shader_actor::messages::ShaderMessage; -use four_repo_demo::planner::{build_demo_tree, node_count, APPLY_ROWS, FILTER_ROWS, SCAN_ROWS}; -use four_repo_demo::SumShader; -use lance_graph_contract::ir::{Cardinality, EngineHint, OperatorKind}; -use ractor::{call, Actor}; - -// --------------------------------------------------------------------------- -// Helper -// --------------------------------------------------------------------------- - -fn value_schema() -> Arc { - Arc::new(arrow_schema::Schema::new(vec![Field::new( - "value", - DataType::Int64, - false, - )])) -} - -fn single_row(value: i64, schema: &Arc) -> RecordBatch { - RecordBatch::try_new( - schema.clone(), - vec![Arc::new(Int64Array::from(vec![value]))], - ) - .unwrap() -} - -fn extract_sum(batch: &RecordBatch) -> i64 { - batch - .column(0) - .as_any() - .downcast_ref::() - .unwrap() - .value(0) -} - -// --------------------------------------------------------------------------- -// Test 1 — CognitiveShaderActor + SumShader -// --------------------------------------------------------------------------- - -/// Verify that the SumShader returns 5 after sending value=5, then 12 after -/// sending value=7, and that the actor drains cleanly. -#[tokio::test] -async fn sum_shader_actor_running_sum() -> Result<()> { - let schema = value_schema(); - let shader = Arc::new(SumShader::new()); - - let (actor_ref, handle) = Actor::spawn( - Some("e2e-sum-shader".into()), - CognitiveShaderActor::::new(), - shader, - ) - .await?; - - // Apply value=5 → expect running sum 5 - let r1 = call!(actor_ref, |reply| ShaderMessage::Apply { - input: single_row(5, &schema), - reply, - })? - .map_err(|e| anyhow::anyhow!("{}", e))?; - assert_eq!( - extract_sum(&r1), - 5, - "after value=5 the running sum should be 5" - ); - - // Apply value=7 → expect running sum 12 - let r2 = call!(actor_ref, |reply| ShaderMessage::Apply { - input: single_row(7, &schema), - reply, - })? - .map_err(|e| anyhow::anyhow!("{}", e))?; - assert_eq!( - extract_sum(&r2), - 12, - "after value=7 the running sum should be 12" - ); - - // Drain cleanly - call!(actor_ref, |reply| ShaderMessage::Drain { reply })?; - handle.await?; - - Ok(()) -} - -// --------------------------------------------------------------------------- -// Test 2 — OperatorTree shape and cardinality -// --------------------------------------------------------------------------- - -/// Verify the demo operator tree has exactly 3 nodes. -#[test] -fn operator_tree_has_three_nodes() { - let tree = build_demo_tree(); - assert_eq!(node_count(&tree), 3, "expected 3 nodes: RangeScan+Filter+CognitiveApply"); -} - -/// Verify the tree nodes are in the expected shape: CognitiveApply → Filter → RangeScan. -#[test] -fn operator_tree_shape_correct() { - let tree = build_demo_tree(); - - // Root - assert_eq!(tree.op.kind, OperatorKind::CognitiveApply); - assert_eq!(tree.op.engine, EngineHint::Cognitive); - assert_eq!(tree.children.len(), 1); - - // Filter - let filter = &tree.children[0]; - assert_eq!(filter.op.kind, OperatorKind::Filter); - assert_eq!(filter.op.engine, EngineHint::LanceGraph); - assert_eq!(filter.children.len(), 1); - - // RangeScan - let scan = &filter.children[0]; - assert_eq!(scan.op.kind, OperatorKind::RangeScan); - assert_eq!(scan.op.engine, EngineHint::Tikv); - assert!(scan.children.is_empty()); -} - -/// Verify the total estimated cardinality is SCAN_ROWS + FILTER_ROWS + APPLY_ROWS. -#[test] -fn operator_tree_total_cardinality() { - let tree = build_demo_tree(); - let expected = Cardinality::rows(SCAN_ROWS + FILTER_ROWS + APPLY_ROWS); - assert_eq!( - tree.total_estimated_cardinality(), - expected, - "total cardinality should be {SCAN_ROWS} + {FILTER_ROWS} + {APPLY_ROWS} = {}", - SCAN_ROWS + FILTER_ROWS + APPLY_ROWS - ); -} diff --git a/crates/lance-graph-contract/Cargo.toml b/crates/lance-graph-contract/Cargo.toml index bc876a3d..842507c8 100644 --- a/crates/lance-graph-contract/Cargo.toml +++ b/crates/lance-graph-contract/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lance-graph-contract" -version = "0.2.0" +version = "0.1.0" edition = "2021" description = "Thin contract crate: traits + types for lance-graph consumers (ladybug-rs, crewai-rust, n8n-rs)" license = "Apache-2.0" diff --git a/crates/lance-graph-contract/src/actor.rs b/crates/lance-graph-contract/src/actor.rs deleted file mode 100644 index f5b2eb63..00000000 --- a/crates/lance-graph-contract/src/actor.rs +++ /dev/null @@ -1,220 +0,0 @@ -//! Actor-wrapper marker traits for supervisable cognitive shaders. -//! -//! # Scope -//! -//! This module defines a **payload-generic supervisable shader trait** -//! that the `cognitive-shader-actor` crate wraps as a `ractor::Actor`. -//! It is intentionally distinct from -//! [`crate::cognitive_shader::CognitiveShaderDriver`], which is the -//! in-process driver trait with `ShaderDispatch` semantics. The -//! supervisable variant is for the lifecycle a supervisor cares about: -//! apply / drain / restart. -//! -//! # Additive contract -//! -//! Added in 0.2.0. Pure addition — no existing surface in this crate is -//! touched. Existing `CognitiveShaderDriver` implementors continue to -//! work; they may *additionally* implement [`SupervisableShader`] to -//! opt into supervised execution. -//! -//! # Zero-dep payload -//! -//! The payload type is a generic associated type (`Payload`) so this -//! crate stays zero-dep — the `cognitive-shader-actor` crate picks -//! `arrow_array::RecordBatch`; other consumers can pick whatever fits. - -use core::time::Duration; - -/// Restart strategy for a shader supervisor. -/// -/// Mirrors Erlang/OTP's classic three supervisor strategies. The -/// `cognitive-shader-actor` crate maps these onto ractor's supervisor -/// hierarchy; this enum is the contract vocabulary. -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] -#[non_exhaustive] -pub enum SupervisionPolicy { - /// Restart only the failed child. - #[default] - OneForOne, - /// Restart all children on any failure (use when children share state). - OneForAll, - /// Restart the failed child and every child started after it. - RestForOne, -} - -impl SupervisionPolicy { - /// Convenience constructor for the default policy. Equivalent to - /// `SupervisionPolicy::default()`, kept for call-site readability. - pub const fn one_for_one() -> Self { - Self::OneForOne - } -} - -/// Restart back-off configuration. -/// -/// Mirrors OTP's `max_restarts` / `max_seconds` window plus an exponential -/// inter-restart back-off. Defaults: 5 restarts in 60s, base 100ms, -/// max 30s back-off. -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub struct RestartBackoff { - /// Max restarts in the sliding window before the supervisor escalates. - pub max_restarts: u32, - /// Sliding window length. - pub window: Duration, - /// Initial inter-restart delay; doubles on each restart up to `max_delay`. - pub base_delay: Duration, - /// Cap on the inter-restart delay. - pub max_delay: Duration, -} - -impl Default for RestartBackoff { - fn default() -> Self { - Self { - max_restarts: 5, - window: Duration::from_secs(60), - base_delay: Duration::from_millis(100), - max_delay: Duration::from_secs(30), - } - } -} - -impl RestartBackoff { - /// Compute the delay before restart attempt `n` (1-indexed). - /// Exponential: `min(base * 2^(n-1), max_delay)`. - pub fn delay_for_attempt(&self, n: u32) -> Duration { - if n == 0 { - return Duration::ZERO; - } - let shift = (n - 1).min(31); // avoid overflow for huge n - let scaled = self.base_delay.saturating_mul(1u32 << shift); - if scaled > self.max_delay { - self.max_delay - } else { - scaled - } - } -} - -/// A shader that can be wrapped as a supervisable actor. -/// -/// Implementors are typically wrappers around concrete cognitive crates -/// (`thinking-engine`, `causal-edge`, `deepnsm`, `holograph`). The -/// `cognitive-shader-actor` crate consumes this trait to build a -/// `ractor::Actor` around any implementor. -/// -/// # Lifecycle (called by the supervisor in this order) -/// -/// 1. `pre_start` — runs once when the actor spawns. -/// 2. `apply` / `apply_delta` — called per message during normal operation. -/// 3. `drain` — called once during graceful shutdown; should flush -/// pending state. -/// 4. (on panic / Err return) → supervisor restarts: `pre_start` runs -/// again on the new instance. -/// -/// All methods take `&self` so implementors must use interior mutability -/// (e.g. `Mutex`, `RwLock`, `AtomicU*`) if they hold state. This keeps -/// ractor's `Actor` impl ergonomic (no `&mut` ping-pong through the -/// message handler). -pub trait SupervisableShader: Send + Sync + 'static { - /// The opaque payload this shader processes. The actor wrapper picks - /// a concrete type (typically `arrow_array::RecordBatch`). - type Payload: Send + Sync + 'static; - - /// Error type returned by shader operations. - type Error: core::fmt::Debug + Send + Sync + 'static; - - /// Stable name used as the supervision-tree key. Defaults to the - /// implementor type name via `core::any::type_name`. - fn shader_name(&self) -> &'static str { - core::any::type_name::() - } - - /// Hook called once when the supervisor spawns / respawns the actor. - /// Default: no-op. - fn pre_start(&self) -> Result<(), Self::Error> { - Ok(()) - } - - /// Apply the shader to a payload, returning the transformed payload. - /// Called per `Apply` message in the actor wrapper. - fn apply(&self, payload: Self::Payload) -> Result; - - /// Apply incrementally to a delta (no return value). The shader is - /// expected to fold the delta into its internal state. Default: - /// route through `apply` and discard the result. - fn apply_delta(&self, delta: Self::Payload) -> Result<(), Self::Error> { - self.apply(delta).map(|_| ()) - } - - /// Flush pending state. Called once during graceful shutdown. - /// Default: no-op. - fn drain(&self) -> Result<(), Self::Error> { - Ok(()) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use std::sync::atomic::{AtomicUsize, Ordering}; - use std::sync::Arc; - - #[test] - fn supervision_policy_default_is_one_for_one() { - assert_eq!(SupervisionPolicy::default(), SupervisionPolicy::OneForOne); - } - - #[test] - fn restart_backoff_exponential() { - let b = RestartBackoff { - base_delay: Duration::from_millis(100), - max_delay: Duration::from_secs(10), - ..Default::default() - }; - assert_eq!(b.delay_for_attempt(0), Duration::ZERO); - assert_eq!(b.delay_for_attempt(1), Duration::from_millis(100)); - assert_eq!(b.delay_for_attempt(2), Duration::from_millis(200)); - assert_eq!(b.delay_for_attempt(3), Duration::from_millis(400)); - // Eventually clamped to max_delay. - assert_eq!(b.delay_for_attempt(20), Duration::from_secs(10)); - } - - #[test] - fn restart_backoff_huge_n_does_not_overflow() { - let b = RestartBackoff::default(); - // u32::MAX attempts should still produce a sane value. - let d = b.delay_for_attempt(u32::MAX); - assert!(d <= b.max_delay); - } - - /// A minimal shader for testing the trait shape. - struct Counter { - n: AtomicUsize, - } - - impl SupervisableShader for Counter { - type Payload = u32; - type Error = core::convert::Infallible; - - fn apply(&self, payload: u32) -> Result { - self.n.fetch_add(payload as usize, Ordering::Relaxed); - Ok(payload * 2) - } - } - - #[test] - fn supervisable_shader_defaults() { - let c = Arc::new(Counter { - n: AtomicUsize::new(0), - }); - assert!(c.pre_start().is_ok()); - assert_eq!(c.apply(5).unwrap(), 10); - assert_eq!(c.n.load(Ordering::Relaxed), 5); - // Default apply_delta routes through apply and discards. - c.apply_delta(3).unwrap(); - assert_eq!(c.n.load(Ordering::Relaxed), 8); - assert!(c.drain().is_ok()); - // Default shader_name returns the type name. - assert!(c.shader_name().contains("Counter")); - } -} diff --git a/crates/lance-graph-contract/src/ir.rs b/crates/lance-graph-contract/src/ir.rs deleted file mode 100644 index 764b740d..00000000 --- a/crates/lance-graph-contract/src/ir.rs +++ /dev/null @@ -1,291 +0,0 @@ -//! Federated planner IR — operator vocabulary for cross-engine query routing. -//! -//! # Scope -//! -//! This module defines the **operator IR** that a *federated* planner uses -//! to decide which backend executes which part of a query: -//! -//! - PK lookup → KV (RocksDB / SurrealKV / TiKV) -//! - Range / aggregate → Lance projection (DataFusion) -//! - Cypher / graph traversal → lance-graph -//! - Vector ANN → lance-index -//! - Cognitive reasoning → cognitive-shader-actor -//! -//! It is intentionally **distinct from `crate::plan::PlannerContract`**, -//! which is the *lance-graph planner's* interface (the engine that -//! consumers like ladybug-rs talk to). The IR here is a level above: -//! it carries enough information for a cross-engine planner to choose -//! between engines per operator. -//! -//! It is also distinct from `crate::orchestration::OrchestrationBridge`, -//! which routes whole steps across systems (crewai-rust, n8n-rs, etc.). -//! The IR here routes operators within a single query. -//! -//! # Additive contract -//! -//! Added in 0.2.0. Pure addition — no existing surface in this crate is -//! touched. Consumers that don't import [`ir`] see no change. -//! -//! # Zero-dep -//! -//! Like the rest of this crate, this module pulls no dependencies. The -//! concrete planner that consumes the IR (in `surrealdb-core`) does the -//! cost-based decisions; here we just define the vocabulary. - -use core::fmt; - -/// Cardinality estimate for an operator's output, in rows. -/// -/// `None` = unknown. Implementations should prefer to return `Some(0)` -/// rather than `None` when they can prove the result is empty -/// (e.g. a contradiction predicate), so the planner can prune the branch. -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct Cardinality(pub u64); - -impl Cardinality { - pub const UNKNOWN: Option = None; - pub const EMPTY: Self = Self(0); - - #[inline] - pub const fn rows(rows: u64) -> Self { - Self(rows) - } - - /// Saturating addition — for unioning two operator outputs. - #[inline] - pub const fn saturating_add(self, other: Self) -> Self { - Self(self.0.saturating_add(other.0)) - } - - /// Saturating multiplication — for cross-products. - #[inline] - pub const fn saturating_mul(self, other: Self) -> Self { - Self(self.0.saturating_mul(other.0)) - } -} - -impl fmt::Display for Cardinality { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{} rows", self.0) - } -} - -/// Which engine an operator targets. The planner uses this to decide -/// dispatch and to estimate per-engine cost. -/// -/// Adding a new engine is an additive enum variant — existing consumers -/// continue to compile (they will get a `non_exhaustive`-style warning -/// if they `match` exhaustively; mitigation: use `_ =>`). -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] -#[non_exhaustive] -pub enum EngineHint { - /// Embedded LSM KV (RocksDB / SurrealKV). - LocalKv, - /// Distributed transactional KV with native MVCC. - Tikv, - /// Lance dataset (DataFusion analytic path). - Lance, - /// In-process Cypher engine over Arrow tables. - LanceGraph, - /// HNSW / IVF_PQ vector index. - VectorIndex, - /// Cognitive shader (lance-graph-cognitive crates). - Cognitive, - /// Engine selection is deferred to the planner's cost model. - #[default] - Auto, -} - -/// Operator kind. The IR is intentionally coarse — it carries enough -/// signal for routing decisions, not enough to be a full physical plan. -/// -/// Concrete physical operators live in each engine. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] -#[non_exhaustive] -pub enum OperatorKind { - /// Read rows by primary key (point lookup). - PointGet, - /// Read rows by key range or secondary index range. - RangeScan, - /// Apply a predicate to a stream of rows. - Filter, - /// Project a subset of columns. - Project, - /// Aggregate (sum / count / avg / group-by). - Aggregate, - /// Inner / outer join across two operators. - Join, - /// Graph pattern match (Cypher MATCH). - GraphMatch, - /// Variable-length path traversal. - GraphExpand, - /// Vector ANN by distance. - VectorAnn, - /// Cognitive shader application (e.g. thinking-engine). - CognitiveApply, - /// Sink: write rows to a destination (typically transactional). - Sink, -} - -/// One operator in the IR tree. -/// -/// This is a value type — `Operator` instances are cheap to construct -/// and inspect. The planner walks an [`OperatorTree`] and chooses an -/// [`EngineHint`] per node. -#[derive(Clone, Debug)] -pub struct Operator { - /// What this operator does. - pub kind: OperatorKind, - /// Where it should run. `Auto` defers to the cost model. - pub engine: EngineHint, - /// Estimated output cardinality (None = unknown). - pub estimated_cardinality: Option, - /// Tag for diagnostics / EXPLAIN output. - pub tag: Option<&'static str>, -} - -impl Operator { - /// Build a new operator. The estimated_cardinality and tag default to None. - pub const fn new(kind: OperatorKind) -> Self { - Self { - kind, - engine: EngineHint::Auto, - estimated_cardinality: None, - tag: None, - } - } - - /// Builder: pin the engine. - pub const fn with_engine(mut self, engine: EngineHint) -> Self { - self.engine = engine; - self - } - - /// Builder: attach a cardinality estimate. - pub const fn with_cardinality(mut self, c: Cardinality) -> Self { - self.estimated_cardinality = Some(c); - self - } - - /// Builder: attach a diagnostic tag. - pub const fn with_tag(mut self, tag: &'static str) -> Self { - self.tag = Some(tag); - self - } -} - -/// Composable operator tree. The IR is a tree, not a DAG — shared -/// subexpressions are inlined (the planner is free to CSE downstream). -/// -/// Leaves have no children; internal nodes carry child operators. -#[derive(Clone, Debug)] -pub struct OperatorTree { - pub op: Operator, - pub children: Vec, -} - -impl OperatorTree { - /// Leaf node. - pub fn leaf(op: Operator) -> Self { - Self { - op, - children: Vec::new(), - } - } - - /// Internal node with the given children. - pub fn node(op: Operator, children: Vec) -> Self { - Self { op, children } - } - - /// Walk the tree depth-first, calling `f` on every node. - pub fn walk(&self, f: &mut impl FnMut(&Operator)) { - f(&self.op); - for c in &self.children { - c.walk(f); - } - } - - /// Sum of estimated cardinalities of all nodes whose estimate is known. - /// Useful as a rough total-work estimator for plan comparison. - pub fn total_estimated_cardinality(&self) -> Cardinality { - let mut total = Cardinality::EMPTY; - self.walk(&mut |op| { - if let Some(c) = op.estimated_cardinality { - total = total.saturating_add(c); - } - }); - total - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn cardinality_arithmetic_saturates() { - let a = Cardinality::rows(u64::MAX - 1); - let b = Cardinality::rows(10); - assert_eq!(a.saturating_add(b), Cardinality::rows(u64::MAX)); - assert_eq!(a.saturating_mul(b), Cardinality::rows(u64::MAX)); - } - - #[test] - fn operator_builder_chain() { - let op = Operator::new(OperatorKind::RangeScan) - .with_engine(EngineHint::Tikv) - .with_cardinality(Cardinality::rows(1000)) - .with_tag("scan_users"); - assert_eq!(op.kind, OperatorKind::RangeScan); - assert_eq!(op.engine, EngineHint::Tikv); - assert_eq!(op.estimated_cardinality, Some(Cardinality::rows(1000))); - assert_eq!(op.tag, Some("scan_users")); - } - - #[test] - fn tree_walks_in_dfs_order() { - let tree = OperatorTree::node( - Operator::new(OperatorKind::Join).with_tag("root"), - vec![ - OperatorTree::leaf( - Operator::new(OperatorKind::RangeScan) - .with_engine(EngineHint::Tikv) - .with_tag("left"), - ), - OperatorTree::leaf( - Operator::new(OperatorKind::PointGet) - .with_engine(EngineHint::LocalKv) - .with_tag("right"), - ), - ], - ); - let mut visited = Vec::new(); - tree.walk(&mut |op| visited.push(op.tag.unwrap_or("?"))); - assert_eq!(visited, vec!["root", "left", "right"]); - } - - #[test] - fn total_cardinality_sums_known_only() { - let tree = OperatorTree::node( - Operator::new(OperatorKind::Join), // no estimate - vec![ - OperatorTree::leaf( - Operator::new(OperatorKind::RangeScan) - .with_cardinality(Cardinality::rows(100)), - ), - OperatorTree::leaf( - Operator::new(OperatorKind::RangeScan) - .with_cardinality(Cardinality::rows(200)), - ), - OperatorTree::leaf(Operator::new(OperatorKind::Filter)), // no estimate - ], - ); - assert_eq!(tree.total_estimated_cardinality(), Cardinality::rows(300)); - } - - #[test] - fn engine_hint_default_is_auto() { - assert_eq!(EngineHint::default(), EngineHint::Auto); - } -} diff --git a/crates/lance-graph-contract/src/lib.rs b/crates/lance-graph-contract/src/lib.rs index 485b028c..8ffd59b5 100644 --- a/crates/lance-graph-contract/src/lib.rs +++ b/crates/lance-graph-contract/src/lib.rs @@ -33,28 +33,8 @@ //! - [`collapse_gate`] — Per-row write airgap (`GateDecision`, `MergeMode`) //! - [`cycle_accumulator`] — Per-cadence flush gate; absorbs the L1↔L3 //! speed ratio. Distinct from `collapse_gate` per topology I-4. -//! -//! ## 0.2.0 — additive cross-engine vocabulary (added 2026-05-18) -//! -//! - [`ir`] — Federated planner IR: `Operator`, `OperatorKind`, `OperatorTree`, -//! `Cardinality`, `EngineHint`. Coarse cross-engine planner vocabulary; -//! distinct from [`plan::PlannerContract`] (lance-graph's own planner -//! interface) and from [`orchestration::OrchestrationBridge`] (step-level -//! cross-system routing). -//! - [`provider`] — Backend provider markers: `BackendId`, `MvccProvider`, -//! `TikvBackedProvider`, `LanceBackedProvider`. Zero-dep marker traits -//! for `TableProvider` implementations (e.g. `lance-graph-tikv-provider`) -//! so the planner can compose snapshot-consistent reads across engines. -//! - [`actor`] — Supervisable-shader vocabulary: `SupervisableShader`, -//! `SupervisionPolicy`, `RestartBackoff`. Distinct from -//! [`cognitive_shader::CognitiveShaderDriver`] (in-process driver -//! interface); consumed by the `cognitive-shader-actor` crate to wrap -//! shaders as `ractor::Actor`s. -//! -//! All three modules are pure additions; the 0.1.x surface is unchanged. pub mod a2a_blackboard; -pub mod actor; pub mod auth; pub mod cam; pub mod cognitive_shader; @@ -70,7 +50,6 @@ pub mod grammar; pub mod graph_render; pub mod hash; pub mod high_heel; -pub mod ir; pub mod jit; pub mod literal_graph; pub mod mail; @@ -83,7 +62,6 @@ pub mod orchestration; pub mod orchestration_mode; pub mod persona; pub mod plan; -pub mod provider; pub mod property; pub mod proprioception; pub mod qualia; diff --git a/crates/lance-graph-contract/src/provider.rs b/crates/lance-graph-contract/src/provider.rs deleted file mode 100644 index 49e2d6d9..00000000 --- a/crates/lance-graph-contract/src/provider.rs +++ /dev/null @@ -1,167 +0,0 @@ -//! Backend provider marker traits. -//! -//! # Scope -//! -//! Markers for backend-specific Arrow providers used by the federated -//! planner. The concrete `TableProvider` impls (DataFusion) live in -//! their owner crates (e.g. `lance-graph-tikv-provider`); this module -//! provides the **zero-dep marker vocabulary** the contract crate uses -//! to talk about them without pulling in DataFusion or Arrow as deps. -//! -//! # Additive contract -//! -//! Added in 0.2.0. Pure addition — no existing surface is touched. -//! -//! # Pattern -//! -//! ```rust,ignore -//! // In lance-graph-tikv-provider: -//! use datafusion::catalog::TableProvider; -//! use lance_graph_contract::provider::{BackendId, MvccProvider}; -//! -//! pub struct TikvNodeTableProvider { /* ... */ } -//! -//! impl TableProvider for TikvNodeTableProvider { /* DataFusion impl */ } -//! -//! impl MvccProvider for TikvNodeTableProvider { -//! fn backend(&self) -> BackendId { BackendId::Tikv } -//! fn snapshot_ts(&self) -> Option { self.snapshot_ts } -//! } -//! ``` -//! -//! The federated planner then uses `MvccProvider::snapshot_ts()` to -//! propagate a consistent snapshot across engines, regardless of which -//! concrete `TableProvider` is in play. - -/// Which storage backend an Arrow provider sources from. -/// -/// Adding a new backend is an additive enum variant — `#[non_exhaustive]` -/// means consumers must use `_ =>` in exhaustive matches, so a new -/// variant does not break their code. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] -#[non_exhaustive] -pub enum BackendId { - /// Embedded LSM KV (RocksDB / SurrealKV). - LocalKv, - /// Distributed transactional KV (TiKV). - Tikv, - /// Lance dataset (columnar projection or primary store). - Lance, - /// In-memory Arrow table (test fixture or hot cache). - InMemory, -} - -/// A provider that exposes a MVCC snapshot timestamp. -/// -/// Implementors are `TableProvider`s (DataFusion) that source from an -/// engine with a notion of a read-snapshot — TiKV (Percolator HLC), -/// Lance (dataset version), or surrealdb (KV generation). -/// -/// The planner uses this to compose snapshot-consistent reads across -/// engines: a single `u64` timestamp threads through every provider -/// in the plan. -pub trait MvccProvider { - /// Identifies the backend this provider sources from. - fn backend(&self) -> BackendId; - - /// The MVCC snapshot timestamp this provider is bound to. - /// `None` means "read latest at scan time" (less consistent across - /// engines but cheaper). - fn snapshot_ts(&self) -> Option; -} - -/// A provider that exposes a TiKV snapshot. Refinement of [`MvccProvider`] -/// for the TiKV case, used as a marker so the planner can detect TiKV -/// providers without downcasting through DataFusion's trait objects. -pub trait TikvBackedProvider: MvccProvider { - /// Always returns [`BackendId::Tikv`]. - fn backend(&self) -> BackendId { - BackendId::Tikv - } -} - -/// A provider that exposes a Lance snapshot. Refinement of [`MvccProvider`] -/// for the Lance case. -pub trait LanceBackedProvider: MvccProvider { - /// Always returns [`BackendId::Lance`]. - fn backend(&self) -> BackendId { - BackendId::Lance - } - - /// The Lance dataset version this provider is bound to. - /// - /// Defaults to `MvccProvider::snapshot_ts` — Lance uses `u64` - /// dataset versions, which fit the same number space. Override - /// only if a provider distinguishes "snapshot" (for cross-engine - /// consistency) from "dataset version" (for time-travel). - fn dataset_version(&self) -> Option { - ::snapshot_ts(self) - } -} - -/// Compose two snapshot timestamps into the one a join must read at. -/// -/// Rule: the older of the two (smaller `u64`), since reading both at -/// max(a, b) would give a non-snapshot-consistent view if one engine -/// hasn't caught up. `None` propagates as "latest" → pick whichever -/// is concrete. -pub fn min_snapshot_ts(a: Option, b: Option) -> Option { - match (a, b) { - (Some(x), Some(y)) => Some(x.min(y)), - (Some(x), None) | (None, Some(x)) => Some(x), - (None, None) => None, - } -} - -#[cfg(test)] -mod tests { - use super::*; - - struct StubTikv { - ts: Option, - } - impl MvccProvider for StubTikv { - fn backend(&self) -> BackendId { - BackendId::Tikv - } - fn snapshot_ts(&self) -> Option { - self.ts - } - } - impl TikvBackedProvider for StubTikv {} - - struct StubLance { - ts: Option, - } - impl MvccProvider for StubLance { - fn backend(&self) -> BackendId { - BackendId::Lance - } - fn snapshot_ts(&self) -> Option { - self.ts - } - } - impl LanceBackedProvider for StubLance {} - - #[test] - fn tikv_marker_reports_backend() { - let p = StubTikv { ts: Some(42) }; - assert_eq!(MvccProvider::backend(&p), BackendId::Tikv); - assert_eq!(p.snapshot_ts(), Some(42)); - } - - #[test] - fn lance_dataset_version_defaults_to_snapshot_ts() { - let p = StubLance { ts: Some(7) }; - assert_eq!(p.dataset_version(), Some(7)); - assert_eq!(MvccProvider::backend(&p), BackendId::Lance); - } - - #[test] - fn min_snapshot_picks_older() { - assert_eq!(min_snapshot_ts(Some(10), Some(5)), Some(5)); - assert_eq!(min_snapshot_ts(Some(10), None), Some(10)); - assert_eq!(min_snapshot_ts(None, Some(5)), Some(5)); - assert_eq!(min_snapshot_ts(None, None), None); - } -} diff --git a/crates/lance-graph-tikv-provider/Cargo.lock b/crates/lance-graph-tikv-provider/Cargo.lock deleted file mode 100644 index a0744236..00000000 --- a/crates/lance-graph-tikv-provider/Cargo.lock +++ /dev/null @@ -1,4533 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "adler2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" - -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "const-random", - "getrandom 0.3.4", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" - -[[package]] -name = "ar_archive_writer" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b" -dependencies = [ - "object", -] - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "arrow" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "378530e55cd479eda3c14eb345310799717e6f76d0c332041e8487022166b471" -dependencies = [ - "arrow-arith", - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-csv", - "arrow-data", - "arrow-ipc", - "arrow-json", - "arrow-ord", - "arrow-row", - "arrow-schema", - "arrow-select", - "arrow-string", -] - -[[package]] -name = "arrow-arith" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ab212d2c1886e802f51c5212d78ebbcbb0bec980fff9dadc1eb8d45cd0b738" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "num-traits", -] - -[[package]] -name = "arrow-array" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd33d3e92f207444098c75b42de99d329562be0cf686b307b097cc52b4e999e" -dependencies = [ - "ahash", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "chrono-tz", - "half", - "hashbrown 0.17.1", - "num-complex", - "num-integer", - "num-traits", -] - -[[package]] -name = "arrow-buffer" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6cd424c2693bcdbc150d843dc9d4d137dd2de4782ce6df491ad11a3a0416c0" -dependencies = [ - "bytes", - "half", - "num-bigint", - "num-traits", -] - -[[package]] -name = "arrow-cast" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c5aefb56a2c02e9e2b30746241058b85f8983f0fcff2ba0c6d09006e1cded7f" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-ord", - "arrow-schema", - "arrow-select", - "atoi", - "base64 0.22.1", - "chrono", - "comfy-table", - "half", - "lexical-core", - "num-traits", - "ryu", -] - -[[package]] -name = "arrow-csv" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94e8cf7e517657a52b91ea1263acf38c4ca62a84655d72458a3359b12ab97de" -dependencies = [ - "arrow-array", - "arrow-cast", - "arrow-schema", - "chrono", - "csv", - "csv-core", - "regex", -] - -[[package]] -name = "arrow-data" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c88210023a2bfee1896af366309a3028fc3bcbd6515fa29a7990ee1baa08ee0" -dependencies = [ - "arrow-buffer", - "arrow-schema", - "half", - "num-integer", - "num-traits", -] - -[[package]] -name = "arrow-ipc" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238438f0834483703d88896db6fe5a7138b2230debc31b34c0336c2996e3c64f" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", - "flatbuffers", - "lz4_flex", - "zstd", -] - -[[package]] -name = "arrow-json" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "205ca2119e6d679d5c133c6f30e68f027738d95ed948cf77677ea69c7800036b" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-ord", - "arrow-schema", - "arrow-select", - "chrono", - "half", - "indexmap 2.14.0", - "itoa", - "lexical-core", - "memchr", - "num-traits", - "ryu", - "serde_core", - "serde_json", - "simdutf8", -] - -[[package]] -name = "arrow-ord" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bffd8fd2579286a5d63bac898159873e5094a79009940bcb42bbfce4f19f1d0" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", -] - -[[package]] -name = "arrow-row" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab5994731204603c73ba69267616c50f80780774c6bb0476f1f830625115e0c" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "half", -] - -[[package]] -name = "arrow-schema" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f633dbfdf39c039ada1bf9e34c694816eb71fbb7dc78f613993b7245e078a1ed" -dependencies = [ - "serde_core", - "serde_json", -] - -[[package]] -name = "arrow-select" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd065c54172ac787cf3f2f8d4107e0d3fdc26edba76fdf4f4cc170258942222" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "num-traits", -] - -[[package]] -name = "arrow-string" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29dd7cda3ab9692f43a2e4acc444d760cc17b12bb6d8232ddf64e9bab7c06b42" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", - "memchr", - "num-traits", - "regex", - "regex-syntax", -] - -[[package]] -name = "async-compression" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac" -dependencies = [ - "compression-codecs", - "compression-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "async-recursion" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "async-trait" -version = "0.1.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "atoi" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" -dependencies = [ - "num-traits", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "axum" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" -dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 0.1.2", - "tower 0.4.13", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bigdecimal" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6867f1565b3aad85681f1015055b087fcfd840d6aeee6eee7f2da317603695" -dependencies = [ - "autocfg", - "libm", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest", -] - -[[package]] -name = "blake3" -version = "1.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "cpufeatures 0.3.0", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brotli" -version = "8.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bumpalo" -version = "3.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" - -[[package]] -name = "bzip2" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" -dependencies = [ - "libbz2-rs-sys", -] - -[[package]] -name = "cc" -version = "1.2.62" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" -dependencies = [ - "find-msvc-tools", - "jobserver", - "libc", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "chrono" -version = "0.4.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" -dependencies = [ - "iana-time-zone", - "num-traits", - "windows-link", -] - -[[package]] -name = "chrono-tz" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6139a8597ed92cf816dfb33f5dd6cf0bb93a6adc938f11039f371bc5bcd26c3" -dependencies = [ - "chrono", - "phf", -] - -[[package]] -name = "comfy-table" -version = "7.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958c5d6ecf1f214b4c2bbbbf6ab9523a864bd136dcf71a7e8904799acfe1ad47" -dependencies = [ - "unicode-segmentation", - "unicode-width", -] - -[[package]] -name = "compression-codecs" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" -dependencies = [ - "bzip2", - "compression-core", - "flate2", - "liblzma", - "memchr", - "zstd", - "zstd-safe", -] - -[[package]] -name = "compression-core" -version = "0.4.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" - -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom 0.2.17", - "once_cell", - "tiny-keccak", -] - -[[package]] -name = "constant_time_eq" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "cpufeatures" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "csv" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde_core", -] - -[[package]] -name = "csv-core" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" -dependencies = [ - "memchr", -] - -[[package]] -name = "dashmap" -version = "6.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6361d5c062261c78a176addb82d4c821ae42bed6089de0e12603cd25de2059c" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "datafusion" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93db0e623840612f7f2cd757f7e8a8922064192363732c88692e0870016e141b" -dependencies = [ - "arrow", - "arrow-schema", - "async-trait", - "bytes", - "bzip2", - "chrono", - "datafusion-catalog", - "datafusion-catalog-listing", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-datasource-arrow", - "datafusion-datasource-csv", - "datafusion-datasource-json", - "datafusion-datasource-parquet", - "datafusion-execution", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-functions", - "datafusion-functions-aggregate", - "datafusion-functions-nested", - "datafusion-functions-table", - "datafusion-functions-window", - "datafusion-optimizer", - "datafusion-physical-expr", - "datafusion-physical-expr-adapter", - "datafusion-physical-expr-common", - "datafusion-physical-optimizer", - "datafusion-physical-plan", - "datafusion-session", - "datafusion-sql", - "flate2", - "futures", - "itertools 0.14.0", - "liblzma", - "log", - "object_store", - "parking_lot", - "parquet", - "rand 0.9.4", - "regex", - "sqlparser", - "tempfile", - "tokio", - "url", - "uuid", - "zstd", -] - -[[package]] -name = "datafusion-catalog" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37cefde60b26a7f4ff61e9d2ff2833322f91df2b568d7238afe67bde5bdffb66" -dependencies = [ - "arrow", - "async-trait", - "dashmap", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr", - "datafusion-physical-plan", - "datafusion-session", - "futures", - "itertools 0.14.0", - "log", - "object_store", - "parking_lot", - "tokio", -] - -[[package]] -name = "datafusion-catalog-listing" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e112307715d6a7a331111a4c2330ff54bc237183511c319e3708a4cff431fb" -dependencies = [ - "arrow", - "async-trait", - "datafusion-catalog", - "datafusion-common", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr", - "datafusion-physical-expr-adapter", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "futures", - "itertools 0.14.0", - "log", - "object_store", -] - -[[package]] -name = "datafusion-common" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d72a11ca44a95e1081870d3abb80c717496e8a7acb467a1d3e932bb636af5cc2" -dependencies = [ - "ahash", - "arrow", - "arrow-ipc", - "chrono", - "half", - "hashbrown 0.16.1", - "indexmap 2.14.0", - "itertools 0.14.0", - "libc", - "log", - "object_store", - "parquet", - "paste", - "recursive", - "sqlparser", - "tokio", - "web-time", -] - -[[package]] -name = "datafusion-common-runtime" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89f4afaed29670ec4fd6053643adc749fe3f4bc9d1ce1b8c5679b22c67d12def" -dependencies = [ - "futures", - "log", - "tokio", -] - -[[package]] -name = "datafusion-datasource" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9fb386e1691355355a96419978a0022b7947b44d4a24a6ea99f00b6b485cbb6" -dependencies = [ - "arrow", - "async-compression", - "async-trait", - "bytes", - "bzip2", - "chrono", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr", - "datafusion-physical-expr-adapter", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-session", - "flate2", - "futures", - "glob", - "itertools 0.14.0", - "liblzma", - "log", - "object_store", - "rand 0.9.4", - "tokio", - "tokio-util", - "url", - "zstd", -] - -[[package]] -name = "datafusion-datasource-arrow" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffa6c52cfed0734c5f93754d1c0175f558175248bf686c944fb05c373e5fc096" -dependencies = [ - "arrow", - "arrow-ipc", - "async-trait", - "bytes", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-session", - "futures", - "itertools 0.14.0", - "object_store", - "tokio", -] - -[[package]] -name = "datafusion-datasource-csv" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503f29e0582c1fc189578d665ff57d9300da1f80c282777d7eb67bb79fb8cdca" -dependencies = [ - "arrow", - "async-trait", - "bytes", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-session", - "futures", - "object_store", - "regex", - "tokio", -] - -[[package]] -name = "datafusion-datasource-json" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33804749abc8d0c8cb7473228483cb8070e524c6f6086ee1b85a64debe2b3d2" -dependencies = [ - "arrow", - "async-trait", - "bytes", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-session", - "futures", - "object_store", - "serde_json", - "tokio", - "tokio-stream", -] - -[[package]] -name = "datafusion-datasource-parquet" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a8e0365e0e08e8ff94d912f0ababcf9065a1a304018ba90b1fc83c855b4997" -dependencies = [ - "arrow", - "async-trait", - "bytes", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-functions-aggregate-common", - "datafusion-physical-expr", - "datafusion-physical-expr-adapter", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-pruning", - "datafusion-session", - "futures", - "itertools 0.14.0", - "log", - "object_store", - "parking_lot", - "parquet", - "tokio", -] - -[[package]] -name = "datafusion-doc" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de6ac0df1662b9148ad3c987978b32cbec7c772f199b1d53520c8fa764a87ee" - -[[package]] -name = "datafusion-execution" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c7fbdaefcca4ef6ffe425a5fc2325763bfb426599bb0bf4536466efabe709" -dependencies = [ - "arrow", - "arrow-buffer", - "async-trait", - "chrono", - "dashmap", - "datafusion-common", - "datafusion-expr", - "datafusion-physical-expr-common", - "futures", - "log", - "object_store", - "parking_lot", - "rand 0.9.4", - "tempfile", - "url", -] - -[[package]] -name = "datafusion-expr" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "574b9b6977fedbd2a611cbff12e5caf90f31640ad9dc5870f152836d94bad0dd" -dependencies = [ - "arrow", - "async-trait", - "chrono", - "datafusion-common", - "datafusion-doc", - "datafusion-expr-common", - "datafusion-functions-aggregate-common", - "datafusion-functions-window-common", - "datafusion-physical-expr-common", - "indexmap 2.14.0", - "itertools 0.14.0", - "paste", - "recursive", - "serde_json", - "sqlparser", -] - -[[package]] -name = "datafusion-expr-common" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d7c3adf3db8bf61e92eb90cb659c8e8b734593a8f7c8e12a843c7ddba24b87e" -dependencies = [ - "arrow", - "datafusion-common", - "indexmap 2.14.0", - "itertools 0.14.0", - "paste", -] - -[[package]] -name = "datafusion-functions" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28aa4e10384e782774b10e72aca4d93ef7b31aa653095d9d4536b0a3dbc51b6" -dependencies = [ - "arrow", - "arrow-buffer", - "base64 0.22.1", - "blake2", - "blake3", - "chrono", - "chrono-tz", - "datafusion-common", - "datafusion-doc", - "datafusion-execution", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-macros", - "hex", - "itertools 0.14.0", - "log", - "md-5", - "memchr", - "num-traits", - "rand 0.9.4", - "regex", - "sha2", - "unicode-segmentation", - "uuid", -] - -[[package]] -name = "datafusion-functions-aggregate" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00aa6217e56098ba84e0a338176fe52f0a84cca398021512c6c8c5eff806d0ad" -dependencies = [ - "ahash", - "arrow", - "datafusion-common", - "datafusion-doc", - "datafusion-execution", - "datafusion-expr", - "datafusion-functions-aggregate-common", - "datafusion-macros", - "datafusion-physical-expr", - "datafusion-physical-expr-common", - "half", - "log", - "num-traits", - "paste", -] - -[[package]] -name = "datafusion-functions-aggregate-common" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b511250349407db7c43832ab2de63f5557b19a20dfd236b39ca2c04468b50d47" -dependencies = [ - "ahash", - "arrow", - "datafusion-common", - "datafusion-expr-common", - "datafusion-physical-expr-common", -] - -[[package]] -name = "datafusion-functions-nested" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef13a858e20d50f0a9bb5e96e7ac82b4e7597f247515bccca4fdd2992df0212a" -dependencies = [ - "arrow", - "arrow-ord", - "datafusion-common", - "datafusion-doc", - "datafusion-execution", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-functions", - "datafusion-functions-aggregate", - "datafusion-functions-aggregate-common", - "datafusion-macros", - "datafusion-physical-expr-common", - "hashbrown 0.16.1", - "itertools 0.14.0", - "itoa", - "log", - "paste", -] - -[[package]] -name = "datafusion-functions-table" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b40d3f5bbb3905f9ccb1ce9485a9595c77b69758a7c24d3ba79e334ff51e7e" -dependencies = [ - "arrow", - "async-trait", - "datafusion-catalog", - "datafusion-common", - "datafusion-expr", - "datafusion-physical-plan", - "parking_lot", - "paste", -] - -[[package]] -name = "datafusion-functions-window" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e88ec9d57c9b685d02f58bfee7be62d72610430ddcedb82a08e5d9925dbfb6" -dependencies = [ - "arrow", - "datafusion-common", - "datafusion-doc", - "datafusion-expr", - "datafusion-functions-window-common", - "datafusion-macros", - "datafusion-physical-expr", - "datafusion-physical-expr-common", - "log", - "paste", -] - -[[package]] -name = "datafusion-functions-window-common" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8307bb93519b1a91913723a1130cfafeee3f72200d870d88e91a6fc5470ede5c" -dependencies = [ - "datafusion-common", - "datafusion-physical-expr-common", -] - -[[package]] -name = "datafusion-macros" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e367e6a71051d0ebdd29b2f85d12059b38b1d1f172c6906e80016da662226bd" -dependencies = [ - "datafusion-doc", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "datafusion-optimizer" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e929015451a67f77d9d8b727b2bf3a40c4445fdef6cdc53281d7d97c76888ace" -dependencies = [ - "arrow", - "chrono", - "datafusion-common", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-physical-expr", - "indexmap 2.14.0", - "itertools 0.14.0", - "log", - "recursive", - "regex", - "regex-syntax", -] - -[[package]] -name = "datafusion-physical-expr" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b1e68aba7a4b350401cfdf25a3d6f989ad898a7410164afe9ca52080244cb59" -dependencies = [ - "ahash", - "arrow", - "datafusion-common", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-functions-aggregate-common", - "datafusion-physical-expr-common", - "half", - "hashbrown 0.16.1", - "indexmap 2.14.0", - "itertools 0.14.0", - "parking_lot", - "paste", - "petgraph", - "recursive", - "tokio", -] - -[[package]] -name = "datafusion-physical-expr-adapter" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea22315f33cf2e0adc104e8ec42e285f6ed93998d565c65e82fec6a9ee9f9db4" -dependencies = [ - "arrow", - "datafusion-common", - "datafusion-expr", - "datafusion-functions", - "datafusion-physical-expr", - "datafusion-physical-expr-common", - "itertools 0.14.0", -] - -[[package]] -name = "datafusion-physical-expr-common" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b04b45ea8ad3ac2d78f2ea2a76053e06591c9629c7a603eda16c10649ecf4362" -dependencies = [ - "ahash", - "arrow", - "chrono", - "datafusion-common", - "datafusion-expr-common", - "hashbrown 0.16.1", - "indexmap 2.14.0", - "itertools 0.14.0", - "parking_lot", -] - -[[package]] -name = "datafusion-physical-optimizer" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cb13397809a425918f608dfe8653f332015a3e330004ab191b4404187238b95" -dependencies = [ - "arrow", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-physical-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-pruning", - "itertools 0.14.0", - "recursive", -] - -[[package]] -name = "datafusion-physical-plan" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5edc023675791af9d5fb4cc4c24abf5f7bd3bd4dcf9e5bd90ea1eff6976dcc79" -dependencies = [ - "ahash", - "arrow", - "arrow-ord", - "arrow-schema", - "async-trait", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-execution", - "datafusion-expr", - "datafusion-functions", - "datafusion-functions-aggregate-common", - "datafusion-functions-window-common", - "datafusion-physical-expr", - "datafusion-physical-expr-common", - "futures", - "half", - "hashbrown 0.16.1", - "indexmap 2.14.0", - "itertools 0.14.0", - "log", - "num-traits", - "parking_lot", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "datafusion-pruning" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8c76860e355616555081cab5968cec1af7a80701ff374510860bcd567e365a" -dependencies = [ - "arrow", - "datafusion-common", - "datafusion-datasource", - "datafusion-expr-common", - "datafusion-physical-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "itertools 0.14.0", - "log", -] - -[[package]] -name = "datafusion-session" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5412111aa48e2424ba926112e192f7a6b7e4ccb450145d25ce5ede9f19dc491e" -dependencies = [ - "async-trait", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-plan", - "parking_lot", -] - -[[package]] -name = "datafusion-sql" -version = "53.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0d133ddf8b9b3b872acac900157f783e7b879fe9a6bccf389abebbfac45ec1" -dependencies = [ - "arrow", - "bigdecimal", - "chrono", - "datafusion-common", - "datafusion-expr", - "datafusion-functions-nested", - "indexmap 2.14.0", - "log", - "recursive", - "regex", - "sqlparser", -] - -[[package]] -name = "derive-new" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - -[[package]] -name = "fail" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be3c61c59fdc91f5dbc3ea31ee8623122ce80057058be560654c5d410d181a6" -dependencies = [ - "lazy_static", - "log", - "rand 0.7.3", -] - -[[package]] -name = "fastrand" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" - -[[package]] -name = "find-msvc-tools" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" - -[[package]] -name = "fixedbitset" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" - -[[package]] -name = "flatbuffers" -version = "25.12.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" -dependencies = [ - "bitflags 2.11.1", - "rustc_version", -] - -[[package]] -name = "flate2" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" -dependencies = [ - "crc32fast", - "miniz_oxide", - "zlib-rs", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" - -[[package]] -name = "futures-executor" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" - -[[package]] -name = "futures-macro" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "futures-sink" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" - -[[package]] -name = "futures-task" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" - -[[package]] -name = "futures-util" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.1+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi 5.3.0", - "wasip2", -] - -[[package]] -name = "getrandom" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" -dependencies = [ - "cfg-if", - "libc", - "r-efi 6.0.0", - "wasip2", - "wasip3", -] - -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - -[[package]] -name = "h2" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.14.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http 1.4.0", - "indexmap 2.14.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "half" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" -dependencies = [ - "cfg-if", - "crunchy", - "num-traits", - "zerocopy", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "foldhash 0.1.5", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash 0.2.0", -] - -[[package]] -name = "hashbrown" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" -dependencies = [ - "bytes", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http 1.4.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" -dependencies = [ - "bytes", - "futures-core", - "http 1.4.0", - "http-body 1.0.1", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" - -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.10", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" -dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "h2 0.4.14", - "http 1.4.0", - "http-body 1.0.1", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" -dependencies = [ - "http 1.4.0", - "hyper 1.9.0", - "hyper-util", - "rustls 0.23.40", - "tokio", - "tokio-rustls 0.26.4", - "tower-service", -] - -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper 0.14.32", - "pin-project-lite", - "tokio", - "tokio-io-timeout", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.9.0", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" -dependencies = [ - "base64 0.22.1", - "bytes", - "futures-channel", - "futures-util", - "http 1.4.0", - "http-body 1.0.1", - "hyper 1.9.0", - "ipnet", - "libc", - "percent-encoding", - "pin-project-lite", - "socket2 0.6.3", - "system-configuration", - "tokio", - "tower-service", - "tracing", - "windows-registry", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "icu_collections" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" -dependencies = [ - "displaydoc", - "potential_utf", - "utf8_iter", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" - -[[package]] -name = "icu_properties" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" -dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" - -[[package]] -name = "icu_provider" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" -dependencies = [ - "equivalent", - "hashbrown 0.17.1", - "serde", - "serde_core", -] - -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - -[[package]] -name = "ipnet" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" - -[[package]] -name = "jobserver" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" -dependencies = [ - "getrandom 0.3.4", - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" -dependencies = [ - "cfg-if", - "futures-util", - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "lance-graph-contract" -version = "0.2.0" -dependencies = [ - "glob", - "serde", - "serde_yaml", -] - -[[package]] -name = "lance-graph-tikv-provider" -version = "0.1.0" -dependencies = [ - "anyhow", - "arrow-array", - "arrow-schema", - "async-trait", - "datafusion", - "lance-graph-contract", - "tikv-client", - "tokio", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - -[[package]] -name = "lexical-core" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d8d125a277f807e55a77304455eb7b1cb52f2b18c143b60e766c120bd64a594" -dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", -] - -[[package]] -name = "lexical-parse-float" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a9f232fbd6f550bc0137dcb5f99ab674071ac2d690ac69704593cb4abbea56" -dependencies = [ - "lexical-parse-integer", - "lexical-util", -] - -[[package]] -name = "lexical-parse-integer" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a7a039f8fb9c19c996cd7b2fcce303c1b2874fe1aca544edc85c4a5f8489b34" -dependencies = [ - "lexical-util", -] - -[[package]] -name = "lexical-util" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2604dd126bb14f13fb5d1bd6a66155079cb9fa655b37f875b3a742c705dbed17" - -[[package]] -name = "lexical-write-float" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c438c87c013188d415fbabbb1dceb44249ab81664efbd31b14ae55dabb6361" -dependencies = [ - "lexical-util", - "lexical-write-integer", -] - -[[package]] -name = "lexical-write-integer" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "409851a618475d2d5796377cad353802345cba92c867d9fbcde9cf4eac4e14df" -dependencies = [ - "lexical-util", -] - -[[package]] -name = "libbz2-rs-sys" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b357333733e8260735ba5894eb928c02ecc69c78715f01a8019e7fa7f2db4c" - -[[package]] -name = "libc" -version = "0.2.186" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" - -[[package]] -name = "liblzma" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6033b77c21d1f56deeae8014eb9fbe7bdf1765185a6c508b5ca82eeaed7f899" -dependencies = [ - "liblzma-sys", -] - -[[package]] -name = "liblzma-sys" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a60851d15cd8c5346eca4ab8babff585be2ae4bc8097c067291d3ffe2add3b6" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "libm" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" - -[[package]] -name = "litemap" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "lz4_flex" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef0d4ed8669f8f8826eb00dc878084aa8f253506c4fd5e8f58f5bce72ddb97e" -dependencies = [ - "twox-hash", -] - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - -[[package]] -name = "memchr" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" -dependencies = [ - "adler2", - "simd-adler32", -] - -[[package]] -name = "mio" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" -dependencies = [ - "libc", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.61.2", -] - -[[package]] -name = "native-tls" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "object" -version = "0.37.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" -dependencies = [ - "memchr", -] - -[[package]] -name = "object_store" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622acbc9100d3c10e2ee15804b0caa40e55c933d5aa53814cd520805b7958a49" -dependencies = [ - "async-trait", - "bytes", - "chrono", - "futures-channel", - "futures-core", - "futures-util", - "http 1.4.0", - "humantime", - "itertools 0.14.0", - "parking_lot", - "percent-encoding", - "thiserror 2.0.18", - "tokio", - "tracing", - "url", - "walkdir", - "wasm-bindgen-futures", - "web-time", -] - -[[package]] -name = "once_cell" -version = "1.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" - -[[package]] -name = "openssl" -version = "0.10.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45fa2aa886c42762255da344f0a0d313e254066c46aad76f300c3d3da62d967" -dependencies = [ - "bitflags 2.11.1", - "cfg-if", - "foreign-types", - "libc", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "openssl-probe" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" - -[[package]] -name = "openssl-sys" -version = "0.9.116" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28a22dc7140cda5f096e5e7724a6962ca81a7f8bfd2979f9b18c11af56318c4" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "parquet" -version = "58.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dafa7d01085b62a47dd0c1829550a0a36710ea9c4fe358a05a85477cec8a908" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-ipc", - "arrow-schema", - "arrow-select", - "base64 0.22.1", - "brotli", - "bytes", - "chrono", - "flate2", - "futures", - "half", - "hashbrown 0.17.1", - "lz4_flex", - "num-bigint", - "num-integer", - "num-traits", - "object_store", - "paste", - "seq-macro", - "simdutf8", - "snap", - "thrift", - "tokio", - "twox-hash", - "zstd", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "petgraph" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" -dependencies = [ - "fixedbitset", - "hashbrown 0.15.5", - "indexmap 2.14.0", - "serde", -] - -[[package]] -name = "phf" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_shared" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project" -version = "1.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" - -[[package]] -name = "pkg-config" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" - -[[package]] -name = "potential_utf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" -dependencies = [ - "zerovec", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn 2.0.117", -] - -[[package]] -name = "proc-macro2" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "procfs" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" -dependencies = [ - "bitflags 2.11.1", - "hex", - "lazy_static", - "procfs-core", - "rustix 0.38.44", -] - -[[package]] -name = "procfs-core" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" -dependencies = [ - "bitflags 2.11.1", - "hex", -] - -[[package]] -name = "prometheus" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" -dependencies = [ - "cfg-if", - "fnv", - "lazy_static", - "libc", - "memchr", - "parking_lot", - "procfs", - "protobuf", - "reqwest", - "thiserror 1.0.69", -] - -[[package]] -name = "prost" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "protobuf" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" - -[[package]] -name = "psm" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645dbe486e346d9b5de3ef16ede18c26e6c70ad97418f4874b8b1889d6e761ea" -dependencies = [ - "ar_archive_writer", - "cc", -] - -[[package]] -name = "quote" -version = "1.0.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.5", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.5", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", -] - -[[package]] -name = "rand_core" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" -dependencies = [ - "getrandom 0.3.4", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "recursive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0786a43debb760f491b1bc0269fe5e84155353c67482b9e60d0cfb596054b43e" -dependencies = [ - "recursive-proc-macro-impl", - "stacker", -] - -[[package]] -name = "recursive-proc-macro-impl" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" -dependencies = [ - "quote", - "syn 2.0.117", -] - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags 2.11.1", -] - -[[package]] -name = "regex" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" - -[[package]] -name = "reqwest" -version = "0.12.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.4.14", - "http 1.4.0", - "http-body 1.0.1", - "http-body-util", - "hyper 1.9.0", - "hyper-rustls", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 1.0.2", - "tokio", - "tokio-native-tls", - "tower 0.5.3", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.17", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.11.1", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" -dependencies = [ - "bitflags 2.11.1", - "errno", - "libc", - "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", -] - -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.23.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" -dependencies = [ - "once_cell", - "rustls-pki-types", - "rustls-webpki 0.103.13", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-pki-types" -version = "1.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" -dependencies = [ - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "security-framework" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" -dependencies = [ - "bitflags 2.11.1", - "core-foundation 0.10.1", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" - -[[package]] -name = "seq-macro" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "serde_json" -version = "1.0.149" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" -dependencies = [ - "itoa", - "memchr", - "serde", - "serde_core", - "zmij", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.14.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", - "digest", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" -dependencies = [ - "errno", - "libc", -] - -[[package]] -name = "simd-adler32" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" - -[[package]] -name = "simdutf8" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" - -[[package]] -name = "siphasher" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" - -[[package]] -name = "slab" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "socket2" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - -[[package]] -name = "sqlparser" -version = "0.61.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf5ea8d4d7c808e1af1cbabebca9a2abe603bcefc22294c5b95018d53200cb7" -dependencies = [ - "log", - "recursive", - "sqlparser_derive", -] - -[[package]] -name = "sqlparser_derive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6dd45d8fc1c79299bfbb7190e42ccbbdf6a5f52e4a6ad98d92357ea965bd289" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" - -[[package]] -name = "stacker" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "640c8cdd92b6b12f5bcb1803ca3bbf5ab96e5e6b6b96b9ab77dabe9e880b3190" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "windows-sys 0.61.2", -] - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "system-configuration" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" -dependencies = [ - "bitflags 2.11.1", - "core-foundation 0.9.4", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - -[[package]] -name = "tempfile" -version = "3.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" -dependencies = [ - "fastrand", - "getrandom 0.4.2", - "once_cell", - "rustix 1.1.4", - "windows-sys 0.61.2", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" -dependencies = [ - "thiserror-impl 2.0.18", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "thrift" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" -dependencies = [ - "byteorder", - "integer-encoding", - "ordered-float", -] - -[[package]] -name = "tikv-client" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62c2bb14a0b248e1d03a9357fac74b148edfc6190fbb04cc7c332eb50d7995d" -dependencies = [ - "async-recursion", - "async-trait", - "derive-new", - "either", - "fail", - "futures", - "lazy_static", - "log", - "pin-project", - "prometheus", - "prost", - "rand 0.8.6", - "regex", - "semver", - "serde", - "serde_derive", - "serde_json", - "take_mut", - "thiserror 1.0.69", - "tokio", - "tonic", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinystr" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tokio" -version = "1.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" -dependencies = [ - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2 0.6.3", - "tokio-macros", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-io-timeout" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd86198d9ee903fedd2f9a2e72014287c0d9167e4ae43b5853007205dda1b76" -dependencies = [ - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-macros" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" -dependencies = [ - "rustls 0.23.40", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", - "tokio-util", -] - -[[package]] -name = "tokio-util" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tonic" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "flate2", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "hyper-timeout", - "percent-encoding", - "pin-project", - "prost", - "rustls 0.21.12", - "rustls-pemfile", - "tokio", - "tokio-rustls 0.24.1", - "tokio-stream", - "tower 0.4.13", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.6", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper 1.0.2", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-http" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" -dependencies = [ - "bitflags 2.11.1", - "bytes", - "futures-util", - "http 1.4.0", - "http-body 1.0.1", - "pin-project-lite", - "tower 0.5.3", - "tower-layer", - "tower-service", - "url", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "tracing-core" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "twox-hash" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" - -[[package]] -name = "typenum" -version = "1.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" - -[[package]] -name = "unicode-ident" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "unicode-segmentation" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" - -[[package]] -name = "unicode-width" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "uuid" -version = "1.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" -dependencies = [ - "getrandom 0.4.2", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.3+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" -dependencies = [ - "wit-bindgen 0.57.1", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen 0.51.0", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn 2.0.117", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.121" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap 2.14.0", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags 2.11.1", - "hashbrown 0.15.5", - "indexmap 2.14.0", - "semver", -] - -[[package]] -name = "web-sys" -version = "0.3.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi-util" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" -dependencies = [ - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap 2.14.0", - "prettyplease", - "syn 2.0.117", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn 2.0.117", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags 2.11.1", - "indexmap 2.14.0", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap 2.14.0", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - -[[package]] -name = "writeable" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" - -[[package]] -name = "yoke" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", - "synstructure", -] - -[[package]] -name = "zerocopy" -version = "0.8.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "zerofrom" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" - -[[package]] -name = "zerotrie" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "zlib-rs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513" - -[[package]] -name = "zmij" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" - -[[package]] -name = "zstd" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.16+zstd.1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/crates/lance-graph-tikv-provider/Cargo.toml b/crates/lance-graph-tikv-provider/Cargo.toml deleted file mode 100644 index 09bc0ace..00000000 --- a/crates/lance-graph-tikv-provider/Cargo.toml +++ /dev/null @@ -1,29 +0,0 @@ -[package] -name = "lance-graph-tikv-provider" -version = "0.1.0" -edition = "2021" -license = "Apache-2.0" -description = "Glue #2: TiKV ranges → Arrow TableProvider for lance-graph (see integration-plan.md §5)" -keywords = ["lance", "graph", "tikv", "arrow", "datafusion"] - -[dependencies] -lance-graph-contract = { version = "0.2", path = "../lance-graph-contract" } - -# TiKV transactional client — version pinned loosely; implement in Sprint 1. -tikv-client = "*" - -# Arrow columnar memory format — matches workspace arrow = "57" usage. -arrow-array = "*" -arrow-schema = "*" - -# DataFusion query execution — matches workspace datafusion = "51" usage. -datafusion = "*" - -# Async trait support. -async-trait = "*" - -# Error handling. -anyhow = "*" - -# Async runtime. -tokio = { version = "*", features = ["full"] } diff --git a/crates/lance-graph-tikv-provider/README.md b/crates/lance-graph-tikv-provider/README.md deleted file mode 100644 index 01f717cf..00000000 --- a/crates/lance-graph-tikv-provider/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# lance-graph-tikv-provider - -**Glue #2** in the four-crate integration plan: TiKV key ranges → Arrow `TableProvider`. - -This crate allows lance-graph's Cypher executor (DataFusion-backed) to read -graph data stored in a distributed TiKV cluster as typed Arrow `RecordBatch` -output — with zero-copy handoff into the query engine. - -## Role in the stack - -``` -lance-graph (Cypher executor) - │ - │ Arc - ▼ -lance-graph-tikv-provider ← THIS CRATE - TikvNodeTableProvider / TikvEdgeTableProvider - │ - │ key-range scan - ▼ - TiKV (Raft + Percolator MVCC) -``` - -`lance-graph-catalog` declares the shape of each node and edge type (schema + -range key encoding). This crate consumes those shapes to translate DataFusion -scan requests — filters, projections, limits — into TiKV range bounds, then -decodes the raw bytes back into Arrow columns. - -This replaces the JanusGraph-over-Cassandra pattern with TiKV's stronger -guarantees: -- **ACID** via Percolator 2PC instead of eventual consistency. -- **Native MVCC** snapshot reads aligned to the same HLC `u64` timestamp - used by surrealdb-core and Lance dataset versions — **one clock, all - storage targets** (plan §5 "Snapshot integration"). - -## What is stubbed vs implemented (as of Sprint 0) - -| Item | Status | -|---|---| -| `TikvNodeTableProvider` struct + `TableProvider` impl | Stub — `scan()` is `unimplemented!()` | -| `TikvEdgeTableProvider` struct + `TableProvider` impl | Stub — `scan()` is `unimplemented!()` | -| `TikvScanExec` `ExecutionPlan` | Stub — `execute()` is `unimplemented!()` | -| `MvccProvider` + `TikvBackedProvider` marker impls | Wired — no logic needed | -| `Error` enum (`Tikv`, `Arrow`, `Decode`) | Defined — no conversion impls yet | -| Constructor `new()` + `with_snapshot()` | Wired — no client call yet | - -The entire public API surface (struct fields, method signatures, trait bounds) -is locked in Sprint 0. Implementation lands in Sprint 1. - -## Path to working implementation (Sprint 1, plan §7) - -1. **Replace `Arc<()>` with `Arc`** in - `TikvNodeTableProvider` and `TikvEdgeTableProvider`. The `tikv-client` - dep is already in `Cargo.toml` at `*`. - -2. **Implement `TikvNodeTableProvider::scan`**: - - Call `self.shape.range_from_filters(filters)` to derive key-range bounds. - - Resolve snapshot: `self.snapshot_ts.unwrap_or_else(|| client.current_timestamp())`. - - Construct `TikvScanExec::new(snapshot, key_range, schema, projection, limit)`. - -3. **Implement `TikvScanExec::execute`**: - - Open a `tikv_client::Snapshot` at the given HLC timestamp. - - Call `snapshot.scan(key_range, limit)` to get an iterator of KV pairs. - - Decode each value with the shape's column decoder into Arrow arrays. - - Yield `RecordBatch` chunks to the DataFusion executor stream. - -4. **Wire edge key encoding** in `TikvEdgeTableProvider::scan`: - - Edge keys are `(src_node_id, edge_type, dst_node_id)` — outbound - expansion is a single prefix range scan on `src_node_id`. - -5. **Integration test** against local TiKV via `make tikv-up` (plan §7 Sprint 1). - -## Cross-references - -- Design intent: `integration-plan.md §5` (Glue #2, this repo) -- Contract traits: `crates/lance-graph-contract/src/provider.rs` - (`TikvBackedProvider`, `MvccProvider`, `BackendId`) -- Sibling glue: `crates/cognitive-shader-actor/` (Glue #4, this repo) -- Consuming example: `integration-plan.md §8 Example 1` - -## License - -Apache-2.0 diff --git a/crates/lance-graph-tikv-provider/src/edge.rs b/crates/lance-graph-tikv-provider/src/edge.rs deleted file mode 100644 index 1c8019d0..00000000 --- a/crates/lance-graph-tikv-provider/src/edge.rs +++ /dev/null @@ -1,188 +0,0 @@ -//! Edge table provider — Glue #2 (plan §5 "Edge tables"). -//! -//! Mirror of [`crate::node`] for graph **edge** shapes stored in TiKV. -//! Edges are stored as `(src_node_id, edge_type, dst_node_id) → edge_props` -//! so outbound expansion (MATCH `(a)-[:KNOWS]->(b)`) is a **single range scan** -//! starting at `src_node_id` — no secondary index needed. -//! -//! See `integration-plan.md §5` "Edge tables" and Sprint 1 scope in §7. - -use std::any::Any; -use std::sync::Arc; - -use arrow_schema::SchemaRef; -use async_trait::async_trait; -use datafusion::catalog::Session; -use datafusion::common::Result as DfResult; -use datafusion::datasource::TableProvider; -use datafusion::logical_expr::{Expr, TableType}; -use datafusion::physical_plan::ExecutionPlan; - -use lance_graph_contract::provider::{BackendId, MvccProvider, TikvBackedProvider}; - -use crate::error::Error; -use crate::scan::TikvScanExec; - -// --------------------------------------------------------------------------- -// EdgeShape placeholder -// -// See node.rs for the rationale. Replace with -// `lance_graph_catalog::EdgeShape` once Sprint 3 lands. -// --------------------------------------------------------------------------- - -/// Placeholder for `lance_graph_catalog::EdgeShape` (available in Sprint 3). -/// -/// Edges are encoded as `(src_id, edge_type, dst_id) → props` in TiKV. -/// The `src_type` and `dst_type` labels drive schema validation; the -/// `label` identifies the edge relationship (e.g. `"KNOWS"`). -#[derive(Clone, Debug)] -pub struct EdgeShape { - /// Arrow schema for this edge type's properties. - pub schema: SchemaRef, - /// Edge relationship label (e.g. `"KNOWS"`). - pub label: String, - /// Source node type label (e.g. `"Person"`). - pub src_type: String, - /// Destination node type label (e.g. `"Person"`). - pub dst_type: String, -} - -impl EdgeShape { - /// Return the Arrow schema for this edge shape. - /// - /// Per plan §5 "Edge tables": schema drives column layout during decode. - pub fn arrow_schema(&self) -> SchemaRef { - self.schema.clone() - } -} - -// --------------------------------------------------------------------------- -// TikvEdgeTableProvider -// --------------------------------------------------------------------------- - -/// DataFusion `TableProvider` backed by TiKV edge ranges. -/// -/// Mirror of [`crate::node::TikvNodeTableProvider`] for edge shapes. -/// -/// Per plan §5 "Edge tables": edges are keyed by `(src_node_id, edge_type, -/// dst_node_id)`, so outbound neighbour expansion is a single range scan — -/// the same efficiency JanusGraph achieved with Cassandra wide rows, but with -/// TiKV's Percolator ACID and native MVCC. -/// -/// Implements: -/// - `datafusion::datasource::TableProvider` — DataFusion integration. -/// - `lance_graph_contract::provider::MvccProvider` — snapshot-consistent reads. -/// - `lance_graph_contract::provider::TikvBackedProvider` — TiKV marker. -/// -/// Sprint 1 TODO: wire `scan()` to `TikvScanExec::new(...)` with edge-range encoding. -pub struct TikvEdgeTableProvider { - /// TiKV transactional client. - /// - /// Sprint 1 TODO: replace `Arc<()>` with `Arc`. - pub client: Arc<()>, - - /// Edge shape from lance-graph-catalog. Drives schema + range key encoding. - pub shape: EdgeShape, - - /// Optional MVCC snapshot. `None` = read latest (plan §5). - pub snapshot_ts: Option, -} - -impl TikvEdgeTableProvider { - /// Construct a new edge provider bound to a TiKV client and shape. - /// - /// Per plan §5 "Edge tables". Snapshot defaults to `None` (read latest). - /// Use [`Self::with_snapshot`] to pin to a specific HLC timestamp. - /// - /// Sprint 1 TODO: accept `Arc`. - pub async fn new( - client: Arc<()>, - shape: EdgeShape, - ) -> Result { - // Sprint 1 TODO: validate client connectivity. - Ok(Self { client, shape, snapshot_ts: None }) - } - - /// Pin this provider to a specific MVCC snapshot timestamp. - /// - /// Same semantics as `TikvNodeTableProvider::with_snapshot` — the `ts` - /// is the shared HLC number across all storage targets (plan §5). - pub fn with_snapshot(mut self, ts: u64) -> Self { - self.snapshot_ts = Some(ts); - self - } -} - -// --------------------------------------------------------------------------- -// Debug — required by TableProvider trait bound -// --------------------------------------------------------------------------- - -impl std::fmt::Debug for TikvEdgeTableProvider { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "TikvEdgeTableProvider {{ shape: {:?} }}", self.shape) - } -} - -// --------------------------------------------------------------------------- -// DataFusion TableProvider impl -// --------------------------------------------------------------------------- - -#[async_trait] -impl TableProvider for TikvEdgeTableProvider { - fn as_any(&self) -> &dyn Any { - self - } - - /// Return the Arrow schema for this edge shape. - /// - /// Per plan §5 "Edge tables": schema includes `src_id`, `dst_id`, and - /// all edge property columns declared in the catalog. - fn schema(&self) -> SchemaRef { - self.shape.arrow_schema() - } - - /// Report as a base table. - fn table_type(&self) -> TableType { - TableType::Base - } - - /// Produce a physical `ExecutionPlan` that streams edge rows from TiKV. - /// - /// Per plan §5 "Edge tables": range scan starts at `src_node_id` so - /// outbound expansion is a single TiKV range scan, not a scatter-gather. - /// - /// Sprint 1 TODO: implement edge key encoding and wire to `TikvScanExec`. - async fn scan( - &self, - _state: &dyn Session, - _projection: Option<&Vec>, - _filters: &[Expr], - _limit: Option, - ) -> DfResult> { - unimplemented!( - "LG-1 stub — implement TikvEdgeTableProvider::scan in Sprint 1 \ - per integration-plan.md §5 'Edge tables'" - ) - } -} - -// --------------------------------------------------------------------------- -// MvccProvider + TikvBackedProvider marker impls -// --------------------------------------------------------------------------- - -/// Marker impl: `MvccProvider` for snapshot-consistent cross-engine reads. -/// -/// Per plan §5: `snapshot_ts` is the shared HLC number across TiKV, -/// surrealdb-core, and Lance dataset versions. -impl MvccProvider for TikvEdgeTableProvider { - fn backend(&self) -> BackendId { - BackendId::Tikv - } - - fn snapshot_ts(&self) -> Option { - self.snapshot_ts - } -} - -/// Marker impl: `TikvBackedProvider` — TiKV marker for the federated planner. -impl TikvBackedProvider for TikvEdgeTableProvider {} diff --git a/crates/lance-graph-tikv-provider/src/error.rs b/crates/lance-graph-tikv-provider/src/error.rs deleted file mode 100644 index 930e597c..00000000 --- a/crates/lance-graph-tikv-provider/src/error.rs +++ /dev/null @@ -1,60 +0,0 @@ -//! Crate-local error type for `lance-graph-tikv-provider` (Glue #2). -//! -//! Per plan §5: this crate bridges TiKV ranges to Arrow `TableProvider`. -//! Errors can originate from TiKV client calls, Arrow schema validation, -//! or binary decoding of KV bytes into columnar rows. -//! -//! Sprint 1 TODO: wire the `Tikv` variant to `tikv_client::Error` via -//! `From` once the real client dep is enabled. - -/// Crate-local error variants for `lance-graph-tikv-provider`. -/// -/// Per plan §5: this crate performs three classes of operations that can -/// fail — TiKV I/O, Arrow schema/buffer operations, and binary decoding -/// of KV bytes into columnar rows. Each has its own variant so callers -/// can pattern-match on error class without pulling in upstream error types. -/// -/// Sprint 1 TODO: add `From` and -/// `From` conversions. -#[derive(Debug)] -pub enum Error { - /// A TiKV client operation failed (connection, transaction, scan, etc.). - /// - /// Wraps a stringified error so this crate has no direct dep on - /// `tikv_client::Error` until Sprint 1 wires the real client. - Tikv(String), - - /// An Arrow schema or buffer operation failed. - /// - /// Covers `ArrowError`, schema mismatch, and projection out-of-bounds. - Arrow(String), - - /// Binary decoding of a TiKV value into Arrow columns failed. - /// - /// Occurs when the raw bytes stored in TiKV don't match the expected - /// encoding described by the `NodeShape` or `EdgeShape` schema. - Decode(String), -} - -impl std::fmt::Display for Error { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Error::Tikv(msg) => write!(f, "tikv error: {msg}"), - Error::Arrow(msg) => write!(f, "arrow error: {msg}"), - Error::Decode(msg) => write!(f, "decode error: {msg}"), - } - } -} - -impl std::error::Error for Error {} - -/// Convert `Error` into DataFusion's `DataFusionError` so `scan()` can -/// use `?` inside `async fn scan(...) -> DfResult<...>`. -/// -/// Sprint 1 TODO: use `DataFusionError::External` once the DataFusion dep -/// is finalised; for now wraps as `Execution`. -impl From for datafusion::error::DataFusionError { - fn from(e: Error) -> Self { - datafusion::error::DataFusionError::Execution(e.to_string()) - } -} diff --git a/crates/lance-graph-tikv-provider/src/lib.rs b/crates/lance-graph-tikv-provider/src/lib.rs deleted file mode 100644 index a62e1238..00000000 --- a/crates/lance-graph-tikv-provider/src/lib.rs +++ /dev/null @@ -1,38 +0,0 @@ -//! # lance-graph-tikv-provider — Glue #2 -//! -//! This crate is the **Glue #2** bridge described in -//! `integration-plan.md §5`: it implements DataFusion's `TableProvider` -//! trait over TiKV key ranges, producing Arrow `RecordBatch` output that -//! drops directly into lance-graph's Cypher executor with zero copy. -//! -//! ## Role in the stack -//! -//! TiKV stores graph elements as encoded key-value ranges. This crate -//! translates a DataFusion scan request (filters + projection + limit) -//! into a TiKV range scan, decodes the raw bytes into Arrow columns -//! using the schema declared in `lance-graph-catalog`, and returns an -//! `ExecutionPlan` that streams `RecordBatch` rows back to the planner. -//! -//! The MVCC snapshot timestamp (`snapshot_ts: u64`) is the same number -//! as surrealdb-core's `version` column, TiKV's native HLC timestamp, and -//! the version a Lance projection refresh commits at — **one clock, all -//! storage targets** (plan §5 "Snapshot integration"). -//! -//! ## What is stubbed vs implemented -//! -//! **Everything in this crate is a Sprint 0 surface lock.** All method -//! bodies contain `unimplemented!()` with a Sprint 1 TODO comment. -//! The public API (struct fields, method signatures, trait impls) is the -//! stable surface; the implementation lands in Sprint 1 per plan §7. -//! -//! ## Modules -//! -//! - [`node`] — `TikvNodeTableProvider` for node shapes. -//! - [`edge`] — `TikvEdgeTableProvider` for edge shapes. -//! - [`scan`] — `TikvScanExec` physical execution plan stub. -//! - [`error`] — crate-local error type. - -pub mod edge; -pub mod error; -pub mod node; -pub mod scan; diff --git a/crates/lance-graph-tikv-provider/src/node.rs b/crates/lance-graph-tikv-provider/src/node.rs deleted file mode 100644 index 06893aa3..00000000 --- a/crates/lance-graph-tikv-provider/src/node.rs +++ /dev/null @@ -1,189 +0,0 @@ -//! Node table provider — Glue #2 (plan §5 `TikvNodeTableProvider`). -//! -//! Implements DataFusion's `TableProvider` for graph **node** shapes stored -//! in TiKV. Each node type maps to a contiguous key range: -//! `/` → encoded property columns. Filter pushdown -//! translates DataFusion predicates into TiKV key-range bounds; the -//! result is streamed as Arrow `RecordBatch` by [`crate::scan::TikvScanExec`]. -//! -//! See `integration-plan.md §5` for the full API sketch and Sprint 1 scope. - -use std::any::Any; -use std::sync::Arc; - -use arrow_schema::SchemaRef; -use async_trait::async_trait; -use datafusion::catalog::Session; -use datafusion::common::Result as DfResult; -use datafusion::datasource::TableProvider; -use datafusion::logical_expr::{Expr, TableType}; -use datafusion::physical_plan::ExecutionPlan; - -use lance_graph_contract::provider::{BackendId, MvccProvider, TikvBackedProvider}; - -use crate::error::Error; -use crate::scan::TikvScanExec; - -// --------------------------------------------------------------------------- -// Shape placeholder types -// -// `NodeShape` and `EdgeShape` are declared in `lance-graph-catalog` as part -// of Sprint 3 codegen (plan §7 Sprint 3). Until that crate exposes them we -// define local newtypes so the provider API compiles as a stub. Replace with -// the catalog import once `lance_graph_catalog::{NodeShape, EdgeShape}` land. -// --------------------------------------------------------------------------- - -/// Placeholder for `lance_graph_catalog::NodeShape` (available in Sprint 3). -/// -/// See plan §5 API sketch and §7 Sprint 3 for the real type. -#[derive(Clone, Debug)] -pub struct NodeShape { - /// Arrow schema derived from the node type's property definitions. - pub schema: SchemaRef, - /// Node type label (e.g. `"Person"`). - pub label: String, -} - -impl NodeShape { - /// Return the Arrow schema for this node shape. - /// - /// Per plan §5: "Shape from lance-graph-catalog. Drives schema + range encoding." - pub fn arrow_schema(&self) -> SchemaRef { - self.schema.clone() - } -} - -// --------------------------------------------------------------------------- -// TikvNodeTableProvider -// --------------------------------------------------------------------------- - -/// DataFusion `TableProvider` backed by TiKV node ranges. -/// -/// Per plan §5: holds a TiKV `TransactionClient`, the `NodeShape` that -/// drives schema and range encoding, and an optional MVCC snapshot timestamp. -/// `None` snapshot means "read latest at scan time". -/// -/// Implements: -/// - `datafusion::datasource::TableProvider` — DataFusion integration. -/// - `lance_graph_contract::provider::MvccProvider` — snapshot-consistent -/// read semantics shared with Lance and surrealdb providers. -/// - `lance_graph_contract::provider::TikvBackedProvider` — TiKV marker so -/// the federated planner can detect and compose TiKV providers. -/// -/// Sprint 1 TODO: wire `scan()` to `TikvScanExec::new(...)`. -pub struct TikvNodeTableProvider { - /// TiKV transactional client (plan §5: `Arc`). - /// - /// Sprint 1 TODO: replace `Arc<()>` with `Arc`. - pub client: Arc<()>, - - /// Node shape from lance-graph-catalog. Drives schema + range key encoding. - pub shape: NodeShape, - - /// Optional MVCC snapshot. `None` = read latest (plan §5). - pub snapshot_ts: Option, -} - -impl TikvNodeTableProvider { - /// Construct a new node provider bound to a TiKV client and shape. - /// - /// Per plan §5 `TikvNodeTableProvider::new`. Snapshot defaults to `None` - /// (read latest). Use [`Self::with_snapshot`] to pin to a specific HLC ts. - /// - /// Sprint 1 TODO: accept `Arc`. - pub async fn new( - client: Arc<()>, - shape: NodeShape, - ) -> Result { - // Sprint 1 TODO: validate client connectivity against the cluster. - Ok(Self { client, shape, snapshot_ts: None }) - } - - /// Pin this provider to a specific MVCC snapshot timestamp. - /// - /// Per plan §5 `with_snapshot(ts: u64) -> Self`. The `ts` is the same - /// HLC number used by surrealdb-core's `version` column and by Lance - /// dataset versions — **one clock, all storage targets**. - pub fn with_snapshot(mut self, ts: u64) -> Self { - self.snapshot_ts = Some(ts); - self - } -} - -// --------------------------------------------------------------------------- -// Debug — required by TableProvider trait bound -// --------------------------------------------------------------------------- - -impl std::fmt::Debug for TikvNodeTableProvider { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "TikvNodeTableProvider {{ shape: {:?} }}", self.shape) - } -} - -// --------------------------------------------------------------------------- -// DataFusion TableProvider impl -// --------------------------------------------------------------------------- - -#[async_trait] -impl TableProvider for TikvNodeTableProvider { - fn as_any(&self) -> &dyn Any { - self - } - - /// Return the Arrow schema for this node shape. - /// - /// Per plan §5: `self.shape.arrow_schema()`. - fn schema(&self) -> SchemaRef { - self.shape.arrow_schema() - } - - /// Report as a base table (not a view or temporary). - fn table_type(&self) -> TableType { - TableType::Base - } - - /// Produce a physical `ExecutionPlan` that streams node rows from TiKV. - /// - /// Per plan §5 scan outline: - /// 1. Translate `filters` into a TiKV key range via the shape. - /// 2. Snapshot-read at `snapshot_ts` (or current HLC if `None`). - /// 3. Stream rows as Arrow `RecordBatch` via `TikvScanExec`. - /// - /// Sprint 1 TODO: implement steps 1-3; wire to `TikvScanExec::new(...)`. - async fn scan( - &self, - _state: &dyn Session, - _projection: Option<&Vec>, - _filters: &[Expr], - _limit: Option, - ) -> DfResult> { - unimplemented!( - "LG-1 stub — implement TikvNodeTableProvider::scan in Sprint 1 \ - per integration-plan.md §5" - ) - } -} - -// --------------------------------------------------------------------------- -// MvccProvider + TikvBackedProvider marker impls -// --------------------------------------------------------------------------- - -/// Marker impl: `MvccProvider` for snapshot-consistent cross-engine reads. -/// -/// Per plan §5 "Snapshot integration": the `snapshot_ts` here is the same -/// `u64` that surrealdb-core, TiKV, and Lance all agree on. -impl MvccProvider for TikvNodeTableProvider { - fn backend(&self) -> BackendId { - BackendId::Tikv - } - - fn snapshot_ts(&self) -> Option { - self.snapshot_ts - } -} - -/// Marker impl: `TikvBackedProvider` so the planner detects TiKV providers -/// without downcasting through DataFusion's `dyn TableProvider` objects. -/// -/// Per plan §5 "Marker impl from lance-graph-contract::provider." -impl TikvBackedProvider for TikvNodeTableProvider {} diff --git a/crates/lance-graph-tikv-provider/src/scan.rs b/crates/lance-graph-tikv-provider/src/scan.rs deleted file mode 100644 index c658f9bf..00000000 --- a/crates/lance-graph-tikv-provider/src/scan.rs +++ /dev/null @@ -1,164 +0,0 @@ -//! Physical execution plan stub for TiKV range scans — Glue #2 (plan §5). -//! -//! `TikvScanExec` is the `ExecutionPlan` produced by -//! [`crate::node::TikvNodeTableProvider`] and -//! [`crate::edge::TikvEdgeTableProvider`] during DataFusion's physical -//! planning phase. It owns the TiKV snapshot handle, the key-range bounds -//! derived from pushed-down filters, and the projected schema to decode. -//! -//! Per plan §5 scan outline: -//! 1. Translate DataFusion predicates into a TiKV key range (done in the -//! provider's `scan()` call before constructing `TikvScanExec`). -//! 2. Snapshot-read at `snapshot_ts` (or current HLC if `None`). -//! 3. Stream rows back as Arrow `RecordBatch` via `batch_scan` + decode. -//! -//! Sprint 1 TODO: implement `execute()` with the real TiKV snapshot + -//! batch scan; replace all `unimplemented!()` bodies. - -use std::any::Any; -use std::sync::Arc; - -use arrow_schema::SchemaRef; -use datafusion::error::Result as DfResult; -use datafusion::execution::context::TaskContext; -use datafusion::physical_expr::EquivalenceProperties; -use datafusion::physical_plan::{ - DisplayAs, DisplayFormatType, ExecutionPlan, PlanProperties, - SendableRecordBatchStream, -}; -use datafusion::physical_plan::execution_plan::{EmissionType, Boundedness}; - -// --------------------------------------------------------------------------- -// TikvScanExec -// --------------------------------------------------------------------------- - -/// DataFusion `ExecutionPlan` that streams Arrow `RecordBatch` rows from a -/// TiKV range scan. -/// -/// Per plan §5: constructed by `TikvNodeTableProvider::scan` (or the edge -/// mirror) and handed to the DataFusion physical planner. The planner then -/// calls `execute(partition, ctx)` on each partition to get a -/// `RecordBatchStream`. -/// -/// This struct is `pub(crate)` — DataFusion only ever holds it as -/// `Arc`. The constructors are called from `node.rs` -/// and `edge.rs` exclusively. -/// -/// Sprint 1 TODO: add `snapshot: tikv_client::Snapshot` and -/// `key_range: (Vec, Vec)` fields once the real client is wired. -pub(crate) struct TikvScanExec { - /// Projected Arrow schema that this exec will produce. - /// - /// Per plan §5: derived from `NodeShape::arrow_schema()` or - /// `EdgeShape::arrow_schema()` with projection applied. - schema: SchemaRef, - - /// Cached plan properties (partition count, equivalences, exec mode). - /// - /// DataFusion requires `ExecutionPlan::properties()` to return an - /// `Arc` reference; we cache it at construction time. - properties: Arc, -} - -impl TikvScanExec { - /// Construct a new scan exec stub. - /// - /// Per plan §5: called from `TikvNodeTableProvider::scan` (and the edge - /// mirror) with the projected schema, key-range bounds, and optional - /// snapshot timestamp. - /// - /// Sprint 1 TODO: accept `snapshot`, `key_range`, `shape`, and `limit` - /// parameters; validate partition count against TiKV region topology. - pub(crate) fn new(schema: SchemaRef) -> Self { - let properties = Arc::new(PlanProperties::new( - EquivalenceProperties::new(schema.clone()), - datafusion::physical_plan::Partitioning::UnknownPartitioning(1), - EmissionType::Incremental, - Boundedness::Bounded, - )); - Self { schema, properties } - } -} - -// --------------------------------------------------------------------------- -// Debug — required by ExecutionPlan trait bound -// --------------------------------------------------------------------------- - -impl std::fmt::Debug for TikvScanExec { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "TikvScanExec {{ schema: {:?} }}", self.schema) - } -} - -// --------------------------------------------------------------------------- -// DisplayAs — required for EXPLAIN output -// --------------------------------------------------------------------------- - -impl DisplayAs for TikvScanExec { - fn fmt_as( - &self, - _t: DisplayFormatType, - f: &mut std::fmt::Formatter, - ) -> std::fmt::Result { - write!(f, "TikvScanExec(stub — Sprint 1)") - } -} - -// --------------------------------------------------------------------------- -// ExecutionPlan impl -// --------------------------------------------------------------------------- - -impl ExecutionPlan for TikvScanExec { - fn name(&self) -> &str { - "TikvScanExec" - } - - fn as_any(&self) -> &dyn Any { - self - } - - /// Return the schema this exec produces. - /// - /// Per plan §5: matches the projected `NodeShape` or `EdgeShape` schema. - fn schema(&self) -> SchemaRef { - self.schema.clone() - } - - /// Return cached plan properties (partition count, equivalences, mode). - fn properties(&self) -> &Arc { - &self.properties - } - - /// No children — this is a leaf scan operator. - fn children(&self) -> Vec<&Arc> { - vec![] - } - - /// Leaf nodes return a clone of themselves when asked to re-parent. - /// - /// Sprint 1 TODO: propagate new children if the planner wraps this exec. - fn with_new_children( - self: Arc, - _children: Vec>, - ) -> DfResult> { - Ok(self) - } - - /// Execute a partition and return a stream of `RecordBatch` rows. - /// - /// Per plan §5 steps 2-3: open a TiKV snapshot at `snapshot_ts`, - /// batch-scan the key range, decode bytes into Arrow columns. - /// - /// Sprint 1 TODO: implement with `tikv_client::Snapshot::scan` + - /// Arrow decoder. For now returns `unimplemented!()`. - fn execute( - &self, - _partition: usize, - _context: Arc, - ) -> DfResult { - unimplemented!( - "LG-1 stub — implement TikvScanExec::execute in Sprint 1 \ - per integration-plan.md §5" - ) - } -}