MINUS (test "Subtraction with MINUS from a fully bound minuend")

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MINUS (test "Subtraction with MINUS from a fully bound minuend")

Jan Wielemaker-2
Hi,

Working through the SPARQL 1.1 testcases for ClioPatria, I'm struggling
with MINUS.
This seems to boil down to what do to with optional bindings (NULL) in
the minus
arguments.  If I treat them to match everything, I get no results.  If
treat them
to match only another NULL, I also get ?a = :a2.  Can anyone explain
what I am
missing?

Also related to MINUS: 8.2 talks about two arguments, the left-side and the
right-side.  It isn't very clear on what the left-side argument actually is.
I now consider this to be the query as far as it is collected up to now in
the current GroupGraphPattern.  Is this right?

        Thanks --- Jan

P.s. Surely I'll be more often confused by the specs or test cases.  Is
        this the right forum or should I use another list?

For your convenience: the test is:

prefix : <http://example/>

select ?a ?b ?c {
   ?a :p1 ?b; :p2 ?c
   MINUS {
     ?d a :Sub
     OPTIONAL { ?d :q1 ?b }
     OPTIONAL { ?d :q2 ?c }
   }
}
order by ?a

and the data

==============================
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix example: <http://example/> .

example:a0
        example:p1 example:b0 ;
        example:p2 example:c0 .

example:a1
        example:p1 example:b1 ;
        example:p2 example:c1 .

example:a2
        example:p1 example:b2 ;
        example:p2 example:c2 .

example:a3
        example:p1 example:b3 ;
        example:p2 example:c3 .

example:d0
        a example:Sub .

example:d1
        a example:Sub ;
        example:q1 example:b1 ;
        example:q2 example:c1 .

example:d2
        a example:Sub ;
        example:q1 example:b2 .

example:d3
        a example:Sub ;
        example:q1 example:b3 ;
        example:q2 example:cx .
==============================

Reply | Threaded
Open this post in threaded view
|

Re: MINUS (test "Subtraction with MINUS from a fully bound minuend")

Andy Seaborne-3
(explanatory answer - not a formal WG response - I put these in because
we are quite a formal point in the process)

> P.s.    Surely I'll be more often confused by the specs or test
> cases.  Is this the right forum or should I use another list?

There is [hidden email] for discussion of SPARQL which is not
meant as a formal comment to the working group.

Of course, if you have discovered a problem with the tests, then the WG
will want to know (well, I do!)

        Andy