@@ -45,6 +45,27 @@ pub(super) fn construct<S: Scope<Timestamp = mz_repr::Timestamp>>(
45
45
dataflows_exceeding_heap_size_limit,
46
46
} = streams;
47
47
48
+ // The following dataflow computes:
49
+ // ```
50
+ // arrangement_heap_size batcher_heap_size operator_to_dataflow heap_size_limits
51
+ // | | | |
52
+ // |----->concat<------ | arrange arrange
53
+ // | | |
54
+ // arrange: op_to_heap_size | |
55
+ // | | |
56
+ // |-->join: dataflow_to_heap_size<-| |
57
+ // | |
58
+ // arrange |
59
+ // | |
60
+ // count_total_core |
61
+ // | |
62
+ // arrange |
63
+ // | |
64
+ // |------------>join<-------------------|
65
+ // |
66
+ // result
67
+ // ```
68
+
48
69
let operator_to_heap_size = arrangement_heap_size. concat ( & batcher_heap_size) ;
49
70
let operator_to_heap_size = operator_to_heap_size
50
71
. as_collection ( )
@@ -58,22 +79,20 @@ pub(super) fn construct<S: Scope<Timestamp = mz_repr::Timestamp>>(
58
79
"operator_to_dataflow" ,
59
80
) ;
60
81
61
- let heap_size_limits = heap_size_limits
62
- . as_collection ( )
63
- . mz_arrange :: < ColValBatcher < _ , _ , _ , _ > , ColValBuilder < _ , _ , _ , _ > , KeyValSpine < _ , _ , _ , _ > > ( "heap_size_limits" ) ;
64
-
65
82
let dataflow_to_heap_size = operator_to_heap_size
66
83
. join_core ( & operator_to_dataflow, |_op, ( ) , dataflow| {
67
84
Some ( ( * dataflow, ( ) ) )
68
85
} ) ;
69
86
70
- let dataflow_to_heap_size = dataflow_to_heap_size
87
+ let heap_size_limits = heap_size_limits
88
+ . as_collection ( )
89
+ . mz_arrange :: < ColValBatcher < _ , _ , _ , _ > , ColValBuilder < _ , _ , _ , _ > , KeyValSpine < _ , _ , _ , _ > > ( "heap_size_limits" ) ;
90
+
91
+ let dataflow_to_heap_size_limit = dataflow_to_heap_size
71
92
. mz_arrange :: < KeyBatcher < _ , _ , _ > , ColKeyBuilder < _ , _ , _ > , KeySpine < _ , _ , _ > > (
72
93
"dataflow_to_heap_size" ,
73
94
)
74
- . count_total_core :: < mz_repr:: Diff > ( ) ;
75
-
76
- let dataflow_to_heap_size_limit = dataflow_to_heap_size
95
+ . count_total_core :: < mz_repr:: Diff > ( )
77
96
. mz_arrange :: < ColValBatcher < _ , _ , _ , _ > , ColValBuilder < _ , _ , _ , _ > , KeyValSpine < _ , _ , _ , _ > > (
78
97
"dataflow_to_heap_size" ,
79
98
)
0 commit comments