-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bugfix] [SQL-Search] Fix SQL code generation when :not operator is included. #2785
Merged
Conversation
This file contains 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
Adding categories to tests.
fhibf
commented
Aug 31, 2022
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Search/NotExpressionTests.cs
Outdated
Show resolved
Hide resolved
fhibf
commented
Sep 6, 2022
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Search/NotExpressionTests.cs
Outdated
Show resolved
Hide resolved
PTaladay
reviewed
Sep 7, 2022
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Search/NotExpressionTests.cs
Show resolved
Hide resolved
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Search/NotExpressionTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Search/NotExpressionTests.cs
Outdated
Show resolved
Hide resolved
LTA-Thinking
approved these changes
Sep 16, 2022
ccfromms
pushed a commit
that referenced
this pull request
Sep 19, 2022
…ncluded. (#2785) * Changes in NotExpressionRewriter. * Adding categories to tests. * Adding tests to fix bug when using :not operator combined with other search criteria.
ccfromms
added a commit
that referenced
this pull request
Oct 21, 2022
* rebuild index * Modify the length of Ind and the Generator setting * Modify 39.diff.sql * update * update sql * modify 40.diff.sql * modify the code for table IndexProperties * Modfiy and add tests * restore the global.json * Modify E2E test for rebuild indexes * Remove rebuild index progress * Delete lists not used * Delete unused files * Remove useless assignment and change token * fix error in test * Remove delay * Remove useless * Combine flag in importtaskconfiguration * Change DefaultSqlLongRunningOperationTimeoutInSec to 0 * Additional fix for Failed Export due to RequestEntityToolarge (#2803) * Added actionable error message for customer when hitting a RequestEntityTooLargeException during export. * Added in missing logging. * Now clearing the output for the export job if it runs into the exceeded size so we can save the failed state. The output information is really necessary if it failed since it would be incomplete. * Fix long job info crash (#2802) * Bump System.Configuration.ConfigurationManager from 6.0.0 to 6.0.1 (#2801) Bumps [System.Configuration.ConfigurationManager](https://github.com/dotnet/runtime) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](dotnet/runtime@v6.0.0...v6.0.1) --- updated-dependencies: - dependency-name: System.Configuration.ConfigurationManager dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Standalone resource parser (#2751) * Adds SDL analysis tools, cleaup PR builds (#2797) +semver: skip * [Bugfix] [SQL-Search] Fix SQL code generation when :not operator is included. (#2785) * Changes in NotExpressionRewriter. * Adding categories to tests. * Adding tests to fix bug when using :not operator combined with other search criteria. * Bump FluentValidation from 11.2.1 to 11.2.2 (#2800) Bumps [FluentValidation](https://github.com/JeremySkinner/fluentvalidation) from 11.2.1 to 11.2.2. - [Release notes](https://github.com/JeremySkinner/fluentvalidation/releases) - [Changelog](https://github.com/FluentValidation/FluentValidation/blob/main/Changelog.txt) - [Commits](FluentValidation/FluentValidation@11.2.1...11.2.2) --- updated-dependencies: - dependency-name: FluentValidation dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Package integration tests (#2806) * restore 40 * add 41.diff * change taskconfiguration * remove incorrect set * modify stored procedures * fix stored procedures * Add IndexRebuilder * add sqlserver.database * update sqlserver.database.sqlproj * update suppress warning * add log * remove unnecessary reference * modify sql * modify encoding * update BuildTimeCodeGenerator and Tasks version to 6.1.129 * update * add attribute for test * remove set and restore lines * modify nuget version * restore encoding * restore encoding * remove lines * modify pros * modify props * modify props * modify Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Paul Taladay <PTaladay@users.noreply.github.com> Co-authored-by: Robert Johnson <rbrucej@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brendan Kowitz <bkowitz@microsoft.com> Co-authored-by: Fernando Henrique Inocêncio Borba Ferreira <fernfe@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-Search
Area related to search.
Area-SQL
Area related to the SQL Server data provider
Azure Healthcare APIs
Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs
Bug
Bug bug bug.
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
Queries with the :not operator were returning more results than the expected.
When reviewing the existing logic, it was noticed that queries with the :not operator were not taking in consideration previous CTE than the one with the :not clause.
After changing the SearchParamTableExpressionKind to Normal (instead of All), the CTE usage was fixed.
Related issues
Addresses [issue #].
Testing
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)