[
https://issues.apache.org/jira/browse/JENA-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13885657#comment-13885657
]
Andy Seaborne commented on JENA-627:
------------------------------------
[~rvesse] This looks wrong -
{noformat}
(filter (= 1 1)
(union
(bgp (triple ?s ?p ?o))
(filter (!= 0 0)
(table unit))))
{noformat}
Applying just {{TransformFilterPlacement(false)}} is OK:
{noformat}
(union
(filter (= 1 1)
(bgp (triple ?s ?p ?o)))
(filter (exprlist (= 1 1) (!= 0 0))
(table unit)))
{noformat}
but {{TransformFilterPlacement(true)}} is not ({{(= 1 1)}} is lost):
{noformat}
(union
(bgp (triple ?s ?p ?o))
(filter (!= 0 0)
(table unit)))
{noformat}
Two things are happening in {{TransformFilterPlacement.placeUnion}}
# Some code is modifying {{exprs}}
# The code is not looking at unprocessed expressions properly.
The effect of the two actually covers up many cases by accident.
The obvious fix of copying the input works but I want to find the cause of the
mutating data structure in case it's going to cause problems elsewhere.
> SPARQL query evaluation seems to be broken
> ------------------------------------------
>
> Key: JENA-627
> URL: https://issues.apache.org/jira/browse/JENA-627
> Project: Apache Jena
> Issue Type: Bug
> Components: Fuseki
> Affects Versions: TDB 1.0.1
> Reporter: Michael Brunnbauer
> Assignee: Andy Seaborne
>
> This query - used on a non-empty default graph - will return no results.
> It will work if you remove the FILTER(1). With TDB 1.0.0, both queries would
> return a result.
> {noformat}
> select ?s ?p ?o where {
> { ?s ?p ?o } UNION { FILTER(0) }
> FILTER(1)
> } limit 1
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)