-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPARQL test suite missing coverage of RAND
#70
Comments
does a count distinct not suffice
|
That would work almost always. But if you had a poor PRNG, it might stochastically fail if two consecutive |
does in not suffice just to test?
https://dydra.com/james/test/@query#rand-in-solution-must-be-distinct |
Two calls to RAND can return the same value by chance (normally, a very small chance!) |
does why it happens matter? |
Yes - the tests test the results |
I don't see how we can test for "bad implementation" and provide utility. If we have tests that "sometimes fail", the whole tests suite is called into question. It would be better to document expected behaviours (e.g. not eval by call sites) in the spec or some other documenation. |
i do not follow this logic. |
It is both important and may be impossible to test correctly every time given the current testing framework. I think making this perfectly testable would likely require either large changes to the testing framework or enormously burdensome requirements on the PRNG used by implementations. @afs agreed. Maybe this should be either a 1.1 errata or a sparql-1.2 issue about improving the spec text. |
or, by its nature. |
The current SPARQL test suite has a single test for the
RAND
function:I seem to recall that the testing was limited because it's hard to test randomness in the manifest-based approach of this test suite (and due to WG time pressure). However, I recently ran across a case where a SPARQL user found several implementations that seem to do all implement
RAND
in a way that I think is contrary to the spec's intention (evaluatingRAND
once per syntactic call site). It would be nice to find a way to improve the tests to cover the expectations that:RAND
produces different results for each intermediate solution mapping (each result row should get a different random value)RAND
calls should produce different results for the same solution mappingThe text was updated successfully, but these errors were encountered: