gsmiller commented on PR #13969: URL: https://github.com/apache/lucene/pull/13969#issuecomment-2450301205
@jpountz after thinking a little more, I wonder if an `assert` would make sense to guard against unsorted data between index `0` and `from`? Probably quite unlikely, but would also be nice if that use-case tripped an assert now instead of silently working and then failing later because it didn't adhere to the contract outlined in the javadoc? We could do something like `assert IntStream.range(0, length - 1).noneMatch(i -> buffer[i] > buffer[i + 1]);`. It's trivial but I'm happy to add this if you think it would be reasonable. -- 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. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org