GEOWAVE-626: Address performance issue when querying multiple range c…#631
GEOWAVE-626: Address performance issue when querying multiple range c…#631
Conversation
| break; | ||
| } | ||
| } | ||
| i = j; |
There was a problem hiding this comment.
logically this seems to have a potential inconsistency, right? let's say you have ranges, a,b,c, and d (starts of the range are sorted in that order). Imagine a, b, and c are very long spans, d is a very short span. a is so long it overlaps d, but b and c aren't quite as long but overlap each other. It seems this logic would find that a and d overlap, and skip merging b and c together. I know this may be an edge case that we're willing to trade performance for algorithmic accuracy here. I just wanted to at least point it out, so if we decide the accuracy tradeoff is still worth it, we at least add a comment to explain.
There was a problem hiding this comment.
Are you saying a does not overlap b and c?
if a does not overlap b and c, and 'a' overlaps d, then d must start before b and c.
Since the order is a,b,c,d and a overlaps d, a must have an 'end' past d's start time. The d starts after b and c, so a overlaps b and c as well.
There was a problem hiding this comment.
got it, sorry for the confusion...a will merge with b, then c, then d in my scenario so b and c will never need to be merged directly together, ignore my comment
5b14f2b to
155e42e
Compare
GEOWAVE-626: Address performance issue when querying multiple range c…
…onstraints.