@@ -22,8 +22,7 @@ use differential_dataflow::trace::{Cursor, Navigable, TraceReader};
2222use differential_dataflow:: { AsCollection , VecCollection } ;
2323use mz_compute_types:: dataflows:: DataflowDescription ;
2424use mz_compute_types:: dyncfgs:: {
25- ENABLE_COLUMN_PAGED_BATCHER , ENABLE_COMPUTE_RENDER_FUELED_AS_SPECIFIC_COLLECTION ,
26- ENABLE_COMPUTE_TEMPORAL_BUCKETING , TEMPORAL_BUCKETING_SUMMARY ,
25+ ENABLE_COLUMN_PAGED_BATCHER , ENABLE_COMPUTE_TEMPORAL_BUCKETING , TEMPORAL_BUCKETING_SUMMARY ,
2726} ;
2827use mz_compute_types:: plan:: scalar:: { LirScalarExpr , mfp_mir_to_lir_plan, mfp_plan_lir_to_mir} ;
2928use mz_compute_types:: plan:: { ArrangementStrategy , AvailableCollections } ;
@@ -57,7 +56,7 @@ use crate::render::{LinearJoinSpec, MaybeBucketByTime, RenderTimestamp};
5756use crate :: typedefs:: {
5857 ErrAgent , ErrBatcher , ErrBuilder , ErrEnter , ErrSpine , RowRowAgent , RowRowEnter , RowRowSpine ,
5958} ;
60- use mz_row_spine:: { DatumSeq , RowRowBuilder , RowRowColPagedBuilder } ;
59+ use mz_row_spine:: { RowRowBuilder , RowRowColPagedBuilder } ;
6160
6261/// Dataflow-local collections and arrangements.
6362///
@@ -236,40 +235,6 @@ pub enum ArrangementFlavor<'scope, T: RenderTimestamp> {
236235}
237236
238237impl < ' scope , T : RenderTimestamp > ArrangementFlavor < ' scope , T > {
239- /// Presents `self` as a stream of updates.
240- ///
241- /// Deprecated: This function is not fueled and hence risks flattening the whole arrangement.
242- ///
243- /// This method presents the contents as they are, without further computation.
244- /// If you have logic that could be applied to each record, consider using the
245- /// `flat_map` methods which allows this and can reduce the work done.
246- #[ deprecated( note = "Use `flat_map` instead." ) ]
247- pub fn as_collection (
248- & self ,
249- ) -> (
250- VecCollection < ' scope , T , Row , Diff > ,
251- VecCollection < ' scope , T , DataflowErrorSer , Diff > ,
252- ) {
253- let mut datums = DatumVec :: new ( ) ;
254- let logic = move |k : DatumSeq , v : DatumSeq | {
255- let temp_storage = RowArena :: new ( ) ;
256- let mut datums_borrow = datums. borrow ( ) ;
257- k. extend_datums ( & temp_storage, & mut datums_borrow, None ) ;
258- v. extend_datums ( & temp_storage, & mut datums_borrow, None ) ;
259- SharedRow :: pack ( & * * datums_borrow)
260- } ;
261- match & self {
262- ArrangementFlavor :: Local ( oks, errs) => (
263- oks. clone ( ) . as_collection ( logic) ,
264- errs. clone ( ) . as_collection ( |k, & ( ) | k. clone ( ) ) ,
265- ) ,
266- ArrangementFlavor :: Trace ( _, oks, errs) => (
267- oks. clone ( ) . as_collection ( logic) ,
268- errs. clone ( ) . as_collection ( |k, & ( ) | k. clone ( ) ) ,
269- ) ,
270- }
271- }
272-
273238 /// Constructs and applies logic to elements of `self` and returns the results.
274239 ///
275240 /// The `logic` callback receives a borrow of the decoded datum vector, a timestamp, a
@@ -558,9 +523,8 @@ impl<'scope, T: RenderTimestamp> CollectionBundle<'scope, T> {
558523 /// Therefore, it should be used when the appropriate transformation
559524 /// was planned as part of a following MFP.
560525 ///
561- /// If `key` is specified, the function converts the arrangement to a collection. It uses either
562- /// the fueled `flat_map` or `as_collection` method, depending on the flag
563- /// [`ENABLE_COMPUTE_RENDER_FUELED_AS_SPECIFIC_COLLECTION`].
526+ /// If `key` is specified, the function converts the arrangement to a collection using a
527+ /// fueled `flat_map` operator.
564528 ///
565529 /// The keyed path materializes the arrangement as the columnar edge, so an
566530 /// arrangement-producing operator (Reduce, Threshold, bucketed TopK) whose
@@ -570,7 +534,6 @@ impl<'scope, T: RenderTimestamp> CollectionBundle<'scope, T> {
570534 pub fn as_specific_collection (
571535 & self ,
572536 key : Option < & [ LirScalarExpr ] > ,
573- config_set : & ConfigSet ,
574537 ) -> (
575538 CollectionEdge < ' scope , T > ,
576539 VecCollection < ' scope , T , DataflowErrorSer , Diff > ,
@@ -589,28 +552,22 @@ impl<'scope, T: RenderTimestamp> CollectionBundle<'scope, T> {
589552 let arranged = self . arranged . get ( key) . unwrap_or_else ( || {
590553 panic ! ( "The collection arranged by {:?} doesn't exist." , key)
591554 } ) ;
592- if ENABLE_COMPUTE_RENDER_FUELED_AS_SPECIFIC_COLLECTION . get ( config_set) {
593- // Decode all columns (max_demand usize::MAX) and pack each cursor record
594- // into a `Column`, so the materialized collection carries the columnar edge.
595- // Output is 1:1 from the already-consolidated cursor, so a non-consolidating
596- // `ColumnBuilder` matches the row-based `CapacityContainerBuilder` this
597- // replaced; the packed row is pushed borrowed, holding no owned `Row` per
598- // record.
599- let ( ok, err) = arranged. flat_map_ok :: < ColumnBuilder < ( Row , T , Diff ) > , _ > (
600- None ,
601- usize:: MAX ,
602- |borrow, t, r, ok_session| {
603- let row = SharedRow :: pack ( borrow. iter ( ) ) ;
604- ok_session. give ( ( & row, & t, & r) ) ;
605- 1
606- } ,
607- ) ;
608- ( CollectionEdge :: Columnar ( ok. as_collection ( ) ) , err)
609- } else {
610- #[ allow( deprecated) ]
611- let ( oks, errs) = arranged. as_collection ( ) ;
612- ( CollectionEdge :: Vec ( oks) , errs)
613- }
555+ // Decode all columns (max_demand usize::MAX) and pack each cursor record
556+ // into a `Column`, so the materialized collection carries the columnar edge.
557+ // Output is 1:1 from the already-consolidated cursor, so a non-consolidating
558+ // `ColumnBuilder` matches the row-based `CapacityContainerBuilder` this
559+ // replaced; the packed row is pushed borrowed, holding no owned `Row` per
560+ // record.
561+ let ( ok, err) = arranged. flat_map_ok :: < ColumnBuilder < ( Row , T , Diff ) > , _ > (
562+ None ,
563+ usize:: MAX ,
564+ |borrow, t, r, ok_session| {
565+ let row = SharedRow :: pack ( borrow. iter ( ) ) ;
566+ ok_session. give ( ( & row, & t, & r) ) ;
567+ 1
568+ } ,
569+ ) ;
570+ ( CollectionEdge :: Columnar ( ok. as_collection ( ) ) , err)
614571 }
615572 }
616573 }
@@ -921,7 +878,6 @@ impl<'scope, T: RenderTimestamp> CollectionBundle<'scope, T> {
921878 mfp_plan : MfpPlan < LirScalarExpr > ,
922879 key_val : Option < ( Vec < LirScalarExpr > , Option < Row > ) > ,
923880 until : Antichain < mz_repr:: Timestamp > ,
924- config_set : & ConfigSet ,
925881 ) -> (
926882 CollectionEdge < ' scope , T > ,
927883 VecCollection < ' scope , T , DataflowErrorSer , Diff > ,
@@ -949,7 +905,7 @@ impl<'scope, T: RenderTimestamp> CollectionBundle<'scope, T> {
949905 // Keyed identity materializes an existing arrangement.
950906 // `as_specific_collection` returns the columnar edge, so the
951907 // reduce/threshold/topk result carries columnar downstream.
952- Some ( key) => self . as_specific_collection ( Some ( & key) , config_set ) ,
908+ Some ( key) => self . as_specific_collection ( Some ( & key) ) ,
953909 } ;
954910 }
955911
@@ -1066,7 +1022,7 @@ impl<'scope, T: RenderTimestamp> CollectionBundle<'scope, T> {
10661022 let form_raw_collection = collections. raw || will_create_arrangement;
10671023 if form_raw_collection && self . collection . is_none ( ) {
10681024 let ( oks, errs) =
1069- self . as_collection_core ( input_mfp, input_key. map ( |k| ( k, None ) ) , until, config_set ) ;
1025+ self . as_collection_core ( input_mfp, input_key. map ( |k| ( k, None ) ) , until) ;
10701026 // Apply temporal bucketing when the lowering selected `TemporalBucketing` and
10711027 // we will build at least one arrangement. This path fires when the collection
10721028 // must be formed from scratch (e.g., from an arrangement via as_collection_core).
@@ -1523,7 +1479,6 @@ fn walk_cursor<C, F>(
15231479#[ cfg( test) ]
15241480mod tests {
15251481 use differential_dataflow:: input:: Input ;
1526- use mz_compute_types:: dyncfgs:: all_dyncfgs;
15271482 use mz_expr:: { EvalError , MapFilterProject } ;
15281483 use mz_repr:: { Datum , ReprScalarType , Timestamp } ;
15291484 use timely:: dataflow:: operators:: Capture ;
@@ -1727,15 +1682,13 @@ mod tests {
17271682 . collect ( ) ;
17281683 expected. sort ( ) ;
17291684
1730- let config_set = ConfigSet :: default ( ) ;
17311685 let ( producer_is_columnar, passthrough_is_columnar, produced) =
17321686 timely:: execute_directly ( move |worker| {
17331687 worker. dataflow :: < Timestamp , _ , _ > ( |scope| {
17341688 let ( mut input, collection) = scope. new_collection ( ) ;
17351689 let ( _err_input, errs) = scope. new_collection :: < DataflowErrorSer , Diff > ( ) ;
17361690 let bundle = CollectionBundle :: from_edge ( CollectionEdge :: Vec ( collection) , errs) ;
1737- let ( edge, _errs) =
1738- bundle. as_collection_core ( mfp, None , Antichain :: new ( ) , & config_set) ;
1691+ let ( edge, _errs) = bundle. as_collection_core ( mfp, None , Antichain :: new ( ) ) ;
17391692 let producer_is_columnar = matches ! ( edge, CollectionEdge :: Columnar ( _) ) ;
17401693 // Tee the producer output for a content check, then feed the
17411694 // original edge into the arrange input.
@@ -1778,7 +1731,6 @@ mod tests {
17781731 #[ mz_ore:: test]
17791732 fn as_collection_core_identity_passes_edge_through ( ) {
17801733 for columnar_input in [ false , true ] {
1781- let config_set = ConfigSet :: default ( ) ;
17821734 let is_columnar = timely:: execute_directly ( move |worker| {
17831735 worker. dataflow :: < Timestamp , _ , _ > ( |scope| {
17841736 let ( mut input, collection) = scope. new_collection :: < Row , Diff > ( ) ;
@@ -1792,8 +1744,7 @@ mod tests {
17921744 let identity = MapFilterProject :: < LirScalarExpr > :: new ( 1 )
17931745 . into_plan ( )
17941746 . expect ( "identity mfp" ) ;
1795- let ( out, _errs) =
1796- bundle. as_collection_core ( identity, None , Antichain :: new ( ) , & config_set) ;
1747+ let ( out, _errs) = bundle. as_collection_core ( identity, None , Antichain :: new ( ) ) ;
17971748 let is_columnar = matches ! ( out, CollectionEdge :: Columnar ( _) ) ;
17981749 input. update ( Row :: pack_slice ( & [ Datum :: Int64 ( 1 ) ] ) , Diff :: ONE ) ;
17991750 input. advance_to ( Timestamp :: from ( 1u64 ) ) ;
@@ -1839,14 +1790,12 @@ mod tests {
18391790 ) ,
18401791 ] ;
18411792
1842- let config_set = ConfigSet :: default ( ) ;
18431793 let captured = timely:: execute_directly ( move |worker| {
18441794 worker. dataflow :: < Timestamp , _ , _ > ( |scope| {
18451795 let ( mut input, collection) = scope. new_collection ( ) ;
18461796 let ( _err_input, errs) = scope. new_collection :: < DataflowErrorSer , Diff > ( ) ;
18471797 let bundle = CollectionBundle :: from_edge ( CollectionEdge :: Vec ( collection) , errs) ;
1848- let ( edge, _errs) =
1849- bundle. as_collection_core ( mfp, None , Antichain :: new ( ) , & config_set) ;
1798+ let ( edge, _errs) = bundle. as_collection_core ( mfp, None , Antichain :: new ( ) ) ;
18501799 assert ! (
18511800 matches!( edge, CollectionEdge :: Columnar ( _) ) ,
18521801 "a non-identity MFP must produce a columnar edge"
@@ -1887,9 +1836,6 @@ mod tests {
18871836 . collect ( ) ;
18881837 expected. sort ( ) ;
18891838
1890- // A populated set so the fueled-materialization flag resolves to its
1891- // default (`true`); `ConfigSet::default()` alone would panic on lookup.
1892- let config_set = all_dyncfgs ( ConfigSet :: default ( ) ) ;
18931839 let ( is_columnar, captured) = timely:: execute_directly ( move |worker| {
18941840 worker. dataflow :: < Timestamp , _ , _ > ( |scope| {
18951841 let ( mut input, collection) = scope. new_collection ( ) ;
@@ -1915,7 +1861,7 @@ mod tests {
19151861 0 ..1 ,
19161862 ArrangementFlavor :: Local ( arranged, err_arranged) ,
19171863 ) ;
1918- let ( edge, _errs) = bundle. as_specific_collection ( Some ( & key) , & config_set ) ;
1864+ let ( edge, _errs) = bundle. as_specific_collection ( Some ( & key) ) ;
19191865 let is_columnar = matches ! ( edge, CollectionEdge :: Columnar ( _) ) ;
19201866 let captured = edge. into_vec ( ) . inner . capture ( ) ;
19211867
0 commit comments