-
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 handling of EXISTS inside BIND #1794
Fix handling of EXISTS inside BIND #1794
Conversation
cb71508
to
637eb7b
Compare
@GreenfishK I think you know this stuff better than most, if you have time for a review it will be appreciated. |
@niklasl @rchateauneu you may also have some insights here. |
Hi @aucampia, I just saw your comment as I was not online over the weekend. Is the review still required? |
If you have time yes please, I'm fairly confident about this change but I'm not really as familiar with the SPARQL parsing, translation and evaluation as I think you are. Further if you can think of more corner cases to test, or just tests that would make you more comfortable with this change I would be happy to add them also. |
637eb7b
to
f1ab6b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to include the change to tox.ini? Not that I have any objection at all, just checking.
I did intend to include it, though it probably would have been better to not include it. It is mainly in the PR because the previous log format did not include the function name and it was a bit hard to read, and to fix this issue it helped a lot to see the function name that things were coming from. Thanks for the reviews. |
This patch fixes an issue with `BIND( EXISTS ... )` in SPARQL, for example: ```sparql SELECT * WHERE { BIND( EXISTS { <http://example.com/a> <http://example.com/b> <http://example.com/c> } AS ?bound ) } ``` The graph pattern of `EXISTS` needs to be translated for it to operate correctly during evaluation, but this was not happening. This patch corrects that so that the graph pattern is translated as part of translating `BIND`. This patch also adds a bunch of tests for EXISTS to ensure there is no regression and that various EXISTS cases function correctly. Fixes RDFLib#1472
f1ab6b9
to
ff49579
Compare
Going to merge this on 2022-04-17 if there is no further feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look good to me.
Won't merge before #1838 |
Summary of changes
This patch fixes an issue with
BIND( EXISTS ... )
in SPARQL,for example:
The graph pattern of
EXISTS
needs to be translated for it to operatecorrectly during evaluation, but this was not happening. This patch
corrects that so that the graph pattern is translated as part of
translating
BIND
.This patch also adds a bunch of tests for EXISTS to ensure there is no
regression and that various EXISTS cases function correctly.
Fixes #1472
Checklist
the same change.
CHANGELOG.md
).so maintainers can fix minor issues and keep your PR up to date.