W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > May 2005

Comments on ORDER BY

From: Richard Cyganiak <richard.cyganiak@hp.com>
Date: Tue, 03 May 2005 20:58:19 +0100
To: public-rdf-dawg-comments@w3.org
Message-Id: <1115150299.3700.225.camel@dhcp-92-7.hpl.hp.com>

Comments on 
http://www.w3.org/2001/sw/DataAccess/rq23/
regarding the ORDER BY clause:


>From the grammar:

| [16] OrderExpression ::= FunctionCall | Var
| [59] FunctionCall ::= URI '(' ArgList ')'

This doesn't allow expressions like "?a + ?b" in the ORDER BY clause. Is
this intentional?

If not, this sentence from section 10.1 also needs updating:

| An ordering condition can be a variable or a function call.



>From section 10.1:

| When ordering a solution sequence involves an expression, it
| is possible that the ordering conditions do no give a
| completely determined ordering for the sequence. In this case
| the ordering of solutions that are not distinguished, is not
| determined.

What does the first part of the sentence refer to? AFAICT, ordering a
solution sequence always involves an expression. There's also some
redundancy with this later paragraph:

| If the ordering criteria do not specify the order of values,
| then the ordering in the solution sequence is undefined.
| However, an implementation must consistently impose the same
| order so that applying LIMIT/OFFSET will not miss any solutions.

Also, s/ no / not / in the first paragraph.



Section 10.1 defines an order for different types of RDF terms, starting
with "no value assigned to the variable":

| 1. (Lowest) no value assigned to the variable in this solution.

I have two issues with this: There might be no "the variable", e.g.
"ORDER BY my:func(?var1, ?var2)". And it should be more explicit if the
sentence applies only to unbound variables, or also to solutions that
generate type errors, e.g. "ORDER BY xsd:integer(?x)" where ?x is not
bound to an appropriate literal. 
Received on Thursday, 5 May 2005 01:57:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:48 GMT