DarthStem
(Mark Stemmler)
May 2, 2018, 5:13pm
1
When executing this query with reasoning, no results are returned.
SELECT ?s_ ?p_ ?o_ WHERE { ?s_ ?p_ ?o_ . { { SELECT ?s_ WHERE { FILTER ( ?s_ = <http://www.sample.com/9762b949-0f12-4e2a-a3ab-7a620e751a14> ) } ORDER BY ASC ( ?s_ ) LIMIT 1 } } }
However, when executing this query with reasoning, the expected results are returned.
SELECT ?s_ ?p_ ?o_ WHERE { ?s_ ?p_ ?o_ . { { SELECT ?s_ WHERE { ?s_ <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . FILTER ( ?s_ = <http://www.sample.com/9762b949-0f12-4e2a-a3ab-7a620e751a14> ) } ORDER BY ASC ( ?s_ ) LIMIT 1 } }
I would have assumed that the same results would have been returned from both queries. Is this a bug?
stephen
(stephen)
May 2, 2018, 5:58pm
2
Your first query is invalid due to this block, which isn't actually binding ?s_ to anything, just trying to apply a filter. The second query includes another BGP in this block, so the filter has something to work with.
What I'm assuming you want is BIND(<http://www.sample.com/9762b949-0f12-4e2a-a3ab-7a620e751a14> as ?s_)
instead.
DarthStem
(Mark Stemmler)
May 2, 2018, 5:58pm
3
If it’s invalid, why is there no error returned?
stephen
(stephen)
May 2, 2018, 6:00pm
4
While it is perhaps syntactically valid, it won’t ever (as you found) return any bindings.
system
(system)
Closed
May 16, 2018, 6:00pm
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.