Todd Lipcon has submitted this change and it was merged. Change subject: MergeIterator: don't stop iterating on an empty block ......................................................................
MergeIterator: don't stop iterating on an empty block The MergeIterator implementation was incorrectly considering an input iterator to be fully exhausted after it received any block which had no selected rows. This could be triggered in a couple cases: - if a predicate dropped more consecutive rows than the block size, then the entire iterator would be empty and any further rows from that iterator would be skipped. - if enough consecutive rows were deleted such that an entire block needed to be skipped, the same behavior was triggered. The new test changes the test iterator so that it doesn't yield its entire input in a single block. Then, I added a new predicate which triggered the first case above. I also had to add another assertion which verifies that the result list was not incorrectly truncated. Lastly, the test had incorrectly treated the predicate upper bound as an inclusive bound, whereas in fact it has been exclusive for quite some time. Change-Id: I07651ef4451609d8228b5e0f0de022970db4ebcf Reviewed-on: http://gerrit.cloudera.org:8080/3976 Reviewed-by: Mike Percy <mpe...@apache.org> Tested-by: Kudu Jenkins --- M src/kudu/common/generic_iterators-test.cc M src/kudu/common/generic_iterators.cc 2 files changed, 61 insertions(+), 44 deletions(-) Approvals: Mike Percy: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/3976 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07651ef4451609d8228b5e0f0de022970db4ebcf Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Anonymous Coward #80 Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Todd Lipcon <t...@apache.org>