Reasoning query returns unexpected results

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?

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.

If it’s invalid, why is there no error returned?

While it is perhaps syntactically valid, it won’t ever (as you found) return any bindings.