- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Sat, 18 Sep 2010 14:17:55 +0100
- To: Gregory Williams <greg@evilfunhouse.com>
- CC: SPARQL Working Group <public-rdf-dawg@w3.org>
On 14/09/10 14:54, Gregory Williams wrote: > On Sep 14, 2010, at 4:26 AM, Andy Seaborne wrote: > >> Greg, >> >> I tried your tests : they look OK but require value-based result set testing which ARQ does not (currently) provide so it's an optical checking for now. >> >> The new tests weren't in the entries list and so I've committed changes to the manifest for this to CVS. > > Ah, missed that. Thanks. > >> Greg's new tests: >> >> Failure: Test 13 :: SUM with GROUP BY >> Got: 5 -------------------------------- >> ------------------------------------ >> | s | sum | >> ==================================== >> | :ints | 6 | >> | :mixed2 | 2.4000000000000004e0 | >> | :mixed1 | 3.2 | >> | :doubles | 32100.0e0 | >> | :decimals | 6.7 | >> ------------------------------------ >> Expected: 5 ----------------------------- >> ---------------------- >> | sum | s | >> ====================== >> | 2.4E0 | :mixed2 | >> | 3.2 | :mixed1 | >> | 3.21E4 | :doubles | >> | 6.7 | :decimals | >> | 6 | :ints | >> ---------------------- >> >> "E" or "e" are legal which makes comparison by lexical form tricky. > > Agreed. I tried to use canonical lexical form in both input and output data, but that's not guaranteed to survive a load/query. > > >> ======================================= >> Failure: Test 15 :: AVG with GROUP BY >> Got: 3 -------------------------------- >> ---------------------------------------- >> | s | avg | >> ======================================== >> | :ints | 2.000000000000000000000000 | >> | :mixed2 | 1.2000000000000002e0 | >> | :mixed1 | 1.600000000000000000000000 | >> ---------------------------------------- >> Expected: 3 ----------------------------- >> ------------------- >> | avg | s | >> =================== >> | 2 | :ints | >> | 1.2E0 | :mixed2 | >> | 1.6 | :mixed1 | >> ------------------- >> >> More of the same. Precision issues + e/E issues. > > Not sure what to do about precision issues. Any thoughts? Canonical form helps, but loss of precision is a concern. I've switched to value-based result set comparison and so I agree with the new tests now (not the earlier COUNT ones), except in one case: >> Failure: Test 13 :: SUM with GROUP BY >> Got: 5 -------------------------------- >> ------------------------------------ >> | s | sum | >> ==================================== >> | :ints | 6 | >> | :mixed2 | 2.4000000000000004e0 | >> | :mixed1 | 3.2 | >> | :doubles | 32100.0e0 | >> | :decimals | 6.7 | >> ------------------------------------ >> Expected: 5 ----------------------------- >> ---------------------- >> | sum | s | >> ====================== >> | 2.4E0 | :mixed2 | >> | 3.2 | :mixed1 | >> | 3.21E4 | :doubles | >> | 6.7 | :decimals | >> | 6 | :ints | >> ---------------------- :mixed2 is the sum of "2.2"^^xsd:decimal and "2e-1"^^xsd:double. So the decimal is converted to a double and the result added together but ARQ gets 2.4000000000000004e0 - there is one bit of low end noise introduced by the addition being done on doubles of different exponent (this is Java double+double doing that step). xsd:float, not double, works. Andy
Received on Saturday, 18 September 2010 13:18:34 UTC