Hello,

Let us consider a service <s> which default dataset contains the default
graph:

<a> <p> <b> .
<a> <q> <c> .

Let us consider the following query to be evaluated with the service <s>
described above:

SELECT *
WHERE { { <a> <p> ?x } FILTER ( EXISTS ( ?x <p> <c> ) ) }

I suppose that in this case the filter clause is evaluated for each
solution of the graph pattern on the left. Thus, it is evaluated for
{?x:<b>} and {?x:<c>}. Then the clauses will be:

{?x:<b>} --> EXISTS ( <b> <p> <c> )    (FALSE)
{?x:<c>} --> EXISTS ( <c> <p> <c> )    (FALSE)

Then, the result of this query will be empty.

Let us to consider the following query:

SELECT *
WHERE { { <a> <p> ?x }
        FILTER ( EXISTS ( SERVICE <s> { ?x <p> <c> } ) ) }

What will be the result of this query?

Regards,
Daniel

Reply via email to