-
Notifications
You must be signed in to change notification settings - Fork 61
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
Support BASE
declarations in SPARQL
queries
#1786
Conversation
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.
Several comments about details
for (auto* child : ctx->children) { | ||
if (auto* baseDecl = dynamic_cast<Parser::BaseDeclContext*>(child)) { | ||
visit(baseDecl); | ||
} else { | ||
auto* prefixDecl = dynamic_cast<Parser::PrefixDeclContext*>(child); | ||
AD_CORRECTNESS_CHECK(prefixDecl); | ||
visit(prefixDecl); | ||
} | ||
} |
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.
What is wrong with the simpler older version?
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.
Imagine the following case:
BASE <http://example.com>
PREFIX test: <test>
BASE <http://other.example.com>
PREFIX test2: <test>
BASE <http://alternative.example.com>
SELECT * FROM {
<s> ?p test:abc
}
Then the first BASE
should apply to the first prefix, and the second BASE
should apply to the second prefix, and the third BASE
should apply to everything else that follows. So to ensure that we apply BASE
to PREFIX
correctly, we can't parse them after each other, and instead have to interleave parsing.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1786 +/- ##
==========================================
+ Coverage 90.02% 90.05% +0.03%
==========================================
Files 396 396
Lines 37974 38010 +36
Branches 4262 4267 +5
==========================================
+ Hits 34185 34230 +45
+ Misses 2493 2489 -4
+ Partials 1296 1291 -5 ☔ View full report in Codecov by Sentry. |
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.
A small round of things, but we can almost merge this.
Conformance check passed ✅Test Status Changes 📊
|
|
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.
Thank you very much
BASE
declarationBASE
declarations in SPARQL
queries
So far, the
BASE
keyword was supported forTurtle
inputs, but not as part of aSPARQL
query. Now it is correctly supported in all cases