You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Offer maintained-population top-k candidates in Pass 1 #681
Pass 1 does not offer the maintained-population (current-series) top-k candidate (MaintainPopulation / EvaluatePopulation, #573). Only the legacy search proposed it, through MaintainedPopulationStrategy. It is not reachable on main today.
To do: generate it as a per-computation candidate for current-series top-k (and the other population intents), and implement it in physical ASAP-aware optimization. Materialization comes from #604 (G8).
#961 deletes the unwired MaintainedPopulationStrategy rule and its rule tests. The cases they covered are acceptance tests for reimplementing the rule as a Pass 1 candidate here. The deleted files at ebfad9cd:
Sharing across readouts.quantile by(job)(0.5,a), quantile by(job)(0.99,a), topk by(job)(1,a) and topk by(job)(5,a) share one population producer, with max_k = 5 and quantiles = true. sum, count and avg, with and without by(job), are current-series candidates that compile.
SQL table rows. Quantiles and scalar readouts over one table share rows without a PromQL lookback. max_k is shared. Populations separate by grouping and filters, projections are preserved, and an invalid value column is rejected.
Recognition limits. These are not instant populations: quantile_over_time(0.5,a[1m]), quantile(0.5,sum by(job)(a)), topk(5,a offset 1m), topk(5,a @ 100), bottomk(5,a). Different sources, groupings or matchers separate populations: topk(5,a) vs topk(10,b), and quantile(0.9,a{job="api"}). without(instance) with a regex matcher keeps without, the grouping and the regex.
Limit/Sort partition check. A global Limit over a per-job Sort, or a per-job Limit over a global Sort, is not the population's top-k.
Selector horizon. The population of sum(a) over a 1-second selector has lookback_ms = 1000 and matches its source; with 300000 it does not.
#961 keeps the IR coverage (invalid value column, lookback agreement, timing follows materialization, malformed DAGs fail closed) as hand-built tests in crates/types/tests/schema_rebuilding.rs.
Activity
refactor(asap-aware-mapping)!: delete the legacy replacement search a…
refactor(asap-aware-mapping)!: delete the legacy replacement search a…
refactor(asap-aware-mapping)!: delete the legacy replacement search a…
zzylol commentedon Oct 27, 2026
#961 deletes the unwired
MaintainedPopulationStrategyrule and its rule tests. The cases they covered are acceptance tests for reimplementing the rule as a Pass 1 candidate here. The deleted files atebfad9cd:crates/logical-asap-optimization/src/maintained_population.rs(rule and unit tests)crates/frontend-sql/tests/maintained_population.rscrates/frontend-promql/tests/maintained_population_horizon.rsCases to cover again:
quantile by(job)(0.5,a),quantile by(job)(0.99,a),topk by(job)(1,a)andtopk by(job)(5,a)share one population producer, withmax_k = 5andquantiles = true.sum,countandavg, with and withoutby(job), are current-series candidates that compile.max_kis shared. Populations separate by grouping and filters, projections are preserved, and an invalid value column is rejected.quantile_over_time(0.5,a[1m]),quantile(0.5,sum by(job)(a)),topk(5,a offset 1m),topk(5,a @ 100),bottomk(5,a). Different sources, groupings or matchers separate populations:topk(5,a)vstopk(10,b), andquantile(0.9,a{job="api"}).without(instance)with a regex matcher keepswithout, the grouping and the regex.Limit/Sortpartition check. A globalLimitover a per-jobSort, or a per-jobLimitover a globalSort, is not the population's top-k.sum(a)over a 1-second selector haslookback_ms = 1000and matches its source; with 300000 it does not.#961 keeps the IR coverage (invalid value column, lookback agreement, timing follows materialization, malformed DAGs fail closed) as hand-built tests in
crates/types/tests/schema_rebuilding.rs.refactor(optimizer): delete the unwired maintained-population rule (#961