Hi,
When I try to execute a query which has a FILTER command like the one below in it only works fine if the FILTER condition is the last condition in the WHERE clause. However if it's followed by any other statement it throws an invalid query syntax exception.
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#>
SELECT ?variable
WHERE {
?s <urn:time> ?time .
FILTER ( ?time < "1248040800000"^^xsd:dateTime ) .
?s <urn:variable> ?variable .
}
It only seems to be a problem when a "less than" comparison operator is used; "greater than" is executed without error.
Here's part of the stack trace:
Unable to parse query syntax token: [< "12474360000000"^^xsd:dateTime ) .
?s <urn:variable> ]
at org.jrdf.sparql.parser.SableCcSparqllParser.tryParse(SableCcSparqllParser.java:112)
at org.jrdf.sparql.parser.SableCcSparqllParser.parseQuery(SableCcSparqllParser.java:104)
at org.jrdf.sparql.builder.SparqlQueryBuilder.buildQuery(SparqlQueryBuilder.java:89)
at org.jrdf.sparql.SparqlConnectionImpl.executeQuery(SparqlConnectionImpl.java:101)
[...]
Caused by: org.jrdf.sparql.parser.parser.ParserException: [5,18] expecting: ')'
at org.jrdf.sparql.parser.parser.Parser.parse(Parser.java:986)
at org.jrdf.sparql.parser.SableCcSparqllParser.tryParse(SableCcSparqllParser.java:110)
[...]
I am using the current development version of JRDF.
Ben
There appears to be a bug in the grammar.
Fixed but the grammar needs to be made more generally correct (use the correct characters).