(not sure where else to post this.. the workbench seems to be the next best thing)
To reproduce: create a new repository and insert this ttl into the default graph:
@prefix ex:<http://example.com/ns/>
@prefix :<http://example.com/model/>
:one a ex:Number .
:two a ex:Number .
:three a ex:Number .
:me a ex:Person .
Then, the query
PREFIX ex: <http://example.com/ns/>
select ?s (uuid() as ?u) where {
?s a ex:Number .
}
yields
?s ?u
<http://example.com/model/one> <urn:uuid:a4a657c3-2edd-47d9-aa1c-096d4372cbd3>
<http://example.com/model/two> <urn:uuid:a4a657c3-2edd-47d9-aa1c-096d4372cbd3>
<http://example.com/model/three> <urn:uuid:a4a657c3-2edd-47d9-aa1c-096d4372cbd3>
i.e., the same uuid is generated for each solution
However, if we add an unbound variable to the projection, the uuid is different for each solution:
PREFIX ex: <http://example.com/ns/>
select ?s ?p (uuid() as ?u) where {
?s a ex:Number .
}
yields
?s ?p ?u
<http://example.com/model/one> <urn:uuid:7d6d407f-8315-4236-bf9b-c2f4dd282a96>
<http://example.com/model/two> <urn:uuid:5a271486-d65b-4dd3-bb71-ff4630a6b7a8>
<http://example.com/model/three> <urn:uuid:c9f127d0-4cab-473e-a003-a3aeeb484086>
If I am not mistaken, the result should be consistently different for each query solution.
This problem concerns my GraphDB Free installation:
GraphDB 9.3.3
RDF4J 3.2.0
Connectors 12.1.1
OS Windows 10 10.0
Java AdoptOpenJDK 11.0.7
(not sure where else to post this.. the workbench seems to be the next best thing)
To reproduce: create a new repository and insert this ttl into the default graph:
Then, the query
yields
i.e., the same uuid is generated for each solution
However, if we add an unbound variable to the projection, the uuid is different for each solution:
yields
If I am not mistaken, the result should be consistently different for each query solution.
This problem concerns my GraphDB Free installation:
GraphDB 9.3.3
RDF4J 3.2.0
Connectors 12.1.1
OS Windows 10 10.0
Java AdoptOpenJDK 11.0.7