@@ -125,8 +125,9 @@ mutable struct GatherBy
125125 mapformats:: Bool
126126 perm
127127 starts
128+ created:: DateTime
128129end
129- Base. copy (gds:: GatherBy ) = GatherBy (copy (gds. parent), copy (gds. groupcols), copy (gds. groups), gds. lastvalid, gds. mapformats, gds. perm === nothing ? nothing : copy (gds. perm), gds. starts === nothing ? nothing : copy (gds. starts))
130+ Base. copy (gds:: GatherBy ) = GatherBy (copy (gds. parent), copy (gds. groupcols), copy (gds. groups), gds. lastvalid, gds. mapformats, gds. perm === nothing ? nothing : copy (gds. perm), gds. starts === nothing ? nothing : copy (gds. starts), gds . created )
130131
131132
132133nrow (ds:: GatherBy ) = nrow (ds. parent)
@@ -176,28 +177,28 @@ end
176177function gatherby (ds:: AbstractDataset , cols:: MultiColumnIndex ; mapformats:: Bool = true , stable:: Bool = true , isgathered:: Bool = false , eachrow:: Bool = false , threads = true )
177178 colsidx = index (ds)[cols]
178179 if isempty (ds)
179- return GatherBy (ds, colsidx, Int[], 0 , mapformats, nothing , nothing )
180+ return GatherBy (ds, colsidx, Int[], 0 , mapformats, nothing , nothing , _get_lastmodified ( _attributes (ds)) )
180181 end
181182
182183 T = nrow (ds) < typemax (Int32) ? Int32 : Int64
183184 _check_consistency (ds)
184185 if isgathered
185186 if eachrow
186- return GatherBy (ds, colsidx, 1 : nrow (ds), nrow (ds), mapformats, 1 : nrow (ds), 1 : nrow (ds))
187+ return GatherBy (ds, colsidx, 1 : nrow (ds), nrow (ds), mapformats, 1 : nrow (ds), 1 : nrow (ds), _get_lastmodified ( _attributes (ds)) )
187188 else
188189 colindex, ranges, last_valid_index = _find_starts_of_groups (ds, colsidx, Val (T); mapformats = mapformats, threads = threads)
189190 groups = Vector {T} (undef, nrow (ds))
190191 _group_creator! (groups, ranges, last_valid_index)
191- return GatherBy (ds, colindex, groups, last_valid_index, mapformats, 1 : nrow (ds), ranges)
192+ return GatherBy (ds, colindex, groups, last_valid_index, mapformats, 1 : nrow (ds), ranges, _get_lastmodified ( _attributes (ds)) )
192193 end
193194 else
194195 if eachrow
195196 a = _gather_groups (ds, colsidx, Val (T), mapformats = mapformats, stable = stable, threads = threads)
196197 b = compute_indices (a[1 ], a[3 ], nrow (ds) < typemax (Int32) ? Val (Int32) : Val (Int64); threads = threads)
197- return GatherBy (ds, colsidx, 1 : nrow (ds), nrow (ds), mapformats, b[1 ], 1 : nrow (ds))
198+ return GatherBy (ds, colsidx, 1 : nrow (ds), nrow (ds), mapformats, b[1 ], 1 : nrow (ds), _get_lastmodified ( _attributes (ds)) )
198199 else
199200 a = _gather_groups (ds, colsidx, Val (T), mapformats = mapformats, stable = stable, threads = threads)
200- return GatherBy (ds, colsidx, a[1 ], a[3 ], mapformats, nothing , nothing )
201+ return GatherBy (ds, colsidx, a[1 ], a[3 ], mapformats, nothing , nothing , _get_lastmodified ( _attributes (ds)) )
201202 end
202203 end
203204end
@@ -215,7 +216,7 @@ function hm_gatherby(ds::AbstractDataset, cols::MultiColumnIndex; mapformats = f
215216 gds = groupby (ds, [:___tmp___cols8934_2 , :___tmp___cols8934 ], stable = false , threads = threads)
216217 grpcols, ranges, last_valid_index = _find_starts_of_groups (view (ds, gds. perm, cols), cols, nrow (ds) < typemax (Int32) ? Val (Int32) : Val (Int64); mapformats = mapformats, threads = threads)
217218 select! (ds, Not ([:___tmp___cols8934 , :___tmp___cols8934_2 ]))
218- GatherBy (ds, grpcols, nothing , last_valid_index, mapformats, gds. perm, ranges)
219+ GatherBy (ds, grpcols, nothing , last_valid_index, mapformats, gds. perm, ranges, _get_lastmodified ( _attributes (ds)) )
219220end
220221
221222function _fill_mapreduce_col! (x, f, op, y, loc)
0 commit comments