[
https://issues.apache.org/jira/browse/JENA-939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14542522#comment-14542522
]
Andy Seaborne commented on JENA-939:
------------------------------------
The problem that this JIRA is reports is now fixed and hence marked resolved.
The other point about retaining syntax-assigned bnode names would now be
possible in SPARQL 1.1; some proposed designs for the specification would not
have made it a simple matter but they did not reach the final editions.
Bnodes are translated into variables (starting ?? so they are distinguished)
and naming scheme could be changed to retain the original form. Contributions
welcome.
> Regression - incorrect rewriting of bnodes
> ------------------------------------------
>
> Key: JENA-939
> URL: https://issues.apache.org/jira/browse/JENA-939
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: Jena 3.0.0
> Environment: OSX up-to-date latest JAVA
> Reporter: Alan Ruttenberg
>
> This is building from the github project HEAD
> -https://github.com/apache/jena/tree/c51aa08005de96cfc8230f6fd43fae51bb30cabd
> Using qparse , for input below, you get error when qparse tries to reparse
> what it generated. BTW, it would be nice to maintain use-assigned bnode
> names, for easier debugging, and in order to use qparse for pretty-printing.
> {code}
> select ?s ?p where
> { {select * where {?s ?p _:blank}}
> ?s ?p _:blank2
> }
> ->
> SELECT ?s ?p
> WHERE
> { { SELECT *
> WHERE
> { ?s ?p _:b0}
> }
> ?s ?p _:b0
> }
> **** Check failure: could not parse output query
> org.apache.jena.query.QueryParseException: Line 7, column 11: Blank node
> label reuse not allowed at this point: _:b0
> at
> org.apache.jena.sparql.lang.ParserBase.throwParseException(ParserBase.java:554)
> at
> org.apache.jena.sparql.lang.ParserBase.createBNode(ParserBase.java:360)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.BlankNode(SPARQLParser11.java:4881)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.GraphTerm(SPARQLParser11.java:3390)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.VarOrTerm(SPARQLParser11.java:3278)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.GraphNodePath(SPARQLParser11.java:3234)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.ObjectPath(SPARQLParser11.java:2750)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.ObjectListPath(SPARQLParser11.java:2731)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.PropertyListPathNotEmpty(SPARQLParser11.java:2664)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.TriplesSameSubjectPath(SPARQLParser11.java:2608)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.TriplesBlock(SPARQLParser11.java:1792)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.GroupGraphPatternSub(SPARQLParser11.java:1775)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.GroupGraphPattern(SPARQLParser11.java:1675)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.WhereClause(SPARQLParser11.java:431)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.SelectQuery(SPARQLParser11.java:124)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.Query(SPARQLParser11.java:29)
> at
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.QueryUnit(SPARQLParser11.java:20)
> at
> org.apache.jena.sparql.lang.ParserSPARQL11$1.exec(ParserSPARQL11.java:48)
> at
> org.apache.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:97)
> at
> org.apache.jena.sparql.lang.ParserSPARQL11.parse$(ParserSPARQL11.java:52)
> at org.apache.jena.sparql.lang.SPARQLParser.parse(SPARQLParser.java:34)
> at org.apache.jena.query.QueryFactory.parse(QueryFactory.java:147)
> at org.apache.jena.query.QueryFactory.create(QueryFactory.java:79)
> at org.apache.jena.sparql.util.QueryUtils.checkParse(QueryUtils.java:98)
> at org.apache.jena.sparql.util.QueryUtils.checkQuery(QueryUtils.java:38)
> at arq.qparse.exec(qparse.java:165)
> at arq.cmd.CmdMain.mainMethod(CmdMain.java:99)
> at arq.cmd.CmdMain.mainRun(CmdMain.java:60)
> at arq.cmd.CmdMain.mainRun(CmdMain.java:47)
> at arq.qparse.main(qparse.java:62)
> SELECT ?s ?p
> WHERE
> { { SELECT *
> WHERE
> { ?s ?p _:b0}
> }
> ?s ?p _:b0
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)