[ 
https://issues.apache.org/jira/browse/JENA-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17076107#comment-17076107
 ] 

Jeremy Coulon commented on JENA-1877:
-------------------------------------

That's not how I read the spec:
{noformat}
If the form with a simple literal is used, every call results in distinct blank 
nodes for different simple literals, and the same blank node for calls with the 
same simple literal within expressions for one solution mapping.{noformat}
Note about how I discoved this:

I am using Jena in order to parse sparql query and create an algebra with it. 
Then I am transforming part of this algebra into my own custom op (much is more 
than just BGP). Default Jena optimizations can sometimes be 
counter-optimizations in my case. Thus most optimizations are disabled. I then 
run the sparql test suite in order to check for regressions:

[https://www.w3.org/2009/sparql/docs/tests/summary.html#functions-bnode01]

> Wrong results for non-optimized query
> -------------------------------------
>
>                 Key: JENA-1877
>                 URL: https://issues.apache.org/jira/browse/JENA-1877
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: Jena 3.14.0
>            Reporter: Jeremy Coulon
>            Priority: Major
>         Attachments: bnode01.rq, data.ttl
>
>
> I noticed that the attached query gives correct results with:
> {noformat}
> ./bin/arq --data=data.ttl --query=bnode01.rq --explain --optimize=on
> {noformat}
> while it gives wrong results with:
> {noformat}
> ./bin/arq --data=data.ttl --query=bnode01.rq --explain 
> --optimize=off{noformat}
> Without optimization, ARQ algebra has 2 different 'extend' op with 
> 'bnode(?s)' expression.
> With optimization, ARQ algebra merges these ops into a single op 'extend'.
>  
> I tried debugging and I think that 'E_BNode.evalSpecial()' takes the same 
> 'binding' object for each call in optimized mode but different 'binding' 
> objects for non-optimized mode. This function relies on reference-equality.
>  
> [^data.ttl]
> [^bnode01.rq]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to