- From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
- Date: Wed, 28 Sep 2016 18:46:47 -0700
- To: Andy Seaborne <andy@apache.org>, public-sparql-exists@w3.org
On 09/28/2016 04:55 PM, Andy Seaborne wrote: > > > On 29/09/16 00:44, Andy Seaborne wrote: >> ** Intuition/Outline >> >> Ensure that the variables from the row being filtered are available, not >> just their values as in the spec with substitution. >> >> This is done by restricting the variable to the value of the row at the >> point where the variable is being bound. This is in a BGP. Use of AS >> ?x for ?x in the current row is not allowed : ?x is considered to be >> already set. >> >> ** Proposal >> >> Rewrite the pattern of the EXISTS filter; do this in a deep fashion, >> while respecting scoping rules. >> >> Let V = in-scope variables at the point of the FILTER EXISTS. >> >> For each BGP in the pattern: >> Build a VALUES with variables of V still in-scope at this BGP. >> This includes empty BGPs >> >> Scoping applies. > > This process of injection is written differently to the other proposal but I > believe is the same process because EXISTS is evaluated for every solution > mapping at the point of the FILTER. The location of the injection is different. > > Andy > I'm assuming you mean different from the proposal I put forward. Yes, these look quite similar in effect. There may be minor differences. It does appear that the proposal here fixes the problems with bad algebra syntax and blank node double mapping resulting from the substitution approach. As well, it doesn't appear to trigger MINUS flipping. The major difference is the scope of injection. My proposal was to do absolutely minimal injection. This results in a simpler proposal at the expense of changing the meaning of more queries. As I think I mentioned before, I had toyed around with the idea of injecting in more places. The trick is to figure out just where to do the injection. I'm pretty sure that just saying "in-scope" is not sufficient, partly because the SPARQL notion of scope is very different from the programming language notion of scope. peter
Received on Thursday, 29 September 2016 01:47:27 UTC