Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
view: Fix panic if offset is longer than result set
Specifically in the case that a query - Has ORDER BY, LIMIT, and OFFSET - Has aggregates with a group by - *doesn't* filter by a primary or unique column If the OFFSET is longer than the length of the result set, we'd panic due to a bounds checking bug in `Vec::drain` inside the ResultIterator. This fixes that by just clearing the result set entirely if the offset is >= the length of the result set. Fixes: ENG-2970 Change-Id: Iadadbe4ee986f0a991745814a927813a946dd9ac Reviewed-on: https://gerrit.readyset.name/c/readyset/+/4805 Tested-by: Buildkite CI Reviewed-by: Fran Noriega <fran@readyset.io>
- Loading branch information