yurmix commented on issue #6430: Contributing Moving-Average Query to open source. URL: https://github.com/apache/incubator-druid/pull/6430#issuecomment-487141507 > Hmm, let me add some more details. `yielder` is updated in this `if` clause which should be used to iterate all values in it. However, in `hasNext()`, it only checks `expectedBucket` is less than `endTime`. Since `expectedBucket` is also updated in this `if` clause, `hasNext()` can return false even though `yielder` is not used yet. The reason we need `expectedBucket` is that `RowBucketIterable` needs to return empty row buckets for periods with no rows. That's why it traverses over `intervals` in addition to the rows `seq`. I added a check for yielder as well to `hasNext()`, in addition to `expectedBucket`. I think there could be a more elegant way for traversing over two levels (intervals/periods and rows) when one does not directly contain the other, but I won't be able to refactor it for this release.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
