@@ -1609,18 +1609,15 @@ mod topk_pipeline_tests {
16091609
16101610 #[ test]
16111611 fn count_topk_capability_fallback_pairs_heap_with_key_agg ( ) {
1612- let engine = build_capability_fallback_engine ( vec ! [ make_heap_agg(
1613- HEAP_COUNT_ID ,
1614- Some ( true ) ,
1615- ) ] ) ;
1612+ let engine =
1613+ build_capability_fallback_engine ( vec ! [ make_heap_agg( HEAP_COUNT_ID , Some ( true ) ) ] ) ;
16161614 let context = engine
16171615 . build_query_execution_context_sql ( topk_query ( 10 ) , QUERY_TIME )
16181616 . expect ( "COUNT top-k should resolve via capability matching" ) ;
16191617
16201618 assert_eq ! ( context. metadata. statistic_to_compute, Statistic :: Topk ) ;
16211619 assert_eq ! (
1622- context. agg_info. aggregation_id_for_value,
1623- HEAP_COUNT_ID ,
1620+ context. agg_info. aggregation_id_for_value, HEAP_COUNT_ID ,
16241621 "count-weighted heap must be the value aggregation" ,
16251622 ) ;
16261623 assert_eq ! (
@@ -1648,26 +1645,21 @@ mod topk_pipeline_tests {
16481645 . expect ( "COUNT top-k should pick the count_events: true sketch" ) ;
16491646
16501647 assert_eq ! (
1651- context. agg_info. aggregation_id_for_value,
1652- HEAP_COUNT_ID ,
1648+ context. agg_info. aggregation_id_for_value, HEAP_COUNT_ID ,
16531649 "COUNT top-k must not pick the sum-weighted sketch when both exist" ,
16541650 ) ;
16551651 }
16561652
16571653 #[ test]
16581654 fn count_topk_capability_fallback_defaults_count_events_true ( ) {
16591655 // Heap omits `count_events`; matcher treats that as count semantics.
1660- let engine = build_capability_fallback_engine ( vec ! [ make_heap_agg(
1661- HEAP_DEFAULT_ID ,
1662- None ,
1663- ) ] ) ;
1656+ let engine = build_capability_fallback_engine ( vec ! [ make_heap_agg( HEAP_DEFAULT_ID , None ) ] ) ;
16641657 let context = engine
16651658 . build_query_execution_context_sql ( topk_query ( 10 ) , QUERY_TIME )
16661659 . expect ( "COUNT top-k should match a sketch with default count_events" ) ;
16671660
16681661 assert_eq ! (
1669- context. agg_info. aggregation_id_for_value,
1670- HEAP_DEFAULT_ID ,
1662+ context. agg_info. aggregation_id_for_value, HEAP_DEFAULT_ID ,
16711663 "default (no flag) heap must serve COUNT top-k" ,
16721664 ) ;
16731665 }
@@ -1684,8 +1676,7 @@ mod topk_pipeline_tests {
16841676
16851677 assert_eq ! ( context. metadata. statistic_to_compute, Statistic :: Topk ) ;
16861678 assert_eq ! (
1687- context. agg_info. aggregation_id_for_value,
1688- HEAP_SUM_ID ,
1679+ context. agg_info. aggregation_id_for_value, HEAP_SUM_ID ,
16891680 "SUM top-k must pick the count_events: false sketch" ,
16901681 ) ;
16911682 assert_eq ! ( context. agg_info. aggregation_id_for_key, KEY_AGG_ID ) ;
@@ -1695,10 +1686,7 @@ mod topk_pipeline_tests {
16951686 #[ test]
16961687 fn sum_topk_capability_fallback_rejects_count_only_default_heap ( ) {
16971688 // Only a default (count-weighted) sketch exists; SUM top-k cannot be served.
1698- let engine = build_capability_fallback_engine ( vec ! [ make_heap_agg(
1699- HEAP_DEFAULT_ID ,
1700- None ,
1701- ) ] ) ;
1689+ let engine = build_capability_fallback_engine ( vec ! [ make_heap_agg( HEAP_DEFAULT_ID , None ) ] ) ;
17021690 assert ! (
17031691 engine
17041692 . build_query_execution_context_sql( sum_topk_query( 5 ) , QUERY_TIME )
0 commit comments