-
Notifications
You must be signed in to change notification settings - Fork 571
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
Fix bug preventing nested FILTER statements from working (#709) #2822
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
This patch adds a single test, self-authored, recreating an issue I encountered when attempting to use a query with a nested `FILTER NOT EXISTS` statement. This test is known to currently fail, but is expected to pass as written with a corrected implementation. References: * RDFLib#709 Signed-off-by: Alex Nelson <[email protected]>
@mgberg wrote the graph and query for this test last year. This patch puts his work, with his permission, into the new test. This test is known to currently fail, but is expected to pass as written with a corrected implementation. References: * RDFLib#709 (comment) Co-authored-by: Matt Goldberg <[email protected]> Signed-off-by: Alex Nelson <[email protected]>
Thank you for nudging this forward, @mgberg . |
…n once to enable nested filters to work
Hi @ajnelson-nist & @mgberg, Thanks for this and similar PRs. We are about to unblock this long list of auto-PRs from dependabot etc. and will merge this in after doing that. Will also make a 7.10 release. ETA: by August. |
Merge blockages should be unblocked now. I've merged latest main branch into this PR, and hopefully everything passes. |
8 tasks
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.
Summary of changes
Disclaimer: I am not super familiar with the SPARQL algebra/translation code in RDFLib, so I'm not confident this is the best solution. Also I'm not 100% confident this will solve all nested filter issues.
This fixes an issue which allows nested filters to work as discussed in #709. Previously, a graph pattern could be passed to
rdflib.plugins.sparql.algebra::translateGroupGraphPattern
multiple times. If this occurs, the graph pattern would get overwritten with an empty pattern, causing the nested filters to appear to be dropped in the query plan. This modifiestranslateGroupGraphPattern
to:Additionally, this includes two new test cases compiled by @ajnelson-nist that verifies that known nested filter issues work (at least those discussed in #709).
Checklist
the same change.
./examples
.so maintainers can fix minor issues and keep your PR up to date.