Repository navigation
Don't include footer row in example values during mapping - #305
Merged
Merged
Conversation
Currently during mapping we identify the data range to select some examples from, but the call that is made expects an inclusive range, and we want an exclusive one. Due to the lack of options wrt range types we instead just decrement the range we want to retrieve. We may want to consider having different range types to avoid having to add/subtract one based on requirements, and perhaps make iteration and calculations easier
simonwo
approved these changes
Sep 1, 2025
simonwo
left a comment
Member
There was a problem hiding this comment.
Is there any milage in always using an inclusive/exclusive definition of ranges?
Contributor
Author
I think generally we have inclusive ranges, but there are cases where we don't want that and it feels error prone to have to determine that on a case by case, and make sure we bound any loops with <= or < than the upper bound of the range. It feels a lot easier to have a default of inclusive range, and allow a exclusive range type for those other cases. We don't need to keep track of intent and if they both have a iteration trait we can traverse the ranges without fear of getting it wrong. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently during mapping we identify the data range to select some examples from, but the call that is made expects an inclusive range, and we want an exclusive one. Due to the lack of options wrt range types we instead just decrement the range we want to retrieve.
We may want to consider having different range types to avoid having to add/subtract one based on requirements, and perhaps make iteration and calculations easier