On 23/02/2021 20:07, james anderson wrote:
...
ASK is not special in its evaluation of patterns.
In SELECT and more general path settings:
What would the answer be? And how many? What if there are DAGs?
why would one not interpret it analogous to
{ ?z <z>+ ?y }
What is the analogy?
apply the same interpretation mechanism.
What interpretation mechanism?
What join based algorithm? and how does to get the count right?
ALP is the definition.
(Did you mean variables in S and O?)
How many rows are you expecting to { <x> ?p+ <y> }
that would depend on the dataset.
ex1:
<x> <p> <z> .
<z> <p> <y> .
ex2:
<x> <p> <z1> .
<z1> <p> <y> .
<x> <p> <z2> .
<z2> <p> <y> .
ex3 below.
thus the “analogy” notion, above and the “when implemented …”, below.
One? if so, what about "?p*" and "?p?" ?
Many? But there are different ways of "many" in a graph with DAGs and SPARQL
distinct connectivity semantics.
that is, as yielding successive bindings which correspond to the progression
through the graph.
The specs uses "ALP" (which is not join based) which is an algorithm for
connectivity without presuming which route is taken to encountered a node. That affects
cardinality.
the reference to “join based” was an attempt to answer the question "What would
the answer be? And how many?”.
the recommendation’s described algorithm is not the only possible answer.
It is defining, including cardinality.
the alternative interpretation, in terms of joins, provides a clear answer.
If the route is required, there are sometimes multiple routes. DAGs - which
occur in e.g. RDFS quite naturally.
The common user request is path length or minimum path length, more common than
?p* effects.
when implemented in terms of the known approach with joins, the questions would
be if a given initial solution fixes successive joins to just that respective
predicate binding or if the successive joins are over the full matched set of
predicates and, in the first case, whether they are distinct or enumerated.
What about the more general path?
(?p1/<property>/?p2)*
(?p1*/?p2*)
as i understand the join-based implementation, it covers those as well.
ex3:
<x> <property> <z1>
<z1> <property> <z2>
<z2> <property> <z3>
<z3> <property> <z4>
<z4> <property> <y>
Andy