Re: ordered results in the results format specs

Jeen Broekstra wrote:
> 
> I'm trying to encode some simple test cases for sorting and need a way 
> to encode ordered query results.
> 
> As we discussed at the last telcon, the RDF variable binding results 
> format could be extended with an :index property (with an integer 
> value) to capture this:
> 
> []    rdf:type    rs:ResultSet ;
>        rs:resultVariable  "n" ;
>        rs:solution
>                    [ rs:index "1"^^xsd:integer ;
>                      rs:binding  [ rs:value     "John" ;
>                                    rs:variable  "n"
>                                  ]
> 		  ] ;
>        rs:solution
>                    [ rs:index "2"^^xsd:integer ;
>                      rs:binding  [ rs:value     "George" ;
>                                    rs:variable  "n"
>                                  ]
> 		  ] ;
> 
> ...etc.
> 
> One question that was raised is how this affects current testing 
> tools. I personally do not see much of a problem provided this 
> property is part of the actual query result - testing can still be 
> done using graph matching. Any comments?

Presumably the indexing information is only added if the query involved ORDER BY.

A query test with no implication of order would generate solutions in any order 
and a test for graph equivalence would continue to work.

(I don't test results specifically - I test for whether two graphs are the same 
(isomorphic to within bNode relabelling)).

> 
> Another issue is the XML result format. An option is to not specify 
> anything explicitly and simply rely on XML's element ordering, but I 
> understood from Dave that the current WD explicitly specifies that the 
> result is unordered. There are two options here that I can see:
> 
>   1. amend the WD to say that in the case of a query using sort, the
>      xml result _is_ ordered implicitly.
>   2. add an explicit tag to the XML result to indicate that the result
>      is ordered.
> 
> My preference would be option 2.

+1 - my preference as well.

I'd suggest always including a tag that indicated whether the result set is 
ordered or unordered.

	Andy

> 
> 
> Jeen

Received on Monday, 18 April 2005 12:55:39 UTC