afs commented on issue #1634:
URL: https://github.com/apache/jena/issues/1634#issuecomment-1326566293
The bug is probably where there are three values get compared during the
sort: "A<B" and "B<C" but "A>C".
This needs confirming (is it one double and 2 unknowns or 2 doubles and one
unknown - really hope it isn't 3 the same beause that would be completely
different and unknown) - and it depends on the lexical forms where for
xsd:double lexical form order is not value order.
> Regarding size of data, I tried with a lower number
It's not just "make smaller". It is find some specific reduced set in a
particular order. But for a triggering case with "sparql --data --query" it
should happen each time (no bnodes to cause different orders per run.)
From JENA-2333, the order that nodes hit the Timsort matters - the sort can
be silently wrong as well.
There will be an example with no DISTINCT, no OFFSET/LIMIT, and rdf:type.
These change the order arriving at the sort, including different data sizes
having different orders for the same query, making finding/confirming the root
case harder.
The `sparql` command uses TIM which does not hash tables, chopping up data
at least gets indexed in the same order. GraphMem would be hit by hash table
expansion reordering input.
```
SELECT (count(*) AS ?C) WHERE {
?uri <http://dbpedia.org/ontology/length> ?l .
}
ORDER BY DESC(?l)
```
Unless it's a completely different issue, a fix is doable but the code is
not set up for it at the moment. There needs to be a significant
refactoring/rewrite and it'll apply to all ORDER BY. That's not something to do
in the 4.7.0 timeframe fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]