- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Thu, 21 Jun 2012 17:17:25 +0100
- To: SPARQL Working Group <public-rdf-dawg@w3.org>
FYI / Update I have been doing some work on the formal handling of BIND, but it is not finished yet. Much of the descriptive text is correct but the way it is handled in the algebra translation isn't right - it needs to happen separately and before the general group graph pattern processing step. The objective is that BIND adds a variable binding to the proceeding basic graph pattern + any path expression (i.e generalise BGP to include property paths). With this, BIND adds to a basic building blocks of SPARQL evaluation and all other combination with graph patterns is by join. Andy Approximate examples: Example 1: SELECT * { ?s ?p ?o BIND ( ?o +1 AS ?o2 ) } ==> (extend ((?o2 (+ ?o 1))) (bgp (triple ?s ?p ?o))) Example 2: SELECT * { { ?s ?p ?o } BIND ( ?o +1 AS ?o2 ) } ==> SELECT * { { ?s ?p ?o } # Sub-pattern {} ## Insert empty BGP for BIND to work on. BIND ( ?o +1 AS ?o2 ) } ==> (join (bgp (triple ?s ?p ?o)) (extend ((?o2 (+ ?o 1)) (table unit) ) Example 3: SELECT * { ?s ?p ?o ?s :p* ?v BIND ( ?o +1 AS ?o2 ) } ==>?? (extend ((?o2 (+ ?o 1))) (join (bgp (triple ?s ?p ?o)) (path ?s (path* :p) ?v)))
Received on Thursday, 21 June 2012 16:18:00 UTC