Fix sorted SQL includes pagination - #5868
Open
Richa Bansal (rbans96) wants to merge 1 commit into
Open
Richa Bansal (rbans96) wants to merge 1 commit into
Richa Bansal (rbans96) wants to merge 1 commit into
Conversation
Replay sorted match pages for includes instead of surrogate ID ranges; preserve phase cursors and legacy tokens. Add SQL pagination regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment on lines
+174
to
+201
| { | ||
| await base.OnInitializedAsync(); | ||
|
|
||
| var sortedSetDayOffsets = new int?[SortedSetSize]; | ||
| for (var rank = 0; rank < SortedSetDescendingRankToCreationIndex.Length; rank++) | ||
| { | ||
| sortedSetDayOffsets[SortedSetDescendingRankToCreationIndex[rank]] = SortedSetDayOffsetByRank[rank]; | ||
| } | ||
|
|
||
| for (var creationIndex = 0; creationIndex < SortedSetSize; creationIndex++) | ||
| { | ||
| var (reportReference, observationReference) = await CreateTripleAsync(_sortedTag, creationIndex, sortedSetDayOffsets[creationIndex], sortedSetDayOffsets[creationIndex]); | ||
| _sortedSetReportReferences.Add(reportReference); | ||
| _sortedSetObservationReferences.Add(observationReference); | ||
| } | ||
|
|
||
| var phaseSetDayOffsets = new int?[PhaseSetSize]; | ||
| for (var rank = 0; rank < PhaseSetDescendingRankToCreationIndex.Length; rank++) | ||
| { | ||
| phaseSetDayOffsets[PhaseSetDescendingRankToCreationIndex[rank]] = PhaseSetDayOffsetByRank[rank]; | ||
| } | ||
|
|
||
| for (var creationIndex = 0; creationIndex < PhaseSetSize; creationIndex++) | ||
| { | ||
| var (reportReference, _) = await CreateTripleAsync(_phaseTag, creationIndex, phaseSetDayOffsets[creationIndex], observationDayOffset: null); | ||
| _phaseSetReportReferences.Add(reportReference); | ||
| } | ||
| } |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5868 +/- ##
=======================================
Coverage ? 78.85%
=======================================
Files ? 1018
Lines ? 37140
Branches ? 5684
=======================================
Hits ? 29287
Misses ? 6424
Partials ? 1429 🚀 New features to boost your workflow:
|
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.
Description
Fix missing and incorrect
$includesresults in sorted SQL searches. Replay sorted match pages instead of surrogate-ID ranges, preserve phase cursors and legacy tokens, and add SQL pagination regression coverage.Related issues
Addresses [AB#207476](https://microsofthealth.visualstudio.com/Health/_workitems/edit/207476).
Testing
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)