Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 3.7.0, Jena 3.8.0
-
None
Description
Compiling the query
SELECT ?b WHERE { VALUES ?b
{ true }}
into a query algebra:
Query q = QueryFactory.create("SELECT ?b WHERE { VALUES ?b { true }}");
Op a = Algebra.compile(q);
results in
(project
(?b)
(table
(vars ?b)
(row
(?b true))))
Attempting to parse this string representation throws an exception:
SSE.parseOp("(project (?b) (table (vars ?b) (row (?b true))))");
org.apache.jena.sparql.sse.builders.ExprBuildException "Not a node: true"
[org.apache.jena.sparql.sse.builders.BuilderLib exception "BuilderLib.java" 140]
[org.apache.jena.sparql.sse.builders.BuilderLib broken "BuilderLib.java" 147]
[org.apache.jena.sparql.sse.builders.BuilderLib broken "BuilderLib.java" 129]
[org.apache.jena.sparql.sse.builders.BuilderLib checkNode "BuilderLib.java" 32]
[org.apache.jena.sparql.sse.builders.BuilderBinding buildBinding "BuilderBinding.java" 64]
[org.apache.jena.sparql.sse.builders.BuilderBinding build "BuilderBinding.java" 36]
[org.apache.jena.sparql.sse.builders.BuilderTable build "BuilderTable.java" 73]
[org.apache.jena.sparql.sse.builders.BuilderOp$1 make "BuilderOp.java" 209]
[org.apache.jena.sparql.sse.builders.BuilderOp build "BuilderOp.java" 128]
[org.apache.jena.sparql.sse.builders.BuilderOp build "BuilderOp.java" 162]
[org.apache.jena.sparql.sse.builders.BuilderOp$26 make "BuilderOp.java" 672]
[org.apache.jena.sparql.sse.builders.BuilderOp build "BuilderOp.java" 128]
[org.apache.jena.sparql.sse.builders.BuilderOp build "BuilderOp.java" 59]
[org.apache.jena.sparql.algebra.Algebra parse "Algebra.java" 121]
[org.apache.jena.sparql.algebra.Algebra parse "Algebra.java" 109]
[org.apache.jena.sparql.sse.SSE parseOp "SSE.java" 287]
As a bit of background, we are trying to rewrite SPARQL queries using ARQ in Clojure (as described in JENA-1468). The current process is:
Parse SPARQL query -> Compile to Op -> serialise to string -> parse as SSE -> modify SSE -> serialise to string -> Parse to Op -> convert to SPARQL query
This issue is causing the 'parse as SSE' step to fail.
Attachments
Issue Links
- links to