1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// SPDX-License-Identifier: BUSL-1.1
//! [`KeyExtractor`] trait and a placeholder implementation.
//!
//! Key-partitioned routing requires extracting shard keys from a
//! [`PhysicalPlan`] before the router can produce per-key [`TaskRoute`]s. Each
//! key-partitioned engine (graph node-id, array tile) supplies its own extractor;
//! the router stays engine-agnostic by calling through this trait.
//!
//! No collection carries `PartitionStrategy::KeyPartitioned` yet, so any plan
//! that somehow reaches the `KeyPartitioned` arm returns a hard typed
//! `Error::PlanError` — never a panic, never a silent empty (which would
//! misroute every row to vShard 0).
use PhysicalPlan;
use KeySpec;
use crateResult;
/// Extracts the raw shard keys from a plan for key-partitioned routing.
///
/// Implementations are engine-specific (graph node-id, array tile); the router
/// calls this trait and stays engine-agnostic.
/// Placeholder extractor: returns a hard error for any key-partitioned collection.
///
/// No collection carries `PartitionStrategy::KeyPartitioned` yet, so the router
/// never calls this in practice. It exists as a typed sentinel so the
/// `KeyPartitioned` arm can return a real `Err` rather than `todo!()`/panic.
/// Engine-specific extractors (graph node-id, array tile) replace it once
/// key-partitioned routing is wired.
;