[ 
https://issues.apache.org/jira/browse/JENA-882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14327334#comment-14327334
 ] 

Andy Seaborne commented on JENA-882:
------------------------------------

When the first SPARQL working group started, the idea was that turning result 
sets into graphs and comparing graphs would be the way to do testing.  Coupled 
with the fact that SPARQL results sets were marked as to whether they are 
ordered or not by an attribute in the XML.  That feature was removed well 
before the SPARQL 1.0 standard was published.  (There was also a "results 
distinct" flag at the same time.)

The "result set marked sorted" has problems: often the results are only 
strictly partially sorted, e.g. {{SELECT ?x ?y \{ . . . \} ORDER BY(?x)}}. That 
may well be totally sorted, or at least totally stable, if the data happens to 
have one unique {{?y}} for each {{?x}} but from the query alone, you can't tell 
that.

So the feature was removed.  From just a result set, you can't tell if it is 
sorted or not.  

The testing has to be done by "result set" comnparision, not turning into 
graphs.  This was also a reaction from developers that graph isomorphism was 
too great a burden for a SPARQL implementation to pass conformance tests.  See 
{{ResultSetCompare}} - you have to tell it to compare by order.

If indexes were to be added, then two equivalent result sets can generate RDF 
graphs. Worse, the order of results in ARQ is not guaranetted without ORDER BY 
in the query.  While ARQ is very deterministic, the order can change, and may 
well change across different versions.  When used as test results with indexes, 
the test would fail due reordering.

The result set to RDF is a relic and remains as a historical feature. Over 
time, a small, but steady stream of people ask about it so removing it would 
inconvenience them.


> Index support for ordered ResultSet
> -----------------------------------
>
>                 Key: JENA-882
>                 URL: https://issues.apache.org/jira/browse/JENA-882
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: ARQ
>    Affects Versions: Jena 2.12.1
>            Reporter: Magnus Knuth
>            Priority: Minor
>
> index statements are never created due to unreachable code:
> https://github.com/apache/jena/blob/95b1c7c20b0255715434b820b7c37c667d58a68f/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/RDFOutput.java#L85
> Is that because of any objections?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to