SmartDataAnalytics / jena-sparql-api

A collection of Jena-extensions for hiding SPARQL-complexity from the application layer
Other
57 stars 14 forks source link

RuntimeException when using TransformPushFiltersIntoBGP with OPTIONAL and !BOUND() #13

Closed jindrichmynarz closed 5 years ago

jindrichmynarz commented 7 years ago

Applying TransformPushFiltersIntoBGP to queries with OPTIONAL and !BOUND, such as the following, throws RuntimeException should not happen:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

SELECT ?concept
WHERE {
  ?concept a skos:Concept .
  OPTIONAL {
    ?concept skos:broader ?broader .
  }
  FILTER (!BOUND(?broader))
}

Tested with 3.1.1-1-SNAPSHOT.

Aklakan commented 7 years ago

The "should not happen" exception has been removed; if the transformer does not find itself applicable to the current part of the sparql algebra tree, it will do nothing rather than throwing the exception.