Skip to content

Commit a311c6a

Browse files
authored
Merge pull request #140 from w3c/Issue136
Clarifications about the use of ToList in algebra expressions
2 parents 81a15c3 + 9687c06 commit a311c6a

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

spec/index.html

+21-10
Original file line numberDiff line numberDiff line change
@@ -8858,8 +8858,11 @@ <h4>Examples of Mapped Graph Patterns</h4>
88588858
Join(<br>
88598859
&nbsp;&nbsp; BGP(?s :p ?o) ,<br>
88608860
&nbsp;&nbsp; ToMultiSet(<br>
8861-
&nbsp;&nbsp;&nbsp;&nbsp; Distinct(Project(BGP(?o ?p ?z), {?o})) )<br>
8862-
&nbsp;&nbsp; )
8861+
&nbsp;&nbsp;&nbsp;&nbsp; Distinct( <br>
8862+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Project( ToList(BGP(?o ?p ?z)), {?o} ) <br>
8863+
&nbsp;&nbsp;&nbsp;&nbsp; ) <br>
8864+
&nbsp;&nbsp; ) <br>
8865+
)
88638866
</div>
88648867
</div>
88658868
</section>
@@ -9012,8 +9015,22 @@ <h5>SELECT Expressions</h5>
90129015
</section>
90139016
<section id="convertSolMod">
90149017
<h4>Converting Solution Modifiers</h4>
9015-
<p>Solutions modifiers apply to the processing of a SPARQL query after pattern matching.
9016-
The solution modifiers are applied to a query in the following order:</p>
9018+
<p>Solution modifiers apply to the processing of a SPARQL query after pattern matching.</p>
9019+
<p>Since the solution modifiers operate on sequences
9020+
of solution mappings, the query result produced up to this
9021+
point is first turned from a multiset of solution mappings
9022+
into such a sequence. While there is no implied ordering to
9023+
this sequence, and duplicates need not be adjacent, the sequence
9024+
is identical to the multiset in terms of the elements that it
9025+
contains, and their multiplicities. To apply this conversion
9026+
from a multiset into a sequence, the algorithm for capturing
9027+
the solution modifiers in the algebra expression begins with
9028+
the following step, where <var>Pattern</var> is the algebra
9029+
expression produced by the algorithm in the previous section.</p>
9030+
<blockquote>
9031+
<p>Let M := ToList(<var>Pattern</var>)</p>
9032+
</blockquote>
9033+
<p>Now, the solution modifiers are applied in the following order:</p>
90179034
<ul>
90189035
<li>Order by</li>
90199036
<li>Projection</li>
@@ -9022,12 +9039,6 @@ <h4>Converting Solution Modifiers</h4>
90229039
<li>Offset</li>
90239040
<li>Limit</li>
90249041
</ul>
9025-
<p>Step: ToList</p>
9026-
<p>ToList turns a multiset into a sequence with the same elements and multiplicities. There is
9027-
no implied ordering to the sequence; duplicates need not be adjacent.</p>
9028-
<blockquote>
9029-
<p>Let M := ToList(Pattern)</p>
9030-
</blockquote>
90319042
<section id="sparqlOrderBy">
90329043
<h5>ORDER BY</h5>
90339044
<p>If the query string has an ORDER BY clause</p>

0 commit comments

Comments
 (0)