pub enum PartitionStrategy {
None,
RangeByTimeDimension {
field: String,
granularity: PartitionGranularity,
retention: Option<RetentionPolicy>,
look_ahead: Option<u32>,
window: PartitionWindow,
},
}Expand description
Partitioning strategy for a table.
RangeByTimeDimension is the only supported partitioning strategy; it
requires the entity to expose a single FieldRole::TimeDimension field.
Variants§
None
No partitioning; the table is stored as a single segment.
RangeByTimeDimension
Range partition on a single FieldRole::TimeDimension field.
Fields
granularity: PartitionGranularityGranularity of each partition range (day, week, month, etc.).
retention: Option<RetentionPolicy>Optional retention policy that removes or archives old partitions.
look_ahead: Option<u32>How many partitions to pre-create ahead of now() for the extend
procedure. Defaults: 7 for Day, 4 for Week, 2 for Month,
1 for Quarter/Year.
window: PartitionWindowTime-window sizing inputs used to auto-select an appropriate
granularity that fits within partition_budget (default 2000)
when the dialect imposes a per-table partition cap (e.g. SQL
Server’s 5000-partition limit).
These fields are advisory: when present, the materializer’s
select_grain helper uses them to coarsen the granularity from
the requested grain (e.g. Day → Week → Month → Year)
until (history_days + forecast_days) / grain ≤ partition_budget.
Authoring sources (in priority order):
- Explicit values in the design YAML (highest authority).
- AI wizard inferring from
Strandprofiling (min_value/max_value). - Defaults baked into the materializer.
Trait Implementations§
Source§impl Clone for PartitionStrategy
impl Clone for PartitionStrategy
Source§fn clone(&self) -> PartitionStrategy
fn clone(&self) -> PartitionStrategy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more