Openlink Virtuoso does not apply FILTER using SERVICE clause

115 Views Asked by At

I am trying to run the following query both from Virtuoso and Fuseki-server. I use the SERVICE clause to connect to the SPARQL endpoint of D2R. The problem is that while Fuseki correctly applies the FILTER, Virtuoso doesn't do the same and returns the entire unfiltered result set.

I use Virtuoso version number 07.20.3214 for Windows, Fuseki-server version 2 and D2RQ version 0.8.1.

The query is the following

SELECT ?line ?state ?arrivalTime ?idRide
WHERE 
{
    {  
    SELECT ?ride (MAX(?avmr) AS ?avmrLast)
    WHERE
    {
    ?bs rdf:type km4c:BusStop.
    ?bs foaf:name "COLONNA".
    SERVICE <http://localhost:2020/sparql>
    {     
        ?bsf km4c:isForecastOfBusStop ?bs.
        ?bsf km4c:isForecastOfAVM ?avmr.
        ?ride km4c:hasAVMRecord ?avmr.
    }       
    }
GROUP BY ?ride ORDER BY DESC (?avmrLast) LIMIT 15
}

?bs rdf:type km4c:BusStop.
?bs foaf:name "COLONNA". 
SERVICE <http://localhost:2020/sparql>
{ 
    ?forecast km4c:isForecastOfBusStop ?bs .
    ?forecast km4c:isForecastOfAVM ?avmrLast .
    ?forecast km4c:expectedTime ?arrivalTime.
    ?avmrLast km4c:concernLine ?line.
    ?avmrLast km4c:rideState ?state.
    ?ride dcterms:identifier ?idRide.
}  
FILTER(?arrivalTime> "2015-01-01T09:00:00+02:00")
} ORDER BY ?arrivalTime

The point is that FILTER is not applied. With Virtuoso, I get results whose ?arrivalTime <= 2015-01-01T09:00:00+02:00, while Fuseki works fine.

If I run a "normal" query, without SERVICE for instance, FILTER works fine in Virtuoso too.

Which may be the reasons?

0

There are 0 best solutions below