hey, sorry for the slow reply. I was on vacation actually.
I read (most of) the paper, or at least at it relates to merging "space saving" sketches. A couple things to note are that they assume perfectly sharded data, which I would have thought would make the merging extremely easy. The deterministic algorithm described in the paper seems to be roughly:
- merge all the shards as if K was unlimited
- prune bottom entries by subtracting from higher/remaining ones
possibly they are assuming that error counts are not tracked per entry. In any event, this is what I might call an "aggressive" algorithm in that it aggressively attempts to move to wards its higher error bound. There are a number of randomization-based strategies that follow which I assume attempt to address the more egregious cases. The end result will be a sketch whose error bounds are based on the aggregate count of objects, so from the perspective of one of the original sketches, there will still be "precision loss" (the error is basically added together as you'd expect).
Many probabilistic algorithms suffer from a large disparity between the sometimes known: "provable error bounds", and the much more commonly experienced, "things looks pretty okay to me". In many cases, if an implementation spit out the worst possible allowed value, the user would be extremely shocked and unhappy.
In general, if you can be assured that your data is sharded on the input key, then it is pretty safe, if not downright beneficial, to shard and then merge using methods either from the paper or as described earlier. If the data is sharded on some other value, then there may be more potential for trouble if each had a high error count... but that information would at least be available, and there could be some error vs weighting valuation during the merging if you wanted. I don't think the paper attempted to address that case, but maybe someone else has.