On 20/08/14 22:44, Ruben Verborgh wrote:
Hi Andy,

Is it a good idea for a parser to do this in general?

Probably!

One exception I noted:

SELECT  ?title ?price
{  ?x ns:price ?p .
    ?x ns:discount ?discount
    BIND (?p*(1-?discount) AS ?price)
    FILTER(?price < 20)
    ?x dc:title ?title .
}

According to the spec,
“BIND ends the basic graph pattern” [1],
so here we probably don't want to bring the BGPs together?

Correct - adjacent triple patterns and ones separated by FILTER merge together.

Are there any other cases like this?

BIND/OPTIONAL and the rest end the BGP and a new one starts.

        Andy


Thanks,

Ruben

[1] http://www.w3.org/TR/sparql11-query/#assignment



Reply via email to