@@ -8858,8 +8858,11 @@ <h4>Examples of Mapped Graph Patterns</h4>
8858
8858
Join(<br>
8859
8859
BGP(?s :p ?o) ,<br>
8860
8860
ToMultiSet(<br>
8861
- Distinct(Project(BGP(?o ?p ?z), {?o})) )<br>
8862
- )
8861
+ Distinct( <br>
8862
+ Project( ToList(BGP(?o ?p ?z)), {?o} ) <br>
8863
+ ) <br>
8864
+ ) <br>
8865
+ )
8863
8866
</div>
8864
8867
</div>
8865
8868
</section>
@@ -9012,8 +9015,22 @@ <h5>SELECT Expressions</h5>
9012
9015
</section>
9013
9016
<section id="convertSolMod">
9014
9017
<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>
9017
9034
<ul>
9018
9035
<li>Order by</li>
9019
9036
<li>Projection</li>
@@ -9022,12 +9039,6 @@ <h4>Converting Solution Modifiers</h4>
9022
9039
<li>Offset</li>
9023
9040
<li>Limit</li>
9024
9041
</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>
9031
9042
<section id="sparqlOrderBy">
9032
9043
<h5>ORDER BY</h5>
9033
9044
<p>If the query string has an ORDER BY clause</p>
0 commit comments