feat: enhance repdef utilities to handle empty / null lists#3200
Merged
westonpace merged 4 commits intolance-format:mainfrom Dec 5, 2024
Merged
feat: enhance repdef utilities to handle empty / null lists#3200westonpace merged 4 commits intolance-format:mainfrom
westonpace merged 4 commits intolance-format:mainfrom
Conversation
wjones127
approved these changes
Dec 4, 2024
69a3eb5 to
b7232bb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3200 +/- ##
==========================================
+ Coverage 78.62% 78.64% +0.02%
==========================================
Files 243 244 +1
Lines 82889 83957 +1068
Branches 82889 83957 +1068
==========================================
+ Hits 65170 66029 +859
- Misses 14933 15137 +204
- Partials 2786 2791 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
af3c337 to
c8cad40
Compare
…hich introduce "specials" into the rep/def buffers. These are values in the rep/def buffer which do not correspond to flattened items.
c8cad40 to
971e665
Compare
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.
Empty & null lists are interesting. If you have them then your final repetition & definition buffers will have more items than you have in your flattened array. This fact required a considerably reworking in how we build and unravel rep/def buffers.
When building we record the position of the specials and then, when we serialize into rep/def buffers, we insert these special values. When unraveling we need to deal with the fact that certain rep/def values are "invisible" to the current context in which we are unraveling.
In addition, we now need to start keeping track of the structure of each layer of repetition in the page metadata. This helps us understand the meaning behind different definition levels later when we are unraveling.
This PR adds the changes to the rep/def utilities. We still aren't actually using repetition levels at all yet. That will come in future PRs.