Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/asap-aware-mapping/src/accuracy/composition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,10 @@ impl DefaultAccuracyModel {
if inputs.len() != 2
|| inputs
.iter()
.any(|input| input.metric != ErrorMetric::RelativeValue)
.any(|input| input.metric != ErrorMetric::RelativeValue && !input.is_exact())
{
return Err(unsupported(
"division needs exactly two RelativeValue guarantees".into(),
"division needs two relative-value or exact guarantees".into(),
));
}
let Some(numerator) = inputs[0].bound.evaluate() else {
Expand Down
7 changes: 7 additions & 0 deletions crates/asap-aware-mapping/src/cost_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,13 @@ pub trait CostModel {
self.raw_query_recompute_cost(target)
.map(|per_read| Cost(per_read.0 * expected_reads))
}
/// Physical feasibility evidence for a complete summary candidate.
/// `None` defers admission to physical/deployment compilation; `Some(false)`
/// excludes the candidate without changing its computation or parameters.
fn summary_support_evidence(&self, _summary: &SummaryNode) -> Option<bool> {
None
}

/// Which mixed exact/summary execution shapes the downstream runtime
/// advertises (issue #171). Gates candidate *generation* in
/// [`crate::exact_composition::ExactCompositionStrategy`]: a shape the
Expand Down
8 changes: 6 additions & 2 deletions crates/asap-aware-mapping/src/maintained_population.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fn recognize(root: &QueryExpr) -> Option<(MaintainedPopulation, PopulationReadou
AggIntent::Quantile { q, col, .. } if q.is_finite() => {
(*col, PopulationReadout::Quantile { q: *q })
}
AggIntent::TopK { k, .. } => (None, PopulationReadout::TopK { k: *k }),
AggIntent::Sum { col } => (*col, PopulationReadout::Sum),
AggIntent::Count { .. } => (None, PopulationReadout::Count),
AggIntent::Avg { col } => (*col, PopulationReadout::Average),
Expand Down Expand Up @@ -142,8 +143,11 @@ fn recognize(root: &QueryExpr) -> Option<(MaintainedPopulation, PopulationReadou
if value_column.is_some_and(|c| schema.columns.get(c).is_none_or(|c| c.name != "value")) {
return None;
}
// Open time-series schemas distinguish instant PromQL populations from table rows.
if metric.is_empty() || schema.closed || schema.time_index.is_none() {
// PromQL can retain open labels or resolve them into a complete identity column.
if metric.is_empty()
|| (schema.closed && !schema.has_promql_series_identity())
|| schema.time_index.is_none()
{
return None;
}
let label = |col: usize| -> Option<String> {
Expand Down
Loading
Loading