Skip to content

Commit 165a3fa

Browse files
zzylolclaude
andcommitted
fix: integrate with #620
#620's priced_example2_candidates_bind requires every priced Stage 3 candidate to bind. With UnivMon L2 certified, Example 2's UnivMon over src_ip (unit-weight item update) is now priced, but the physical planner sent it to the keyed weighted-frequency build, which has no UnivMon kernel. Bind it as UnivMon's value-frequency build over the item column, which already counts typed SQL identities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 20085ec commit 165a3fa

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

  • crates/executor/src/physical_planner

‎crates/executor/src/physical_planner/mod.rs‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,29 @@ fn summary_build(
997997
groups(input, keys)?,
998998
);
999999
}
1000+
// UnivMon counts one occurrence of each row's item (SQL `COUNT(*) GROUP
1001+
// BY item`): its value-frequency build over the item column.
1002+
if let (
1003+
FieldDataType::Sketch(kind, _),
1004+
Some(SummaryInputExpr::Column(item)),
1005+
SummaryInputExpr::Constant(weight),
1006+
) = (family, &update.item, &update.weight)
1007+
{
1008+
if kind.algorithm() == &planner_types::ir::schema::SketchAlgorithm::UnivMon
1009+
&& *weight == 1.0
1010+
{
1011+
let PlannerReduction::Reduce(keys) = reduction else {
1012+
return Err(invalid("UnivMon requires explicit grouping columns"));
1013+
};
1014+
return Operator::summary_build(
1015+
input.clone(),
1016+
family.clone(),
1017+
named_column(input, item)?,
1018+
None,
1019+
groups(input, keys)?,
1020+
);
1021+
}
1022+
}
10001023
if let Some(item) = &update.item {
10011024
let PlannerReduction::Reduce(keys) = reduction else {
10021025
return Err(invalid("keyed summary requires explicit partitions"));

0 commit comments

Comments
 (0)