[
https://issues.apache.org/jira/browse/JENA-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16524897#comment-16524897
]
ASF GitHub Bot commented on JENA-1566:
--------------------------------------
GitHub user rvesse opened a pull request:
https://github.com/apache/jena/pull/440
Fix SSE parsing on table with boolean values (JENA-1566)
JENA-1566 reports an issue with round tripping through SSE of tables that
contain boolean literals i.e. `true` and `false`
This was due to overly strict checking in `BuilderBinding` which has been
removed although a missing test for non-blank-ness was added. Various unit
tests are added around this issue.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rvesse/jena JENA-1566
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/440.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #440
----
commit 1a3f662f31533700685eda774458eba9a6766229
Author: Rob Vesse <rvesse@...>
Date: 2018-06-27T10:38:19Z
Remove unecessarily strict check in BuilderTable (JENA-1566)
Check prevents valid node values being parsed for row entries and there
is already checking of invalid values that happens after the attempt to
parse the node value. Adds various unit tests around BuilderTable as
well.
commit e6d8c52ad0416cbb81ab393b8b9bdaccab30a3e5
Author: Rob Vesse <rvesse@...>
Date: 2018-06-27T10:45:50Z
Add missing node test in BuilderBinding (JENA-1566)
----
> Unable to parse VALUES clause containing boolean literal bindings
> -----------------------------------------------------------------
>
> Key: JENA-1566
> URL: https://issues.apache.org/jira/browse/JENA-1566
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: Jena 3.7.0
> Reporter: Lee Kitching
> Assignee: Rob Vesse
> Priority: Major
>
> 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))))");}}
> {quote} 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]
> {quote}
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)