@@ -19,7 +19,9 @@ use differential_dataflow::trace::implementations::merge_batcher_col::Columnatio
19
19
use differential_dataflow:: trace:: implementations:: ord_neu:: { FlatValSpine , OrdValBatch } ;
20
20
use differential_dataflow:: trace:: wrappers:: enter:: TraceEnter ;
21
21
use differential_dataflow:: trace:: wrappers:: frontier:: TraceFrontier ;
22
- use mz_ore:: flatcontainer:: { MzRegionPreference , MzTupleABCRegion , MzTupleABRegion } ;
22
+ use mz_ore:: flatcontainer:: {
23
+ MzOffsetOptimized , MzRegionPreference , MzTupleABCRegion , MzTupleABRegion ,
24
+ } ;
23
25
use mz_repr:: Diff ;
24
26
use mz_storage_types:: errors:: DataflowError ;
25
27
use timely:: dataflow:: ScopeParent ;
@@ -39,7 +41,7 @@ pub(crate) mod spines {
39
41
use differential_dataflow:: trace:: implementations:: spine_fueled:: Spine ;
40
42
use differential_dataflow:: trace:: implementations:: { Layout , Update } ;
41
43
use differential_dataflow:: trace:: rc_blanket_impls:: RcBuilder ;
42
- use mz_ore:: flatcontainer:: MzRegion ;
44
+ use mz_ore:: flatcontainer:: { MzOffsetOptimized , MzRegion } ;
43
45
use mz_timely_util:: containers:: stack:: StackWrapper ;
44
46
use timely:: container:: columnation:: { Columnation , TimelyStack } ;
45
47
use timely:: container:: flatcontainer:: FlatStack ;
@@ -106,60 +108,6 @@ pub(crate) mod spines {
106
108
type Val = VR :: Owned ;
107
109
type Time = TR :: Owned ;
108
110
type Diff = RR :: Owned ;
109
- type ItemRef < ' a > = ( ( Self :: KeyGat < ' a > , Self :: ValGat < ' a > ) , Self :: TimeGat < ' a > , Self :: DiffGat < ' a > )
110
- where
111
- Self : ' a ;
112
- type KeyGat < ' a > = KR :: ReadItem < ' a >
113
- where
114
- Self : ' a ;
115
- type ValGat < ' a > = VR :: ReadItem < ' a >
116
- where
117
- Self : ' a ;
118
- type TimeGat < ' a > = TR :: ReadItem < ' a >
119
- where
120
- Self : ' a ;
121
- type DiffGat < ' a > = RR :: ReadItem < ' a >
122
- where
123
- Self : ' a ;
124
-
125
- fn into_parts < ' a > (
126
- ( ( key, val) , time, diff) : Self :: ItemRef < ' a > ,
127
- ) -> (
128
- Self :: KeyGat < ' a > ,
129
- Self :: ValGat < ' a > ,
130
- Self :: TimeGat < ' a > ,
131
- Self :: DiffGat < ' a > ,
132
- ) {
133
- ( key, val, time, diff)
134
- }
135
-
136
- fn reborrow_key < ' b , ' a : ' b > ( item : Self :: KeyGat < ' a > ) -> Self :: KeyGat < ' b >
137
- where
138
- Self : ' a ,
139
- {
140
- KR :: reborrow ( item)
141
- }
142
-
143
- fn reborrow_val < ' b , ' a : ' b > ( item : Self :: ValGat < ' a > ) -> Self :: ValGat < ' b >
144
- where
145
- Self : ' a ,
146
- {
147
- VR :: reborrow ( item)
148
- }
149
-
150
- fn reborrow_time < ' b , ' a : ' b > ( item : Self :: TimeGat < ' a > ) -> Self :: TimeGat < ' b >
151
- where
152
- Self : ' a ,
153
- {
154
- TR :: reborrow ( item)
155
- }
156
-
157
- fn reborrow_diff < ' b , ' a : ' b > ( item : Self :: DiffGat < ' a > ) -> Self :: DiffGat < ' b >
158
- where
159
- Self : ' a ,
160
- {
161
- RR :: reborrow ( item)
162
- }
163
111
}
164
112
165
113
/// Layout implementation for [`MzFlatLayout`]. Mostly equivalent to differential's
@@ -182,10 +130,10 @@ pub(crate) mod spines {
182
130
for < ' a > RR :: ReadItem < ' a > : Copy + Ord ,
183
131
{
184
132
type Target = Self ;
185
- type KeyContainer = FlatStack < KR > ;
186
- type ValContainer = FlatStack < VR > ;
187
- type TimeContainer = FlatStack < TR > ;
188
- type DiffContainer = FlatStack < RR > ;
133
+ type KeyContainer = FlatStack < KR , MzOffsetOptimized > ;
134
+ type ValContainer = FlatStack < VR , MzOffsetOptimized > ;
135
+ type TimeContainer = FlatStack < TR , MzOffsetOptimized > ;
136
+ type DiffContainer = FlatStack < RR , MzOffsetOptimized > ;
189
137
type OffsetContainer = OffsetOptimized ;
190
138
}
191
139
}
@@ -234,8 +182,12 @@ pub type KeyValBatcher<K, V, T, D> = MergeBatcher<
234
182
> ;
235
183
236
184
pub type FlatKeyValBatch < K , V , T , R > = OrdValBatch < MzFlatLayout < K , V , T , R > > ;
237
- pub type FlatKeyValSpine < K , V , T , R , C > =
238
- FlatValSpine < MzFlatLayout < K , V , T , R > , MzTupleABCRegion < MzTupleABRegion < K , V > , T , R > , C > ;
185
+ pub type FlatKeyValSpine < K , V , T , R , C > = FlatValSpine <
186
+ MzFlatLayout < K , V , T , R > ,
187
+ MzTupleABCRegion < MzTupleABRegion < K , V > , T , R > ,
188
+ C ,
189
+ MzOffsetOptimized ,
190
+ > ;
239
191
pub type FlatKeyValSpineDefault < K , V , T , R , C > = FlatKeyValSpine <
240
192
<K as MzRegionPreference >:: Region ,
241
193
<V as MzRegionPreference >:: Region ,
0 commit comments