This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Description
Issue Description:
During one query, if NOW() is bound to a variable in the results, the variable will have as many values as the number of milliseconds taken to execute the query.
Steps to Reproduce:
- Create
test_query.rq containg:
PREFIX pav: <http://purl.org/pav/>
CONSTRUCT {
<> pav:lastUpdateOn ?date .
}
WHERE {
?s ?p ?o .
BIND(NOW() AS ?date)
}
-
Execute the following query, you can replace the target with any large enough file:
java -jar corese-command-4.5.0.jar sparql -q test_query.rq -i https://raw.githubusercontent.com/Wimmics/IndeGx/main/catalogs/all_catalog_edited.ttl
-
The result will look something like:
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix pav: <http://purl.org/pav/> .
<> pav:lastUpdateOn "2024-01-10T11:06:04.503+01:00"^^xsd:dateTime ;
pav:lastUpdateOn "2024-01-10T11:06:04.504+01:00"^^xsd:dateTime ;
pav:lastUpdateOn "2024-01-10T11:06:04.505+01:00"^^xsd:dateTime ;
pav:lastUpdateOn "2024-01-10T11:06:04.506+01:00"^^xsd:dateTime ;
pav:lastUpdateOn "2024-01-10T11:06:04.507+01:00"^^xsd:dateTime ;
pav:lastUpdateOn "2024-01-10T11:06:04.508+01:00"^^xsd:dateTime ;
pav:lastUpdateOn "2024-01-10T11:06:04.509+01:00"^^xsd:dateTime ;
pav:lastUpdateOn "2024-01-10T11:06:04.510+01:00"^^xsd:dateTime .
Expected Behavior:
The result should contain only one binding for NOW(), either at the start of the execution or at the end, at the developer's discretion. This is the behavior expected by the SPARQL 1.1 standard
Note to Developers:
Correcting this bug could slightly speed up querying because this implies a lot of unnecessary calls to the NOW() function.