Skip to content

[do not review] Fix type-scoped bounded date ranges - #6006

Draft
Mikael Weaver (mikaelweave) wants to merge 1 commit into
mainfrom
mikaelweave-bounded-range-type-fix
Draft

Mikael Weaver (mikaelweave) wants to merge 1 commit into
mainfrom
mikaelweave-bounded-range-type-fix

Conversation

@mikaelweave

Copy link
Copy Markdown
Contributor

Description

Draft for Azure DevOps PR pipeline validation only; do not review or merge.

Fix DateTimeBoundedRangeRewriter skipping bounded date-range searches when resource-column predicate pushdown wraps the date search parameter in an And with _type. Traverse conjunctive wrappers while retaining sibling predicates on both long-range and bounded short-range branches. Keep the existing rewriter order and skip disjunctions or conjunctions with multiple candidate date ranges.

Add pipeline regression coverage for type-scoped/system searches with and without a reference chain, plus unit coverage for preserving _type in both branches and excluding single bounds, multiple ranges, and disjunctions. No schema changes.

Related issues

No linked GitHub issue.

Testing

  • dotnet test --project src\Microsoft.Health.Fhir.SqlServer.UnitTests --filter-class "*SqlServerSearchServiceTests" --filter-class "*DateTimeBoundedRangeRewriterTests": passed, 81/81.
  • dotnet test --project src\Microsoft.Health.Fhir.SqlServer.UnitTests: failed, 1,253/1,254 passed; unchanged CustomQueriesUnitTests.GivenCustomQueryClass_WithGivenWaitTime_QueryToDBWillOccurOnlyAfterWaitPeriod expected two CreateCommand() calls but received one. Full-suite rerun produced the same failure.
  • dotnet test --project src\Microsoft.Health.Fhir.SqlServer.UnitTests --filter-class "*CustomQueriesUnitTests": failed, 1/2 passed with the same call-count failure.
  • git diff --check: passed.

Azure DevOps PR validation is requested. Live SQL execution, continuation-token, sort, _include, and SMART-scope end-to-end validation have not been run for this draft.

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • When changing or adding behavior, if your code modifies the system design or changes design assumptions, please create and include an ADR.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mikaelweave

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant