From ea40eea92b2462ddd1c1c18423b2d6817e99a8d4 Mon Sep 17 00:00:00 2001 From: Olaf Hartig Date: Thu, 22 Feb 2024 15:47:50 +0100 Subject: [PATCH] clarifies that the ToList operator needs to be applied before applying the solution modifiers; see https://github.com/w3c/sparql-query/issues/136#issuecomment-1959502714 --- spec/index.html | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/spec/index.html b/spec/index.html index 279196f..4cc4554 100644 --- a/spec/index.html +++ b/spec/index.html @@ -8997,8 +8997,22 @@
SELECT Expressions

Converting Solution Modifiers

-

Solutions modifiers apply to the processing of a SPARQL query after pattern matching. - The solution modifiers are applied to a query in the following order:

+

Solutions modifiers apply to the processing of a SPARQL query after pattern matching.

+

However, since the solutions modifiers operate on sequences + of solution mappings, the query result produced up to this + point is first turned from a multiset of solution mappings + into such a sequence. While there is no implied ordering to + this sequence, and duplicates need not be adjacent, the sequence + is identical to the multiset in terms of the elements that it + contains, and their multiplicities. To apply this conversion + from a multiset into a sequence, the algorithm for capturing + the solution modifiers in the algebra expression begins with + the following step, where Pattern is the algebra + expression produced by the algorithm in the previous section.

+
+

Let M := ToList(Pattern)

+
+

Now, the solution modifiers are applied in the following order:

-

Step: ToList

-

ToList turns a multiset into a sequence with the same elements and multiplicities. There is - no implied ordering to the sequence; duplicates need not be adjacent.

-
-

Let M := ToList(Pattern)

-
ORDER BY

If the query string has an ORDER BY clause