Re: can/should a parser join groups?

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

And how does it change semantics then?
I.e., what would be the difference between

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

and 

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

or

SELECT  ?title ?price
{  ?x ns:price ?p .
   OPTIONAL { ?x ns:discount ?discount }
   ?x dc:title ?title .
}

and

SELECT  ?title ?price
{  ?x ns:price ?p .
   ?x dc:title ?title .
   OPTIONAL { ?x ns:discount ?discount }
}

?

Best,

Ruben

Received on Thursday, 21 August 2014 12:05:49 UTC