That case is used for snapshot market data. "limit -1 " is used to filter duplicate values.
(1) since it is a pretreatment for data, this step is neccessary and efficient for this instance.
(2)update t set prevVolume = dictVolume[Symbol] here we add a new column which equals to previous cumulative volume that we saved last time.
dictVolume[t.Symbol] = t.Volume and then we update dict to current cumulative volume.
tsAggrOHLC .append!(t.update!("Volume", <Volume-prevVolume>).dropColumns!("prevVolume")) finally we get current volume and input to TimeSeriesAggregator.