Our client, BfR, has found 3 SPARQL query scenarios which don't seem to work:
Regex Filtering [this one doesn't surprise me -- although we can do it in FlureeQL, I don't think we'd gotten around to supporting it in SPARQL yet]
Union Queries [this one actually has tests passing in db, so I'm not sure what the issue might be, but I'll provide their example used against server as a test scenario]
Query by Subject IRI [this might just be a string serialization issue, but I'll provide their example used against server as a test scenario]
BfR would like to be able to issue SPARQL queries that leverage these three patterns, as they already have application code in place that uses SPARQL
There is also a request to allow the use of a instead of <@type>, as that's more consistent with SPARQL usage generally. If that's doable in this ticket, I'd love to include that, but if it's complex enough to also separate that into it's own ticket, I can do that too (at a lower priority)
I think this might just be a serialization issue because the error looks like it's being parsed correctly
PREFIX person: <http://person.com/ns/>
SELECT ?person ?age
FROM <cookbook/base>
WHERE {
{?person person:age 70.
?person person:handle "dsanchez".}
UNION {?person person:handle "anguyen".}
?person person:age ?age .
}
And the error returned:
{
"error": "db/invalid-query",
"message": "Error in value for \"where\"; where clause must be a single node map pattern or a sequence of where patterns; Provided: [[:union [[{:@id \"?person\", :person:age 70} {:@id \"?person\", :person:handle \"dsanchez\"}] [{:@id \"?person\", :person:handle \"anguyen\"}]]] {:@id \"?person\", :person:age \"?age\"}]; See documentation for details: https://next.developers.flur.ee/docs/reference/errorcodes#query-invalid-where"
}
Query by Subject IRI
PREFIX psm: <http://srv.ktbl.de/data/psm/>
PREFIX ex: <http://example.org/>
SELECT ?p ?o
FROM <cookbook/base>
WHERE {
ex:andrew ?p ?o. # Should provide just the triples related to andrew
}
Seems to return all pred-object values, not just the ones on ex:andrew:
There are many more “dot” characters than needed, but are syntactically allowed. (Some parsers have errors when encountering dots immediately after certain “object” patterns, which is the only reason I mention it.
I presume there is a default base, since the graph names are all relative IRIs.
Is the parser case-insensitive for keyword terms? REGEX is defined as being all-caps, though parsers generally allow for case-insensitive keywords.
Description
Our client, BfR, has found 3 SPARQL query scenarios which don't seem to work:
db
, so I'm not sure what the issue might be, but I'll provide their example used againstserver
as a test scenario]server
as a test scenario]BfR would like to be able to issue SPARQL queries that leverage these three patterns, as they already have application code in place that uses SPARQL
There is also a request to allow the use of
a
instead of<@type>
, as that's more consistent with SPARQL usage generally. If that's doable in this ticket, I'd love to include that, but if it's complex enough to also separate that into it's own ticket, I can do that too (at a lower priority)Test Examples & Responses
Regex Filtering
Union Queries
And the error returned:
Query by Subject IRI
Seems to return all pred-object values, not just the ones on ex:andrew: