[ https://issues.apache.org/jira/browse/JENA-384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13631294#comment-13631294 ]
Andy Seaborne commented on JENA-384: ------------------------------------ There are (at least) three ways to give initial bindings consistent semantics as pure substitution 1/ Have a step in ARQ doing algebra to rewrite with substitution before giving to a query engine implementation. 2/ Implement initial bindings via SPARQL syntax rewrite of queries to do substitution before optimization. 3/ ParameterizedSparqlString - because the current API is based on Query objects, using ParameterizedSparqlString would involve turning a query into a string, substituting then reparsing. This may be acceptable as a migration path if we deprecate initial bindings prior to removal. > Interaction of optimization (TransformFilterEquality) and initial binding > ------------------------------------------------------------------------- > > Key: JENA-384 > URL: https://issues.apache.org/jira/browse/JENA-384 > Project: Apache Jena > Issue Type: Bug > Affects Versions: ARQ 2.9.4, Jena 2.10.0 > Reporter: Andy Seaborne > Labels: ARQ, optimizer > Attachments: ReportSubstitueOptimize.java > > > substitution is normally done after optimization so that it preserves the > semantics in case of complex optional situations. > The equality filter optimization eliminates code that can't generate a > solution (the variable is unbound in the subexpression) > This can be unexpected but it's neither clearly right or clearly wrong. The > semantics of initial binding need clarifying; > either > pure substitution semantics, with the substitution applied before > optimization > or > VALUES semantics (join with a data table) in which case elimination of > redundant pattern matching is correct. > In the example, it's only an issue with URIs (reason?) but the general point > remains. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira