diff --git a/data_plane/src/precompute_engine/accumulator_factory.rs b/data_plane/src/precompute_engine/accumulator_factory.rs index 12c76f4a..edeb2bb1 100644 --- a/data_plane/src/precompute_engine/accumulator_factory.rs +++ b/data_plane/src/precompute_engine/accumulator_factory.rs @@ -630,6 +630,8 @@ pub fn config_is_keyed(config: &AggregationConfig) -> bool { | AggregationType::MultipleMinMax | AggregationType::CountMinSketch | AggregationType::CountMinSketchWithHeap + | AggregationType::CountSketch + | AggregationType::CountSketchWithHeap | AggregationType::HydraKLL ) } @@ -730,6 +732,26 @@ pub fn create_accumulator_updater(config: &AggregationConfig) -> Box { + let (row_num, col_num) = cms_params(config); + Box::new(CmsAccumulatorUpdater::new(row_num, col_num)) + } AggregationType::HydraKLL => { let (row_num, col_num, k) = hydra_kll_params(config); Box::new(HydraKllAccumulatorUpdater::new(row_num, col_num, k)) @@ -882,6 +904,18 @@ mod tests { AggregationType::CountMinSketch, "" ))); + assert!(config_is_keyed(&make_config( + AggregationType::CountMinSketchWithHeap, + "" + ))); + assert!(config_is_keyed(&make_config( + AggregationType::CountSketch, + "" + ))); + assert!(config_is_keyed(&make_config( + AggregationType::CountSketchWithHeap, + "" + ))); assert!(config_is_keyed(&make_config(AggregationType::HydraKLL, ""))); // Verify agreement with updater.is_keyed()